Do not add archiver_flags feature when crosstool already has one.
This is needed for migrating one of the internal crosstools
RELNOTES: None.
@@ -255,6 +255,8 @@ public class CppLinkActionConfigs {
" }",
" }",
"}",
+ ifTrue(
+ !features.contains("archiver_flags"),
"feature {",
" name: 'archiver_flags'",
" flag_set {",
@@ -264,10 +266,7 @@ public class CppLinkActionConfigs {
" action: 'c++-link-pic-static-library'",
" action: 'c++-link-alwayslink-pic-static-library'",
" flag_group {",
- ifLinux(
- platform,
- " flag: 'rcsD'",
- " flag: '%{output_execpath}'"),
+ ifLinux(platform, " flag: 'rcsD'", " flag: '%{output_execpath}'"),
ifMac(
platform,
" flag: '-static'",
@@ -276,7 +275,7 @@ public class CppLinkActionConfigs {
" flag: '%{output_execpath}'"),
" }",
" }",
- "}",
+ "}"),
"feature {",
" name: 'libraries_to_link'",
" flag_set {",
