Revert "ELF: Add /lib and /usr/lib as default search paths."
It was causing errors like
/lib/libc.so.6 is incompatible with elf_x86_64
when linking on Fedora.
Every system has different default paths. It seems better to just trust
the driver to pass the correct -L options.
This reverts commit 262910.
llvm-svn: 262941
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index f9ab4db..b4580b5 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -396,9 +396,7 @@
void ScriptParser::readSearchDir() {
expect("(");
- StringRef Path = next();
- if (!Config->Nostdlib)
- Config->SearchPaths.push_back(Path);
+ Config->SearchPaths.push_back(next());
expect(")");
}