nixpkgs/pkgs/build-support/cc-wrapper/add-clang-cc-cflags-before.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
482 B
Bash
Raw Permalink Normal View History

needsTarget=true
for p in "${params[@]}"; do
case "$p" in
-target | --target=*)
needsTarget=false
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
;;
esac
done
if $needsTarget && [[ $0 != *cpp ]]; then
extraBefore+=(-target @defaultTarget@ @machineFlags@)
fi