mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #76620 from rmaz/sdkprefix
Do not prefix relative SDK paths twice
This commit is contained in:
@@ -1828,7 +1828,7 @@ bool ModuleFileSharedCore::hasSourceInfo() const {
|
||||
std::string ModuleFileSharedCore::resolveModuleDefiningFilePath(const StringRef SDKPath) const {
|
||||
if (!ModuleInterfacePath.empty()) {
|
||||
std::string interfacePath = ModuleInterfacePath.str();
|
||||
if (llvm::sys::path::is_relative(interfacePath)) {
|
||||
if (llvm::sys::path::is_relative(interfacePath) && !ModuleInterfacePath.starts_with(SDKPath)) {
|
||||
SmallString<128> absoluteInterfacePath(SDKPath);
|
||||
llvm::sys::path::append(absoluteInterfacePath, interfacePath);
|
||||
return absoluteInterfacePath.str().str();
|
||||
|
||||
Reference in New Issue
Block a user