llvmPackages_{12,13,git}.compiler-rt: remove new runtimes in useLLVM

LLVM 12 added the memory profiling runtime and LLVM 13 the ORC
runtime. Both need a libc in order to build (or at least headers not
present in clang's resource root), so we'll disable them for any sort of
baremetal-ish build. memprof likely doesn't work in a baremetal
situation at all, orc is unknown. Whether both would compile with musl
is to be checked.
This commit is contained in:
sternenseemann 2022-01-04 12:30:40 +01:00 committed by sterni
parent d4b954f87c
commit 115a6f077f
3 changed files with 5 additions and 0 deletions

View file

@ -30,6 +30,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_XRAY=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF" "-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [ ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
"-DCMAKE_C_COMPILER_WORKS=ON" "-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON" "-DCMAKE_CXX_COMPILER_WORKS=ON"

View file

@ -33,6 +33,8 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF" "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF" "-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [ ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
"-DCMAKE_C_COMPILER_WORKS=ON" "-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON" "-DCMAKE_CXX_COMPILER_WORKS=ON"

View file

@ -32,6 +32,8 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_XRAY=OFF" "-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF" "-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [ ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
"-DCMAKE_C_COMPILER_WORKS=ON" "-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON" "-DCMAKE_CXX_COMPILER_WORKS=ON"