From b9f89e6542c7bed311d4167adae076be5472bbd6 Mon Sep 17 00:00:00 2001 From: Googler Date: Fri, 21 Aug 2015 19:50:36 +0000 Subject: Add the implicit output of unstripped binary for Launcher-enabled java_binary. Use stripped launcher when Fission is enabled. -- MOS_MIGRATED_REVID=101244628 --- .../devtools/build/lib/rules/cpp/CcBinary.java | 29 +--------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java') diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java index ad50ad4131..1dde2a44fd 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java @@ -266,7 +266,7 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { // Create the stripped binary, but don't add it to filesToBuild; it's only built when requested. Artifact strippedFile = ruleContext.getImplicitOutputArtifact( CppRuleClasses.CC_BINARY_STRIPPED); - createStripAction(ruleContext, cppConfiguration, executable, strippedFile); + CppHelper.createStripAction(ruleContext, cppConfiguration, executable, strippedFile); DwoArtifactsCollector dwoArtifacts = collectTransitiveDwoArtifacts(ruleContext, ccCompilationOutputs, linkStaticness); @@ -330,33 +330,6 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { .build(); } - /** - * Creates an action to strip an executable. - */ - private static void createStripAction(RuleContext context, - CppConfiguration cppConfiguration, Artifact input, Artifact output) { - context.registerAction(new SpawnAction.Builder() - .addInput(input) - .addTransitiveInputs(CppHelper.getToolchain(context).getStrip()) - .addOutput(output) - .useDefaultShellEnvironment() - .setExecutable(cppConfiguration.getStripExecutable()) - .addArguments("-S", "-p", "-o", output.getExecPathString()) - .addArguments("-R", ".gnu.switches.text.quote_paths") - .addArguments("-R", ".gnu.switches.text.bracket_paths") - .addArguments("-R", ".gnu.switches.text.system_paths") - .addArguments("-R", ".gnu.switches.text.cpp_defines") - .addArguments("-R", ".gnu.switches.text.cpp_includes") - .addArguments("-R", ".gnu.switches.text.cl_args") - .addArguments("-R", ".gnu.switches.text.lipo_info") - .addArguments("-R", ".gnu.switches.text.annotation") - .addArguments(cppConfiguration.getStripOpts()) - .addArgument(input.getExecPathString()) - .setProgressMessage("Stripping " + output.prettyPrint() + " for " + context.getLabel()) - .setMnemonic("CcStrip") - .build(context)); - } - /** * Given 'temps', traverse this target and its dependencies and collect up all * the object files, libraries, linker options, linkstamps attributes and linker scripts. -- cgit v1.2.3