Search in sources :

Example 1 with StripStep

use of com.facebook.buck.cxx.StripStep in project buck by facebook.

the class StripLinkable method getBuildSteps.

@Override
public ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext) {
    ImmutableList.Builder<Step> steps = ImmutableList.builder();
    steps.add(new MkdirStep(getProjectFilesystem(), resultDir));
    Path output = context.getSourcePathResolver().getRelativePath(getSourcePathToOutput());
    steps.add(new StripStep(getProjectFilesystem().getRootPath(), stripTool.getEnvironment(context.getSourcePathResolver()), stripTool.getCommandPrefix(context.getSourcePathResolver()), ImmutableList.of("--strip-unneeded"), context.getSourcePathResolver().getAbsolutePath(sourcePathToStrip), output));
    buildableContext.recordArtifact(output);
    return steps.build();
}
Also used : ExplicitBuildTargetSourcePath(com.facebook.buck.rules.ExplicitBuildTargetSourcePath) SourcePath(com.facebook.buck.rules.SourcePath) Path(java.nio.file.Path) ImmutableList(com.google.common.collect.ImmutableList) MkdirStep(com.facebook.buck.step.fs.MkdirStep) StripStep(com.facebook.buck.cxx.StripStep) Step(com.facebook.buck.step.Step) MkdirStep(com.facebook.buck.step.fs.MkdirStep) StripStep(com.facebook.buck.cxx.StripStep)

Aggregations

StripStep (com.facebook.buck.cxx.StripStep)1 ExplicitBuildTargetSourcePath (com.facebook.buck.rules.ExplicitBuildTargetSourcePath)1 SourcePath (com.facebook.buck.rules.SourcePath)1 Step (com.facebook.buck.step.Step)1 MkdirStep (com.facebook.buck.step.fs.MkdirStep)1 ImmutableList (com.google.common.collect.ImmutableList)1 Path (java.nio.file.Path)1