From fde7137e9f6bc734a9cb9fad025a09e43ad5a2c2 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Fri, 20 Mar 2015 16:52:31 +0000 Subject: Add C++ flags to C++ linkstamp compiles. In the future, we will have linkstamp flags be generated by the crosstool feature configuration, just like normal compile actions. -- MOS_MIGRATED_REVID=89131127 --- .../java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/com/google/devtools/build/lib') diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java index 1dccafa8cc..99568c94a6 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java @@ -542,6 +542,9 @@ public final class LinkCommandLine extends CommandLine { optionList.addAll(cppConfiguration.getCompilerOptions(features)); optionList.addAll(cppConfiguration.getCOptions()); optionList.addAll(cppConfiguration.getUnfilteredCompilerOptions(features)); + if (CppFileTypes.CPP_SOURCE.matches(linkstamp.getKey().getExecPath())) { + optionList.addAll(cppConfiguration.getCxxOptions(features)); + } // For dynamic libraries, produce position independent code. if (linkTargetType == LinkTargetType.DYNAMIC_LIBRARY -- cgit v1.2.3