mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
cc-wrapper: heed NIX_CC_WRAPPER_SUPPRESS_TARGET_WARNING
in rare cases emitting such a warning can cause build scripts or test harnesses to get confused, so provide a universal way to shut this up even if your target doesn't precisely match the system's
This commit is contained in:
parent
d0c5c1cb15
commit
2a23ed26a9
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ while (("$n" < "$nParams")); do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if $targetPassed && [[ "$targetValue" != "@defaultTarget@" ]]; then
|
if $targetPassed && [[ "$targetValue" != "@defaultTarget@" ]] && (( "${NIX_CC_WRAPPER_SUPPRESS_TARGET_WARNING:-0}" < 1 )); then
|
||||||
echo "Warning: supplying the --target $targetValue != @defaultTarget@ 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 "Warning: supplying the --target $targetValue != @defaultTarget@ 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
|
||||||
elif [[ $0 != *cpp ]]; then
|
elif [[ $0 != *cpp ]]; then
|
||||||
extraBefore+=(-target @defaultTarget@ @machineFlags@)
|
extraBefore+=(-target @defaultTarget@ @machineFlags@)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue