diff options
author | Ulf Adams <ulfjack@google.com> | 2016-09-12 15:57:06 +0000 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2016-09-12 17:09:41 +0000 |
commit | 111006ea81de3cabf1ad30a3fcd83035f8f888a3 (patch) | |
tree | 144566b6cb41fbe0a2e651fbe49686fe5f0d5487 /src/test/java/com/google/devtools/build/lib/analysis/config | |
parent | 4b0832808ab1260ba75c08342ec359cfdc2c313a (diff) |
Automatically detect the setting for --cpu.
In some cases, Bazel has already been doing this.
In other cases, Bazel tried to infer the default cpu from the CROSSTOOL, but it
did not do so consistently across different configuration fragments. I.e.,
Bazel ended up with an inconsistent set of toolchains for e.g., Python, C++,
and Java.
After this change, Bazel ignores any default_cpu setting in the CROSSTOOL.
Note that the Jvm is still inconsistent with all others, as it uses "default"
as the cpu value and ignores both command-line-specified and CROSSTOOL-specified
values.
--
MOS_MIGRATED_REVID=132879102
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/analysis/config')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/analysis/config/ConfigSettingTest.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/config/ConfigSettingTest.java b/src/test/java/com/google/devtools/build/lib/analysis/config/ConfigSettingTest.java index 9e93477c19..12b837ac02 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/config/ConfigSettingTest.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/config/ConfigSettingTest.java @@ -31,13 +31,11 @@ import com.google.devtools.build.lib.rules.python.PythonConfiguration; import com.google.devtools.build.lib.testutil.TestConstants; import com.google.devtools.common.options.OptionsBase; import com.google.devtools.common.options.OptionsParser; - +import java.util.Map; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.util.Map; - /** * Tests for {@link ConfigSetting}. */ @@ -176,8 +174,6 @@ public class ConfigSettingTest extends BuildViewTestCase { " })"); assertTrue(getConfigMatchingProvider("//test:match").matches()); - assertNull(flagDefault("cpu")); - assertNotNull(crosstoolCpuDefault); assertNull(flagDefault("compiler")); assertNotNull(crosstoolCompilerDefault); } |