Merge branch 'make_clang_great_again_v2' of github.com:vjpai/grpc into fuzzy-bits

pull/5846/head
Craig Tiller 9 years ago
commit a09af92d23
  1. 4
      Makefile
  2. 4
      build.yaml
  3. 32
      templates/tools/dockerfile/clang_update.include
  4. 2
      templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template
  5. 33
      tools/dockerfile/test/cxx_jessie_x64/Dockerfile

@ -189,7 +189,7 @@ CXX_tsan = clang++
LD_tsan = clang
LDXX_tsan = clang++
CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_tsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDFLAGS_tsan = -fsanitize=thread -fPIE -pie
DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5
VALID_CONFIG_stapprof = 1
@ -226,7 +226,7 @@ CXX_etsan = clang++
LD_etsan = clang
LDXX_etsan = clang++
CPPFLAGS_etsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_etsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDFLAGS_etsan = -fsanitize=thread -fPIE -pie
DEFINES_etsan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER
DEFINES_etsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5

@ -2827,7 +2827,7 @@ configs:
CXX: clang++
DEFINES: _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER
LD: clang
LDFLAGS: -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDFLAGS: -fsanitize=thread -fPIE -pie
LDXX: clang++
compile_the_world: true
test_environ:
@ -2882,7 +2882,7 @@ configs:
-fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
LD: clang
LDFLAGS: -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDFLAGS: -fsanitize=thread -fPIE -pie
LDXX: clang++
compile_the_world: true
test_environ:

@ -0,0 +1,32 @@
#=================
# Update clang to a version with improved tsan
RUN apt-get update && apt-get -y install python cmake && apt-get clean
RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && ${'\\'}
cd llvm && git checkout ad57503 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/clang.git && ${'\\'}
cd clang && git checkout ad2c56e && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && ${'\\'}
cd compiler-rt && git checkout 3176922 && cd ..
RUN git clone -n -b release_38 ${'\\'}
http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && ${'\\'}
git checkout c288525 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && ${'\\'}
cd libcxx && git checkout fda3549 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && ${'\\'}
cd libcxxabi && git checkout 8d4e51d && cd ..
RUN mv clang llvm/tools
RUN mv compiler-rt llvm/projects
RUN mv clang-tools-extra llvm/tools/clang/tools
RUN mv libcxx llvm/projects
RUN mv libcxxabi llvm/projects
RUN mkdir llvm-build
RUN cd llvm-build && cmake ${'\\'}
-DCMAKE_BUILD_TYPE:STRING=Release ${'\\'}
-DCMAKE_INSTALL_PREFIX:STRING=/usr ${'\\'}
-DLLVM_TARGETS_TO_BUILD:STRING=X86 ${'\\'}
../llvm
RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build

@ -33,7 +33,7 @@
<%include file="../../apt_get_basic.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../clang_update.include"/>
<%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]

@ -67,6 +67,39 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# C++ dependencies
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
#=================
# Update clang to a version with improved tsan
RUN apt-get update && apt-get -y install python cmake && apt-get clean
RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && \
cd llvm && git checkout ad57503 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/clang.git && \
cd clang && git checkout ad2c56e && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && \
cd compiler-rt && git checkout 3176922 && cd ..
RUN git clone -n -b release_38 \
http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && \
git checkout c288525 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && \
cd libcxx && git checkout fda3549 && cd ..
RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && \
cd libcxxabi && git checkout 8d4e51d && cd ..
RUN mv clang llvm/tools
RUN mv compiler-rt llvm/projects
RUN mv clang-tools-extra llvm/tools/clang/tools
RUN mv libcxx llvm/projects
RUN mv libcxxabi llvm/projects
RUN mkdir llvm-build
RUN cd llvm-build && cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:STRING=/usr \
-DLLVM_TARGETS_TO_BUILD:STRING=X86 \
../llvm
RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++

Loading…
Cancel
Save