From 1c0bc2dece2a79d78a1caaea6b671b5341003a46 Mon Sep 17 00:00:00 2001 From: hlopko Date: Mon, 26 Feb 2018 09:06:16 -0800 Subject: Hide fix for linkstmap inputs computation behind an option This cl introduces a bazel option (--experimental_fix_linkstamp_inputs_bug_73447914) to control which inputs get added into C++ linkstamp compile action. When set to true (defaults to false), all inputs of relevant C++ linking action get added as inputs to the linkstamp compile action too. RELNOTES: None. PiperOrigin-RevId: 187030217 --- .../devtools/build/lib/rules/cpp/CppLinkstampCompileHelperTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/test/java/com/google/devtools/build') 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 8232f823ca..501c9b1a2c 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(); + useConfiguration("--experimental_fix_linkstamp_inputs_bug"); 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(); + useConfiguration("--experimental_fix_linkstamp_inputs_bug"); scratch.file( "x/BUILD", "cc_binary(", @@ -198,6 +198,7 @@ public class CppLinkstampCompileHelperTest extends BuildViewTestCase { " srcs = [ 'bar.cc' ],", " linkstamp = 'ls.cc',", ")"); + useConfiguration("--experimental_fix_linkstamp_inputs_bug"); ConfiguredTarget target = getConfiguredTarget("//x:foo"); Artifact executable = getExecutable(target); -- cgit v1.2.3