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.
@@ -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 { ",
