aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Alex Humesky <ahumesky@google.com>2016-05-03 21:41:34 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-05-04 00:35:33 +0000
commitf787d31e2c54c6ceba05df9d5aea713610554e53 (patch)
treef06ff806e36ab66d9a499d3e522a1a2546a886d7 /src/test
parent9b97f76924decda0b342d2b6d7ed223493bcf302 (diff)
Adds the compiler to the key for selecting the cc_toolchain label in
cc_toolchain_suite. This will allow selecting the correct toolchain based on --compiler / --android_compiler. RELNOTES: The key for the map to cc_toolchain_suite.toolchains is now a string of the form "cpu|compiler" (previously, it was just "cpu"). -- MOS_MIGRATED_REVID=121418076
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSuiteTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSuiteTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSuiteTest.java
index 2250e81de4..e72ddb5efb 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSuiteTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSuiteTest.java
@@ -33,7 +33,9 @@ public class CcToolchainSuiteTest extends BuildViewTestCase {
"cc_toolchain_suite(",
" name = 'suite',",
" toolchains = { ",
- " 'cpu': ':cc-toolchain', 'k8': ':cc-toolchain', 'darwin': ':cc-toolchain' ",
+ " 'cpu|cpu-compiler': ':cc-toolchain',",
+ " 'k8|k8-compiler': ':cc-toolchain',",
+ " 'darwin|cpu-compiler': ':cc-toolchain' ",
" },",
" proto = \"\"\"",
"major_version: 'v1'",
@@ -116,5 +118,6 @@ public class CcToolchainSuiteTest extends BuildViewTestCase {
CppConfiguration cppConfig = getTargetConfiguration().getFragment(CppConfiguration.class);
assertThat(cppConfig.getTargetCpu()).isEqualTo("cpu");
assertThat(cppConfig.getAbi()).isEqualTo("cpu-abi");
+ assertThat(cppConfig.getCompiler()).isEqualTo("cpu-compiler");
}
}