stdenvBootstrapTools: fix cycle on aarch64-darwin
This commit is contained in:
parent
ee0190d830
commit
e0c70d5e0f
@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
|||||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
] ++ lib.optionals (haveLibc && !isMusl) [
|
] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
|
||||||
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
||||||
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
|
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
|
||||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation {
|
|||||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
] ++ lib.optionals (haveLibc && !isMusl) [
|
] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
|
||||||
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
||||||
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [
|
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [
|
||||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation {
|
|||||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
] ++ lib.optionals (haveLibc && !isMusl) [
|
] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
|
||||||
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
||||||
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
|
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
|
||||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||||
|
@ -28,7 +28,7 @@ stdenv.mkDerivation {
|
|||||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
] ++ lib.optionals (haveLibc && !isMusl) [
|
] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
|
||||||
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
||||||
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [
|
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [
|
||||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation {
|
|||||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
] ++ lib.optionals (haveLibc && !isMusl) [
|
] ++ lib.optionals (haveLibc && stdenv.hostPlatform.isGnu) [
|
||||||
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
|
||||||
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
|
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
|
||||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{ lib, stdenv, makeWrapper, writeText, writeShellScriptBin, runCommand
|
{ lib, stdenv, makeWrapper, writeText, writeTextFile, runCommand, callPackage
|
||||||
, CoreServices, ImageIO, CoreGraphics
|
, CoreServices, ImageIO, CoreGraphics
|
||||||
, runtimeShell, callPackage
|
|
||||||
, xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX"
|
, xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX"
|
||||||
, xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1"
|
, xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1"
|
||||||
, sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" }:
|
, sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" }:
|
||||||
@ -37,7 +36,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
xcode-select = writeText "xcode-select" ''
|
xcode-select = writeText "xcode-select" ''
|
||||||
#!${runtimeShell}
|
#!${stdenv.shell}
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | --help) ;; # noop
|
-h | --help) ;; # noop
|
||||||
@ -51,7 +50,12 @@ while [ $# -gt 0 ]; do
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
xcrun = writeShellScriptBin "xcrun" ''
|
xcrun = writeTextFile {
|
||||||
|
name = "xcrun";
|
||||||
|
executable = true;
|
||||||
|
destination = "/bin/xcrun";
|
||||||
|
text = ''
|
||||||
|
#!${stdenv.shell}
|
||||||
args=( "$@" )
|
args=( "$@" )
|
||||||
|
|
||||||
# If an SDK was requested, check that it matches.
|
# If an SDK was requested, check that it matches.
|
||||||
@ -94,7 +98,11 @@ done
|
|||||||
if ! [[ -z "$@" ]]; then
|
if ! [[ -z "$@" ]]; then
|
||||||
exec "$@"
|
exec "$@"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
checkPhase = ''
|
||||||
|
${stdenv.shellDryRun} "$target"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user