diff options
author | 2017-12-04 07:57:15 -0800 | |
---|---|---|
committer | 2017-12-04 07:59:26 -0800 | |
commit | a9c6d0ececfbf113d02ab4d6feb674d293158ad1 (patch) | |
tree | fc24e86c53e416c534a90f026278134348e6d914 /src/main/java/com/google/devtools/build/lib/rules | |
parent | e5fb5f07ba9fe0dc40fc2d6039973dab5794f876 (diff) |
Remove `-R` flags from the MacOS crosstool template.
Fixes https://github.com/bazelbuild/bazel/issues/4028
Closes #4029.
PiperOrigin-RevId: 177813419
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java index 2bccd1c9be..9a28f7b5c9 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java @@ -910,24 +910,26 @@ public class CppActionConfigs { " flag: '-o'", " flag: '%{output_file}'", " }", - " flag_group {", - " flag: '-R'", - " flag: '.gnu.switches.text.quote_paths'", - " flag: '-R'", - " flag: '.gnu.switches.text.bracket_paths'", - " flag: '-R'", - " flag: '.gnu.switches.text.system_paths'", - " flag: '-R'", - " flag: '.gnu.switches.text.cpp_defines'", - " flag: '-R'", - " flag: '.gnu.switches.text.cpp_includes'", - " flag: '-R'", - " flag: '.gnu.switches.text.cl_args'", - " flag: '-R'", - " flag: '.gnu.switches.text.lipo_info'", - " flag: '-R'", - " flag: '.gnu.switches.text.annotation'", - " }", + ifLinux( + platform, + " flag_group {", + " flag: '-R'", + " flag: '.gnu.switches.text.quote_paths'", + " flag: '-R'", + " flag: '.gnu.switches.text.bracket_paths'", + " flag: '-R'", + " flag: '.gnu.switches.text.system_paths'", + " flag: '-R'", + " flag: '.gnu.switches.text.cpp_defines'", + " flag: '-R'", + " flag: '.gnu.switches.text.cpp_includes'", + " flag: '-R'", + " flag: '.gnu.switches.text.cl_args'", + " flag: '-R'", + " flag: '.gnu.switches.text.lipo_info'", + " flag: '-R'", + " flag: '.gnu.switches.text.annotation'", + " }"), " flag_group {", " iterate_over: 'stripopts'", " flag: '%{stripopts}'", @@ -1045,6 +1047,7 @@ public class CppActionConfigs { } private static String ifLinux(CppPlatform platform, String... lines) { + // Platform `LINUX` also includes FreeBSD. return ifTrue(platform == CppPlatform.LINUX, lines); } |