stdenvBootstrapTools: fix cycle on aarch64-darwin

This commit is contained in:
Stéphan Kochen 2022-10-20 12:42:47 +02:00
parent ee0190d830
commit e0c70d5e0f
6 changed files with 18 additions and 10 deletions

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_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"
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_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"
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isNewDarwinBootstrap) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_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"
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_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"
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isAarch64) [
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"

View File

@ -38,7 +38,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_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"
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"

View File

@ -1,6 +1,5 @@
{ lib, stdenv, makeWrapper, writeText, writeShellScriptBin, runCommand
{ lib, stdenv, makeWrapper, writeText, writeTextFile, runCommand, callPackage
, CoreServices, ImageIO, CoreGraphics
, runtimeShell, callPackage
, xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX"
, xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1"
, sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" }:
@ -37,7 +36,7 @@ let
'';
xcode-select = writeText "xcode-select" ''
#!${runtimeShell}
#!${stdenv.shell}
while [ $# -gt 0 ]; do
case "$1" in
-h | --help) ;; # noop
@ -51,7 +50,12 @@ while [ $# -gt 0 ]; do
done
'';
xcrun = writeShellScriptBin "xcrun" ''
xcrun = writeTextFile {
name = "xcrun";
executable = true;
destination = "/bin/xcrun";
text = ''
#!${stdenv.shell}
args=( "$@" )
# If an SDK was requested, check that it matches.
@ -94,7 +98,11 @@ done
if ! [[ -z "$@" ]]; then
exec "$@"
fi
'';
'';
checkPhase = ''
${stdenv.shellDryRun} "$target"
'';
};
in