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.
main
sternenseemann 2 years ago committed by sterni
parent d4b954f87c
commit 115a6f077f
  1. 1
      pkgs/development/compilers/llvm/12/compiler-rt/default.nix
  2. 2
      pkgs/development/compilers/llvm/13/compiler-rt/default.nix
  3. 2
      pkgs/development/compilers/llvm/git/compiler-rt/default.nix

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

@ -33,6 +33,8 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=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) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"

@ -32,6 +32,8 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=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) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"

Loading…
Cancel
Save