diff options
author | 2017-08-04 15:56:54 +0200 | |
---|---|---|
committer | 2017-08-04 17:19:12 +0200 | |
commit | 2079a5ca8b3adc645a6df1968f1bd616eab010ca (patch) | |
tree | 13be6bfe163123051d70a14f9e1604656588cfe7 /src/main/java/com/google/devtools/build | |
parent | fe9ba893c0ebec19228086356af5fa8d81f2809b (diff) |
Make sure copts is the last feature in osx crosstools
Change https://github.com/bazelbuild/bazel/commit/646cfd81793fc3b87979089aab873310d14e95e6 moved copts to the build variable and in order to keep the
ordering of the flags as before the copts feature needs to be the last feature
in the toolchain. Osx crosstool generator sometimes appended additional
features, that broke this assumption. This cl makes sure copts is the last
feature. In addition, flags directly from action_config will be added first, not
last as they were before.
RELNOTES: Flags from action_config get added first to the command line first,
before the flags from features.
PiperOrigin-RevId: 164257469
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java | 8 |
1 files changed, 4 insertions, 4 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 b06e89d71c..705dc80a26 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 @@ -1719,16 +1719,16 @@ public class CcToolchainFeatures implements Serializable { */ public List<String> getCommandLine(String action, Variables variables) { List<String> commandLine = new ArrayList<>(); - for (Feature feature : enabledFeatures) { - feature.expandCommandLine(action, variables, enabledFeatureNames, commandLine); - } - if (actionIsConfigured(action)) { actionConfigByActionName .get(action) .expandCommandLine(variables, enabledFeatureNames, commandLine); } + for (Feature feature : enabledFeatures) { + feature.expandCommandLine(action, variables, enabledFeatureNames, commandLine); + } + return commandLine; } |