diff options
author | 2018-02-08 05:26:53 -0800 | |
---|---|---|
committer | 2018-02-08 05:28:55 -0800 | |
commit | 943afc78c1170e93e154edd1ef17389bae248e6b (patch) | |
tree | 0933bf969f30849e7b09407095e73a5ac7b53440 /src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java | |
parent | b116240ea496b95f8846abd76f29416b0bdc9cc9 (diff) |
Introduce -c source_file -o output_file build variables
Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and
-o flags. This cl removes this logic and relies on crosstool to emit these
flags. This is another small step towards platform independent C++ rules.
Memory use is not affected, since the build variables used by this cl are already
exposed, this cl just forces crosstools to use it.
Encore of https://github.com/bazelbuild/bazel/commit/f26e8694ae78599b3e2004e3360eaf3443fa53a6.
RELNOTES: None.
PiperOrigin-RevId: 184981106
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java index 644761235e..20ffd4015e 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java @@ -376,19 +376,19 @@ public class CcCommonTest extends BuildViewTestCase { " srcs = [ 'library.cc' ],", " nocopts = '-fPIC')"); - assertThat(getCppCompileAction("//a:pic").getArgv()).contains("-fPIC"); - assertThat(getCppCompileAction("//a:libpic.so").getArgv()).contains("-fPIC"); - assertThat(getCppCompileAction("//a:piclib").getArgv()).contains("-fPIC"); - assertThat(getCppCompileAction("//a:nopic").getArgv()).doesNotContain("-fPIC"); - assertThat(getCppCompileAction("//a:libnopic.so").getArgv()).doesNotContain("-fPIC"); - assertThat(getCppCompileAction("//a:nopiclib").getArgv()).doesNotContain("-fPIC"); + assertThat(getCppCompileAction("//a:pic").getArguments()).contains("-fPIC"); + assertThat(getCppCompileAction("//a:libpic.so").getArguments()).contains("-fPIC"); + assertThat(getCppCompileAction("//a:piclib").getArguments()).contains("-fPIC"); + assertThat(getCppCompileAction("//a:nopic").getArguments()).doesNotContain("-fPIC"); + assertThat(getCppCompileAction("//a:libnopic.so").getArguments()).doesNotContain("-fPIC"); + assertThat(getCppCompileAction("//a:nopiclib").getArguments()).doesNotContain("-fPIC"); } @Test public void testPicModeAssembly() throws Exception { useConfiguration("--cpu=k8"); scratch.file("a/BUILD", "cc_library(name='preprocess', srcs=['preprocess.S'])"); - List<String> argv = getCppCompileAction("//a:preprocess").getArgv(); + List<String> argv = getCppCompileAction("//a:preprocess").getArguments(); assertThat(argv).contains("-fPIC"); } |