Skip to content

Commit ba5054b

Browse files
Merge pull request #31 from ClangBuiltLinux/stage3-compiler-rt
stage3: enable compiler-rt
2 parents 102f4d5 + 365081b commit ba5054b

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

llvm-project/Dockerfile.epoch3

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ RUN ninja -C ${LLVM_BUILD_DIR} \
8383
install-llvm-ranlib \
8484
install-llvm-readelf \
8585
install-llvm-strip
86+
RUN ninja -C ${LLVM_BUILD_DIR} install-compiler-rt
8687

8788
RUN apk del cmake ninja python3
8889

llvm-project/stage3.cmake

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,39 @@ set(CMAKE_C_FLAGS "--sysroot=/sysroot" CACHE STRING "")
1515
# Statically link resulting executable.
1616
set(CMAKE_EXE_LINKER_FLAGS "-static -lc++abi" CACHE STRING "")
1717

18+
# The compiler builtins are necessary.
19+
set(COMPILER_RT_BUILD_BUILTINS ON CACHE BOOL "")
20+
21+
# GWP ASAN fails to build without libexecinfo-dev. Don't need it for stage3.
22+
set(COMPILER_RT_BUILD_GWP_ASAN OFF CACHE BOOL "")
23+
24+
# Don't need libfuzzer, ever.
25+
set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "")
26+
27+
# Don't need memprof, ever.
28+
set(COMPILER_RT_BUILD_MEMPROF OFF CACHE BOOL "")
29+
30+
# Don't need ORC, ever.
31+
set(COMPILER_RT_BUILD_ORC OFF CACHE BOOL "")
32+
33+
# Explicitly enable profiling support. The implicit default is ON.
34+
set(COMPILER_RT_BUILD_PROFILE ON CACHE BOOL "")
35+
36+
# Disable sanitizer support. Not necessary for stage3.
37+
set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "")
38+
39+
# Don't need xray.
40+
set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "")
41+
1842
# Use libc++ from stage2.
1943
# TODO: is CMAKE_CXX_FLAGS still necessary if this is set?
2044
set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
2145

2246
# Use lld from stage2.
2347
set(LLVM_ENABLE_LLD ON CACHE BOOL "")
2448

25-
# Just build clang and lld for now.
26-
set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "")
49+
# Build clang, lld, and compiler-rt.
50+
set(LLVM_ENABLE_PROJECTS "clang;lld;compiler-rt" CACHE STRING "")
2751

2852
# FORCE_ON causes the build to fail if zlib is not found in the environment
2953
# during configuration, rather than much later during link.

0 commit comments

Comments
 (0)