aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar hlopko <hlopko@google.com>2018-02-01 08:07:00 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-01 08:08:57 -0800
commit186068f8e2afcfcbb3e15f8791a7df0407217483 (patch)
tree669a97a29628d0756c804dd0f9231406f4fc0dab /src/main
parenta904b85376251775d58852a0e8480c0db032bac8 (diff)
Automated rollback of commit aa8ce5653f92473b331e500a3614245dae38dfc4.
*** Reason for rollback *** Breaks //third_party/msvc crosstool *** Original change description *** RELNOTES: Fix how libraries to link is specified to archiver actions. start-lib/end-lib should not be passed to ar. Fix how the libraries to link are passed to ar by not using the generic feature "libraries_to_link" PiperOrigin-RevId: 184140734
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java33
1 files changed, 8 insertions, 25 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 bab2726259..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
@@ -455,6 +455,7 @@ public class CppActionConfigs {
" tool_path: '" + arToolPath + "'",
" }",
" implies: 'archiver_flags'",
+ " implies: 'libraries_to_link'",
" implies: 'linker_param_file'",
"}",
"action_config {",
@@ -464,6 +465,7 @@ public class CppActionConfigs {
" tool_path: '" + arToolPath + "'",
" }",
" implies: 'archiver_flags'",
+ " implies: 'libraries_to_link'",
" implies: 'linker_param_file'",
"}",
"action_config {",
@@ -473,6 +475,7 @@ public class CppActionConfigs {
" tool_path: '" + arToolPath + "'",
" }",
" implies: 'archiver_flags'",
+ " implies: 'libraries_to_link'",
" implies: 'linker_param_file'",
"}",
"action_config {",
@@ -482,6 +485,7 @@ public class CppActionConfigs {
" tool_path: '" + arToolPath + "'",
" }",
" implies: 'archiver_flags'",
+ " implies: 'libraries_to_link'",
" implies: 'linker_param_file'",
"}",
ifTrue(
@@ -613,31 +617,6 @@ public class CppActionConfigs {
" flag: '%{output_execpath}'"),
" }",
" }",
- " flag_set { ",
- " expand_if_all_available: 'libraries_to_link'",
- " action: 'c++-link-static-library'",
- " action: 'c++-link-alwayslink-static-library'",
- " action: 'c++-link-pic-static-library'",
- " action: 'c++-link-alwayslink-pic-static-library'",
- " flag_group {",
- " iterate_over: 'libraries_to_link'",
- " flag_group {",
- " expand_if_equal {",
- " variable: 'libraries_to_link.type'",
- " value: 'object_file'",
- " }",
- " flag: '%{libraries_to_link.name}'",
- " }",
- " flag_group {",
- " expand_if_equal {",
- " variable: 'libraries_to_link.type'",
- " value: 'object_file_group'",
- " }",
- " iterate_over: 'libraries_to_link.object_files'",
- " flag: '%{libraries_to_link.object_files}'",
- " }",
- " }",
- " }",
"}"),
ifTrue(
!existingFeatureNames.contains("libraries_to_link"),
@@ -647,6 +626,10 @@ public class CppActionConfigs {
" expand_if_all_available: 'libraries_to_link'",
" action: 'c++-link-executable'",
" action: 'c++-link-dynamic-library'",
+ " action: 'c++-link-static-library'",
+ " action: 'c++-link-alwayslink-static-library'",
+ " action: 'c++-link-pic-static-library'",
+ " action: 'c++-link-alwayslink-pic-static-library'",
" flag_group {",
" iterate_over: 'libraries_to_link'",
" flag_group {",