Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
osx_cc_wrapper: Only expand existing response files (#15090)
Closes #13044 Applies the changes suggested in #13044 (comment) Not all arguments starting with `@` represent response files, e.g. `-install_name @rpath/...` or `-Xlinker -rpath -Xlinker @loader_path/...` do not refer to response files and attempting to read them as such will fail the build. Users don't always have control over these arguments, meaning transforming them to `-Wl,-install_name,@rpath/...` or `-Wl,-rpath,@loader_path/...` is not always an option. E.g. as described in #13044 (comment) where these flags are emitted by the Haskell compiler GHC (see #13044 (comment) for their reasoning). With this change `osx_cc_wrapper` will only interpret arguments starting with `@` as response files if the corresponding file exists and is readable. This is analogous to the behavior defined in `wrapped_clang.cc`. See #13044 (comment) for discussion. Closes #13148. PiperOrigin-RevId: 436207868 (cherry picked from commit efb2b80) Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
- Loading branch information