aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java
index 4310cef570..f9fc4c3f6b 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLine.java
@@ -45,7 +45,6 @@ public final class CompileCommandLine {
@VisibleForTesting public final CcToolchainFeatures.Variables variables;
private final String actionName;
private final CppConfiguration cppConfiguration;
- private final ImmutableList<String> unfilteredCompilerOptions;
public CompileCommandLine(
Artifact sourceFile,
@@ -58,8 +57,7 @@ public final class CompileCommandLine {
CppConfiguration cppConfiguration,
CcToolchainFeatures.Variables variables,
String actionName,
- DotdFile dotdFile,
- ImmutableList<String> unfilteredCompilerOptions) {
+ DotdFile dotdFile) {
this.sourceFile = Preconditions.checkNotNull(sourceFile);
this.outputFile = Preconditions.checkNotNull(outputFile);
this.sourceLabel = Preconditions.checkNotNull(sourceLabel);
@@ -71,7 +69,6 @@ public final class CompileCommandLine {
this.variables = variables;
this.actionName = actionName;
this.dotdFile = isGenerateDotdFile(sourceFile) ? Preconditions.checkNotNull(dotdFile) : null;
- this.unfilteredCompilerOptions = unfilteredCompilerOptions;
}
/** Returns true if Dotd file should be generated. */
@@ -164,7 +161,7 @@ public final class CompileCommandLine {
// the user provided options, otherwise users adding include paths will not pick up their
// own include paths first.
if (!isObjcCompile(actionName)) {
- options.addAll(unfilteredCompilerOptions);
+ options.addAll(toolchain.getUnfilteredCompilerOptions(features));
}
// Add the options of --per_file_copt, if the label or the base name of the source file