From 4ba162ee5bfaae996ab3db9e6d47e669efb010a3 Mon Sep 17 00:00:00 2001 From: hlopko Date: Fri, 3 Aug 2018 04:20:43 -0700 Subject: 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 --- .../devtools/build/lib/rules/cpp/CppActionConfigs.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp') 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 { ", -- cgit v1.2.3