diff options
Diffstat (limited to 'pkgs/development/tools/build-managers/bazel/bazel_7/trim-last-argument-to-gcc-if-empty.patch')
-rw-r--r-- | pkgs/development/tools/build-managers/bazel/bazel_7/trim-last-argument-to-gcc-if-empty.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/trim-last-argument-to-gcc-if-empty.patch b/pkgs/development/tools/build-managers/bazel/bazel_7/trim-last-argument-to-gcc-if-empty.patch new file mode 100644 index 0000000000000..c4a68218a0f8e --- /dev/null +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/trim-last-argument-to-gcc-if-empty.patch @@ -0,0 +1,17 @@ +diff --git a/tools/cpp/osx_cc_wrapper.sh.tpl b/tools/cpp/osx_cc_wrapper.sh.tpl +index 8264090c29..b7b9e8537a 100644 +--- a/tools/cpp/osx_cc_wrapper.sh.tpl ++++ b/tools/cpp/osx_cc_wrapper.sh.tpl +@@ -64,7 +64,11 @@ done + %{env} + + # Call the C++ compiler +-%{cc} "$@" ++if [[ ${*: -1} = "" ]]; then ++ %{cc} "${@:0:$#}" ++else ++ %{cc} "$@" ++fi + + function get_library_path() { + for libdir in ${LIB_DIRS}; do |