@@ -15,15 +15,39 @@ set(CMAKE_C_FLAGS "--sysroot=/sysroot" CACHE STRING "")
1515# Statically link resulting executable.
1616set (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?
2044set (LLVM_ENABLE_LIBCXX ON CACHE BOOL "" )
2145
2246# Use lld from stage2.
2347set (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