aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
diff options
context:
space:
mode:
authorGravatar hlopko <hlopko@google.com>2018-08-03 04:20:43 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-03 04:22:52 -0700
commit4ba162ee5bfaae996ab3db9e6d47e669efb010a3 (patch)
tree2258a5d03870714387463b38d8a7f505a5f6856e /src/main/java/com/google/devtools/build/lib/rules
parented75f38d5857177bd7730b60c9fd3eb66dea5300 (diff)
Polish archiver_flags feature to behave better with the toolchain api
With this fix we can get archiver flags from the Skylark API to the C++ toolchain even when we don't pass output_file RELNOTES: None. PiperOrigin-RevId: 207248839
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.java15
1 files changed, 7 insertions, 8 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 b6b2e733b1..1bb49fecaa 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
@@ -634,16 +634,15 @@ public class CppActionConfigs {
"feature {",
" name: 'archiver_flags'",
" flag_set {",
- " expand_if_all_available: 'output_execpath'",
" action: 'c++-link-static-library'",
" flag_group {",
- ifLinux(platform, "flag: 'rcsD'", "flag: '%{output_execpath}'"),
- ifMac(
- platform,
- " flag: '-static'",
- " flag: '-s'",
- " flag: '-o'",
- " flag: '%{output_execpath}'"),
+ ifLinux(platform, "flag: 'rcsD'"),
+ ifMac(platform, "flag: '-static'", "flag: '-s'"),
+ " }",
+ " flag_group {",
+ " expand_if_all_available: 'output_execpath'",
+ ifLinux(platform, "flag: '%{output_execpath}'"),
+ ifMac(platform, "flag: '-o'", "flag: '%{output_execpath}'"),
" }",
" }",
" flag_set { ",