aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Manuel Klimek <klimek@google.com>2016-02-11 14:55:56 +0000
committerGravatar David Chen <dzc@google.com>2016-02-11 22:21:12 +0000
commit42267d6e9454e861ef646688e5ae838ab456af47 (patch)
tree1bbe188506dc974cf8fd368baa34678d00ba7db5 /src/main/java
parentb98cfefda6906f68dfc60e94bdf5b6d6435530f9 (diff)
Move -gsplit-dwarf before the target specific copts in the command line.
RELNOTES: Allow overriding -gsplit-dwarf from copts. -- MOS_MIGRATED_REVID=114432930
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
index 7f3120c66c..cb740b5279 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java
@@ -1350,6 +1350,14 @@ public class CppCompileAction extends AbstractAction implements IncludeScannable
addFilteredOptions(options,
featureConfiguration.getCommandLine(getActionName(), variables));
+ // TODO(bazel-team): Move this into a feature; more specifically, create a feature for both
+ // the amount of debug information requested, and whether the debug info is written in a
+ // split out file. Until then, keep this before the user-provided copts so it can be
+ // overwritten.
+ if (cppConfiguration.useFission()) {
+ options.add("-gsplit-dwarf");
+ }
+
// Users don't expect the explicit copts to be filtered by coptsFilter, add them verbatim.
// Make sure these are added after the options from the feature configuration, so that
// those options can be overriden.
@@ -1401,9 +1409,6 @@ public class CppCompileAction extends AbstractAction implements IncludeScannable
options.add("-E");
}
- if (cppConfiguration.useFission()) {
- options.add("-gsplit-dwarf");
- }
if (usePic) {
options.add("-fPIC");
}