Skip to content

Commit 1a38168

Browse files
committed
Fix relative libLTO path
1 parent 7fa9fcf commit 1a38168

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Driver/DarwinToolChains.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ void toolchains::Darwin::addLTOLibArgs(ArgStringList &Arguments,
330330
// Xcode toolchain.
331331
StringRef P = llvm::sys::path::parent_path(getDriver().getSwiftProgramPath());
332332
llvm::SmallString<128> LibLTOPath(P);
333+
llvm::sys::path::remove_filename(LibLTOPath); // Remove '/bin'
333334
llvm::sys::path::append(LibLTOPath, "lib");
334335
llvm::sys::path::append(LibLTOPath, "libLTO.dylib");
335336
if (llvm::sys::fs::exists(LibLTOPath)) {

0 commit comments

Comments
 (0)