toolchain_variant=ToolchainVariant.llvm,
)
task = self.create_task(self.context(target_roots=[cpp_lib_target]))
compiler = task.get_compiler(cpp_lib_target)
// TODO(/): test specifically which compiler is selected, traversing the PATH if necessary.
self.assertIn("llvm", compiler.path_entries[0])
After Change
self.set_options_for_scope("native-build-step", toolchain_variant=RankedValue(
rank=RankedValue.CONFIG,
value=ToolchainVariant.gnu))
self._assert_compiler_toolchain_variant("gcc", no_toolchain_variant_target)
// Test that a target-level toolchain_variant overrides a config.
cpp_lib_target = self.make_target(
"//:cpp_library",