diff options
author | Lukacs Berki <lberki@google.com> | 2016-05-19 13:10:25 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2016-05-19 16:28:16 +0000 |
commit | 7841a6ab100fc35a67600f1ce1a70d293c51350e (patch) | |
tree | e4df1ef7ae490703c0288cc26d78e4568fdbfeed /src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java | |
parent | 3930d34af88b6b2b052148b06318b012d84ab8df (diff) |
Move the command line arguments for C++ preprocessor defines to a feature.
This required a few assorted changes:
- The LIPO compilation context is not merged anymore. Include paths for auxiliary files are apparently taken from the profile files, so it is not necessary.
- The FDO build stamp is not special-cased anymore, it is treated as a preprocessor define like any other.
- When compiling a .pcm file, use interfaceContext instead of the regular context when setting up the build variables. This is a bit more consistent and would be a good cause for a future bug.
--
MOS_MIGRATED_REVID=122725179
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java | 15 |
1 files changed, 0 insertions, 15 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 f3f024d5e3..167f59268f 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 @@ -251,7 +251,6 @@ public class CppCompileAction extends AbstractAction Class<? extends CppCompileActionContext> actionContext, ImmutableList<String> copts, Predicate<String> coptsFilter, - @Nullable String fdoBuildStamp, SpecialInputsHandler specialInputsHandler, Iterable<IncludeScannable> lipoScannables, UUID actionClassId, @@ -292,7 +291,6 @@ public class CppCompileAction extends AbstractAction features, featureConfiguration, variables, - fdoBuildStamp, actionName); this.actionContext = actionContext; this.lipoScannables = lipoScannables; @@ -1267,9 +1265,6 @@ public class CppCompileAction extends AbstractAction @VisibleForTesting public final CcToolchainFeatures.Variables variables; private final String actionName; - // The value of the BUILD_FDO_TYPE macro to be defined on command line - @Nullable private final String fdoBuildStamp; - public CppCompileCommandLine( Artifact sourceFile, DotdFile dotdFile, @@ -1279,7 +1274,6 @@ public class CppCompileAction extends AbstractAction Collection<String> features, FeatureConfiguration featureConfiguration, CcToolchainFeatures.Variables variables, - @Nullable String fdoBuildStamp, String actionName) { this.sourceFile = Preconditions.checkNotNull(sourceFile); this.dotdFile = CppFileTypes.mustProduceDotdFile(sourceFile.getPath().toString()) @@ -1290,7 +1284,6 @@ public class CppCompileAction extends AbstractAction this.features = Preconditions.checkNotNull(features); this.featureConfiguration = featureConfiguration; this.variables = variables; - this.fdoBuildStamp = fdoBuildStamp; this.actionName = actionName; } @@ -1340,14 +1333,6 @@ public class CppCompileAction extends AbstractAction for (String warn : cppConfiguration.getCWarns()) { options.add("-W" + warn); } - for (String define : context.getDefines()) { - options.add("-D" + define); - } - - // Stamp FDO builds with FDO subtype string - if (fdoBuildStamp != null) { - options.add("-D" + CppConfiguration.FDO_STAMP_MACRO + "=\"" + fdoBuildStamp + "\""); - } // TODO(bazel-team): This needs to be before adding getUnfilteredCompilerOptions() and after // adding the warning flags until all toolchains are migrated; currently toolchains use the |