Index: ELF/Driver.cpp =================================================================== --- ELF/Driver.cpp +++ ELF/Driver.cpp @@ -225,7 +225,7 @@ // Add a given library by searching it from input search paths. void LinkerDriver::addLibrary(StringRef Name) { if (Optional Path = searchLibrary(Name)) - addFile(*Path, /*WithLOption=*/true); + addFile(Saver.save(*Path), /*WithLOption=*/true); else error("unable to find library -l" + Name); }