use of com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.Variables in project bazel by bazelbuild.
the class LinkBuildVariablesTest method testLibrarySearchDirectoriesAreExported.
@Test
public void testLibrarySearchDirectoriesAreExported() throws Exception {
AnalysisMock.get().ccSupport().setupCrosstool(mockToolsConfig);
useConfiguration();
scratch.file("x/BUILD", "cc_binary(name = 'bin', srcs = ['some-dir/bar.so'])");
scratch.file("x/some-dir/bar.so");
ConfiguredTarget target = getConfiguredTarget("//x:bin");
Variables variables = getLinkBuildVariables(target, Link.LinkTargetType.EXECUTABLE);
List<String> variableValue = getVariableValue(variables, CppLinkActionBuilder.LIBRARY_SEARCH_DIRECTORIES_VARIABLE);
assertThat(Iterables.getOnlyElement(variableValue)).contains("some-dir");
}
Aggregations