overlays/linux-lava: get rid of --target warning
This commit is contained in:
parent
e7d5efd169
commit
2d85d6635b
1 changed files with 5 additions and 1 deletions
|
|
@ -1,12 +1,16 @@
|
|||
self: super: let
|
||||
llvmPackages = super.llvmPackages_19;
|
||||
clangVersion = super.lib.versions.major llvmPackages.libclang.version;
|
||||
addFlagsScript = "$out/nix-support/add-local-cc-cflags-before.sh";
|
||||
cc = llvmPackages.stdenv.cc.override {
|
||||
# :sob: see https://github.com/NixOS/nixpkgs/issues/142901
|
||||
bintools = llvmPackages.bintools;
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/368850
|
||||
extraBuildCommands = ''
|
||||
cat <(echo "NIX_CC_WRAPPER_SUPPRESS_TARGET_WARNING=1") "${addFlagsScript}" > "${addFlagsScript}.new"
|
||||
mv "${addFlagsScript}.new" "${addFlagsScript}"
|
||||
substituteInPlace "$out/nix-support/cc-cflags" --replace " -nostdlibinc" ""
|
||||
substituteInPlace "$out/nix-support/add-local-cc-cflags-before.sh" --replace 'echo "Warning: supplying the --target argument to a nix-wrapped compiler may not work correctly - cc-wrapper is currently not designed with multi-target compilers in mind. You may want to use an un-wrapped compiler instead." >&2' ""
|
||||
echo " -resource-dir=${llvmPackages.libclang.lib}/lib/clang/${clangVersion}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue