mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Properly compute resource folder when linking statically
- deduplicate the logic to compute the resource folder - install headers and module files in shared and static resource folders - forward -static flag when calling swiftc with -print-target-info
This commit is contained in:
@@ -2462,17 +2462,18 @@ int swift::performFrontend(ArrayRef<const char *> Args,
|
||||
}
|
||||
|
||||
CompilerInvocation Invocation;
|
||||
std::string MainExecutablePath = llvm::sys::fs::getMainExecutable(Argv0,
|
||||
MainAddr);
|
||||
Invocation.setMainExecutablePath(MainExecutablePath);
|
||||
|
||||
SmallString<128> workingDirectory;
|
||||
llvm::sys::fs::current_path(workingDirectory);
|
||||
|
||||
std::string MainExecutablePath =
|
||||
llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
|
||||
|
||||
// Parse arguments.
|
||||
SmallVector<std::unique_ptr<llvm::MemoryBuffer>, 4> configurationFileBuffers;
|
||||
if (Invocation.parseArgs(Args, Instance->getDiags(),
|
||||
&configurationFileBuffers, workingDirectory)) {
|
||||
&configurationFileBuffers, workingDirectory,
|
||||
MainExecutablePath)) {
|
||||
return finishDiagProcessing(1, /*verifierEnabled*/ false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user