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:
@@ -128,7 +128,8 @@ public:
|
||||
bool parseArgs(ArrayRef<const char *> Args, DiagnosticEngine &Diags,
|
||||
SmallVectorImpl<std::unique_ptr<llvm::MemoryBuffer>>
|
||||
*ConfigurationFileBuffers = nullptr,
|
||||
StringRef workingDirectory = {});
|
||||
StringRef workingDirectory = {},
|
||||
StringRef mainExecutablePath = {});
|
||||
|
||||
/// Sets specific options based on the given serialized Swift binary data.
|
||||
///
|
||||
@@ -213,8 +214,11 @@ public:
|
||||
/// Computes the runtime resource path relative to the given Swift
|
||||
/// executable.
|
||||
static void computeRuntimeResourcePathFromExecutablePath(
|
||||
StringRef mainExecutablePath,
|
||||
llvm::SmallString<128> &runtimeResourcePath);
|
||||
StringRef mainExecutablePath, bool shared,
|
||||
llvm::SmallVectorImpl<char> &runtimeResourcePath);
|
||||
|
||||
/// Appends `lib/swift[_static]` to the given path
|
||||
static void appendSwiftLibDir(llvm::SmallVectorImpl<char> &path, bool shared);
|
||||
|
||||
void setSDKPath(const std::string &Path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user