diff options
author | hlopko <hlopko@google.com> | 2018-03-05 04:29:33 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-05 04:31:11 -0800 |
commit | a7f95e63a11c21858bb16aa6f3a5e1eabd224187 (patch) | |
tree | ad52498d7d350270f34fd730b391d659501180f6 /src/test/java/com/google/devtools/build | |
parent | ec551029e58a7d1f06cc7af1d3d964ae55b846ff (diff) |
Do not upload link inputs of the linkstamp compile actions to the executor
Link inputs are there only to invalidate the action, they don't affect the
execution of the compile action. This cl optimizes the action execution by not
having to collect unnecessary inputs into the sandbox.
Since this is CppCompileAction and nothing is easy here, let me elaborate on my
assumptions. The goal of this cl is to stop passing unneeded inputs into Spawns.
This is implemented by introducing a dispensableInputs field to the
CppCompileAction. SpawnGccStrategy then doesn't forward these further.
I'm not adding dispensableInputs to the ActionKey. I think it's enough to put
them to the inputs and into the updateActionInputs method.
RELNOTES: None.
PiperOrigin-RevId: 187849482
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java index 501c9b1a2c..7b588c56ad 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java @@ -38,7 +38,7 @@ public class CppLinkstampCompileHelperTest extends BuildViewTestCase { AnalysisMock.get() .ccSupport() .setupCrosstool(mockToolsConfig, "builtin_sysroot: '/usr/local/custom-sysroot'"); - useConfiguration("--experimental_fix_linkstamp_inputs_bug"); + useConfiguration(); scratch.file( "x/BUILD", "cc_binary(", @@ -92,7 +92,7 @@ public class CppLinkstampCompileHelperTest extends BuildViewTestCase { AnalysisMock.get() .ccSupport() .setupCrosstool(mockToolsConfig, "builtin_sysroot: '/usr/local/custom-sysroot'"); - useConfiguration("--experimental_fix_linkstamp_inputs_bug"); + useConfiguration(); scratch.file( "x/BUILD", "cc_binary(", @@ -181,8 +181,8 @@ public class CppLinkstampCompileHelperTest extends BuildViewTestCase { * Regression test for b/73447914: Linkstamps were not re-built when only volatile data changed, * i.e. when we modified cc_binary source, linkstamp was not recompiled so we got old timestamps. * The proper behavior is to recompile linkstamp whenever any input to cc_binary action changes. - * And the current implementation solves this by adding all linking inputs as inputs to linkstamp - * compile action. + * And the current implementation solves this by adding all linking inputs as + * inputsForInvalidation to linkstamp compile action. */ @Test public void testLinkstampCompileDependsOnAllCcBinaryLinkingInputs() throws Exception { @@ -198,7 +198,7 @@ public class CppLinkstampCompileHelperTest extends BuildViewTestCase { " srcs = [ 'bar.cc' ],", " linkstamp = 'ls.cc',", ")"); - useConfiguration("--experimental_fix_linkstamp_inputs_bug"); + useConfiguration(); ConfiguredTarget target = getConfiguredTarget("//x:foo"); Artifact executable = getExecutable(target); |