Merge #98541 into staging-next
This commit is contained in:
@@ -41,6 +41,11 @@ stdenv.mkDerivation rec {
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||
# The compiler-rt build infrastructure sniffs supported platforms on Darwin
|
||||
# and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
|
||||
# when it tries to use libc++ and libc++api for i386.
|
||||
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -41,6 +41,11 @@ stdenv.mkDerivation {
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||
# The compiler-rt build infrastructure sniffs supported platforms on Darwin
|
||||
# and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
|
||||
# when it tries to use libc++ and libc++api for i386.
|
||||
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -41,6 +41,11 @@ stdenv.mkDerivation {
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||
# The compiler-rt build infrastructure sniffs supported platforms on Darwin
|
||||
# and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
|
||||
# when it tries to use libc++ and libc++api for i386.
|
||||
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -41,6 +41,11 @@ stdenv.mkDerivation {
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||
# The compiler-rt build infrastructure sniffs supported platforms on Darwin
|
||||
# and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
|
||||
# when it tries to use libc++ and libc++api for i386.
|
||||
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ stdenv, cmake, fetch, libcxx, llvm, version
|
||||
, standalone ? false
|
||||
# on musl the shared objects don't build
|
||||
, enableShared ? ! stdenv.hostPlatform.isMusl }:
|
||||
|
||||
@@ -20,7 +21,9 @@ stdenv.mkDerivation {
|
||||
patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
|
||||
'';
|
||||
|
||||
cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBCXXABI_ENABLE_SHARED=OFF";
|
||||
cmakeFlags =
|
||||
stdenv.lib.optional standalone "-DLLVM_ENABLE_LIBCXX=ON" ++
|
||||
stdenv.lib.optional (!enableShared) "-DLIBCXXABI_ENABLE_SHARED=OFF";
|
||||
|
||||
installPhase = if stdenv.isDarwin
|
||||
then ''
|
||||
|
||||
@@ -41,6 +41,11 @@ stdenv.mkDerivation {
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||
# The compiler-rt build infrastructure sniffs supported platforms on Darwin
|
||||
# and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
|
||||
# when it tries to use libc++ and libc++api for i386.
|
||||
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -41,6 +41,11 @@ stdenv.mkDerivation rec {
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
] ++ stdenv.lib.optionals (bareMetal) [
|
||||
"-DCOMPILER_RT_OS_DIR=baremetal"
|
||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform.isDarwin) [
|
||||
# The compiler-rt build infrastructure sniffs supported platforms on Darwin
|
||||
# and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
|
||||
# when it tries to use libc++ and libc++api for i386.
|
||||
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
Reference in New Issue
Block a user