mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -2255,6 +2255,13 @@ bool Driver::handleImmediateArgs(const ArgList &Args, const ToolChain &TC) {
|
||||
commandLine.push_back(resourceDirArg->getValue());
|
||||
}
|
||||
|
||||
if (Args.hasFlag(options::OPT_static_executable,
|
||||
options::OPT_no_static_executable, false) ||
|
||||
Args.hasFlag(options::OPT_static_stdlib, options::OPT_no_static_stdlib,
|
||||
false)) {
|
||||
commandLine.push_back("-use-static-resource-dir");
|
||||
}
|
||||
|
||||
std::string executable = getSwiftProgramPath();
|
||||
|
||||
// FIXME: This bypasses mechanisms like -v and -###. (SR-12119)
|
||||
|
||||
Reference in New Issue
Block a user