aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-07-14 16:14:47 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-07-14 16:35:37 +0200
commitdb8f2080d26ec362fb18fc05372719b44f38824c (patch)
tree605e7cafc454f5b469a7a8a1fcab11420aed4d58
parent4277d438bcf5d78e10c8ce09cdddf2edd3a31392 (diff)
Add link options from feature config to the Go link line
The C++ link for Go links involving C++ objects did not add linker options from feature configurations in the crosstool to the link line. This caused failures in go_test links when linking with LIPO, since a recent change moved the necessary link options to the crosstool feature config (e.g. unknown commit), instead of explicitly specifying them for the tests. This issue affected other link types as well (I confirmed that an --fdo_instrument link of a go_binary failed because it did not pick up the necessary link options from the feature config). RELNOTES: None. PiperOrigin-RevId: 161952640
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java
index db8774d118..ec65b31da6 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java
@@ -1695,7 +1695,7 @@ public class CcToolchainFeatures implements Serializable {
/**
* @return the command line for the given {@code action}.
*/
- List<String> getCommandLine(String action, Variables variables) {
+ public List<String> getCommandLine(String action, Variables variables) {
List<String> commandLine = new ArrayList<>();
for (Feature feature : enabledFeatures) {
feature.expandCommandLine(action, variables, enabledFeatureNames, commandLine);