boost-build: fix overriding target when llvm

This commit is contained in:
Tristan Ross 2024-07-25 10:54:40 -07:00
parent fea99da2bd
commit f47e3afc1e
No known key found for this signature in database
GPG Key ID: B09C422035669AF8
2 changed files with 16 additions and 1 deletions

View File

@ -33,7 +33,8 @@ stdenv.mkDerivation {
sourceRoot="$sourceRoot/tools/build"
'';
patches = useBoost.boostBuildPatches or [];
patches = useBoost.boostBuildPatches or []
++ lib.optional (useBoost ? version && lib.versionAtLeast useBoost.version "1.81") ./fix-clang-target.patch;
# Upstream defaults to gcc on darwin, but we use clang.
postPatch = ''

View File

@ -0,0 +1,14 @@
--- a/src/tools/clang.jam 2024-07-25 10:38:16.278401900 -0700
+++ b/src/tools/clang.jam 2024-07-25 10:38:52.659750666 -0700
@@ -90,11 +90,6 @@
case x86-64 : arch = x86_64 ;
case x86-32 : arch = i386 ;
}
-
- toolset.flags $(toolset)
- OPTIONS $(condition)/<target-os>$(target-os)/<architecture>$(_architecture_)/<address-model>$(_address-model_)
- : "--target=$(arch)-$(vendor-sys)"
- : unchecked ;
}
}
}