about summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-08-01 16:11:33 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-08-01 13:28:53 -0400
commit0a284ae9b9585d7ff0606092d1df2c01301c2ed5 (patch)
tree16a9482f7516bc54ccdb4fda83c363e9bd2a79f3 /pkgs/development/compilers/llvm/13/compiler-rt/default.nix
parenta1fe662eb26ffc2a036b37c4670392ade632c413 (diff)
compiler-rt: Fix "bare metal" case boolean logic
It is possible to both be bare metal and have a libc (newlib).

This libc doesn't provide very much --- not enough for CMake to think
the C toolchain works. We therefore adjust our logic so we hit the "bare
metal" case with or without libc.

The "use LLVM" bootstrap is intentionally not affected.

(cherry picked from commit bf39e322721e581f972a14e18310797260f7f35f)
(cherry picked from commit c820cd8cee30f09431d8ce78dee613360052727a)
Diffstat (limited to 'pkgs/development/compilers/llvm/13/compiler-rt/default.nix')
-rw-r--r--pkgs/development/compilers/llvm/13/compiler-rt/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
index 10b89b91b96f7..7b9312eecf247 100644
--- a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation {
     "-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 && !haveLibc) || bareMetal) [
     "-DCMAKE_C_COMPILER_WORKS=ON"
     "-DCMAKE_CXX_COMPILER_WORKS=ON"
     "-DCOMPILER_RT_BAREMETAL_BUILD=ON"