Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove invalid swift-stdlib-tool invokation parameters #72

Open
wants to merge 3 commits into
base: ifood/dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/com/facebook/buck/apple/AppleBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ public class AppleBundle extends AbstractBuildRule
@AddToRuleKey private final Tool codesign;

@AddToRuleKey private final Optional<Tool> swiftStdlibTool;

@AddToRuleKey private final Optional<Tool> bitcodeStripTool;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if the concurrency .dylib is added already without bitcode?

@AddToRuleKey private final ImmutableList<String> codesignFlags;

@AddToRuleKey private final Optional<String> codesignIdentitySubjectName;
Expand Down Expand Up @@ -260,7 +258,6 @@ public class AppleBundle extends AbstractBuildRule
appleCxxPlatform.getSwiftPlatform().isPresent()
? appleCxxPlatform.getSwiftPlatform().get().getSwiftStdlibTool()
: Optional.empty();
this.bitcodeStripTool = appleCxxPlatform.getBitcodeStripTool();

this.skipCopyingSwiftStdlib = skipCopyingSwiftStdlib;
this.codesignTimeout = codesignTimeout;
Expand Down Expand Up @@ -1114,7 +1111,6 @@ public void addSwiftStdlibStepIfNeeded(
subfolderPaths,
codeSignIdentitySupplier,
withDownwardApi,
bitcodeStripTool.get().getCommandPrefix(resolver),
swiftStdlibConcurrencyLibsOnly));
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/com/facebook/buck/apple/AppleToolchainDescription.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ public BuildRule createBuildRule(
.setAppleSdkPaths(sdkPaths)
.setAppleSdk(sdk)
.setWatchKitStubBinary(args.getWatchKitStubBinary())
.setBitcodeStripTool(args.getBitcodeStripTool()
.map(path -> Tools.resolveTool(path, actionGraphBuilder)))
.build();

return new AppleToolchainBuildRule(
Expand Down Expand Up @@ -313,6 +311,5 @@ interface AbstractAppleToolchainDescriptionArg extends BuildRuleArg {

/** WatchKit stub binary (WK) */
Optional<SourcePath> getWatchKitStubBinary();
Optional<SourcePath> getBitcodeStripTool();
}
}
7 changes: 0 additions & 7 deletions src/com/facebook/buck/apple/SwiftStdlibStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ class SwiftStdlibStep implements Step {

private final Optional<Supplier<CodeSignIdentity>> codeSignIdentitySupplier;

private final ImmutableList<String> bitcodeStripToolPath;

private final boolean swiftStdlibConcurrencyLibsOnly;

public SwiftStdlibStep(
Expand All @@ -74,7 +72,6 @@ public SwiftStdlibStep(
Iterable<Path> additionalFoldersToScan,
Optional<Supplier<CodeSignIdentity>> codeSignIdentitySupplier,
boolean withDownwardApi,
ImmutableList<String> bitcodeStripToolPath,
boolean swiftStdlibConcurrencyLibsOnly) {
this.workingDirectory = workingDirectory;
this.sdkPath = sdkPath;
Expand All @@ -85,7 +82,6 @@ public SwiftStdlibStep(
this.binaryPathToScan = binaryPathToScan;
this.additionalFoldersToScan = additionalFoldersToScan;
this.codeSignIdentitySupplier = codeSignIdentitySupplier;
this.bitcodeStripToolPath = bitcodeStripToolPath;
this.swiftStdlibConcurrencyLibsOnly = swiftStdlibConcurrencyLibsOnly;
}

Expand All @@ -108,9 +104,6 @@ private ImmutableList<String> getSwiftStdlibCommand() {
"--sign", CodeSignStep.getIdentityArg(codeSignIdentitySupplier.get().get()));
}

swiftStdlibCommand.add("--strip-bitcode-tool");
swiftStdlibCommand.addAll(bitcodeStripToolPath);

return swiftStdlibCommand.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public abstract class AppleCxxPlatform implements FlavorConvertible {

// Xcode build identifier, e.g. 7C1002
public abstract Optional<String> getXcodeBuildVersion();
public abstract Optional<Tool> getBitcodeStripTool();

@Override
public Flavor getFlavor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,6 @@ public static AppleCxxPlatform buildWithXcodeToolFinder(
getOptionalXcodeTool(
filesystem, toolSearchPaths, xcodeToolFinder, appleConfig, "dwarfdump", version);

Optional<Tool> bitcodeStrip =
getOptionalXcodeTool(
filesystem, toolSearchPaths, xcodeToolFinder, appleConfig, "bitcode_strip", version);

// We are seeing a stack overflow in dsymutil during (fat) LTO
// builds. Upstream dsymutil was patched to avoid recursion in the
// offending path in https://reviews.llvm.org/D48899, and
Expand Down Expand Up @@ -577,8 +573,7 @@ public static AppleCxxPlatform buildWithXcodeToolFinder(
.setCodesignAllocate(
getOptionalTool(
"codesign_allocate", toolSearchPaths, xcodeToolFinder, version, filesystem))
.setCodesignProvider(appleConfig.getCodesignProvider())
.setBitcodeStripTool(bitcodeStrip);
.setCodesignProvider(appleConfig.getCodesignProvider());

return platformBuilder.build();
}
Expand Down Expand Up @@ -663,10 +658,6 @@ private static Optional<SwiftPlatform> getSwiftPlatform(
.add("--strip-bitcode")
.add("--platform")
.add(platformName);
for (Path toolchainPath : sdkPaths.getToolchainPaths()) {
swiftStdlibToolParamsBuilder.add("--toolchain").add(toolchainPath.toString());
}

Optional<VersionedTool> swiftc =
getOptionalToolWithParams(
"swiftc", toolSearchPaths, xcodeToolFinder, version, ImmutableList.of(), filesystem);
Expand Down