Unverified Commit 957be61c authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

ld64: fix cross-compilation install check phase

ld64 needs to build itself in its install check using a target prefix. Otherwise, ninja will not be configured with the correct target, causing the check to fail when ld64 is built for a cross-target.
parent 532781c9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -170,7 +170,9 @@ stdenv.mkDerivation (finalAttrs: {
    cd "$NIX_BUILD_TOP/$sourceRoot"

    export NIX_CFLAGS_COMPILE+=" --ld-path=$out/bin/${targetPrefix}ld"
    meson setup build-install-check -Db_lto=true --buildtype=$mesonBuildType
    meson setup build-install-check -Db_lto=true --buildtype=$mesonBuildType${
      lib.optionalString (targetPrefix != "") " -Dtarget_prefix=${targetPrefix}"
    }

    cd build-install-check
    ninja ${targetPrefix}ld "-j$NIX_BUILD_CORES"