mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:50:51 +08:00
Fix bug in -nostdlib.
We still have to skip a token inside SEARCH_DIR() when -nostdlib is specified. Previuosly, we didn't skip it, so it caused a parse error. llvm-svn: 281001
This commit is contained in:
@@ -886,8 +886,9 @@ void ScriptParser::readPhdrs() {
|
||||
|
||||
void ScriptParser::readSearchDir() {
|
||||
expect("(");
|
||||
StringRef Tok = next();
|
||||
if (!Config->Nostdlib)
|
||||
Config->SearchPaths.push_back(next());
|
||||
Config->SearchPaths.push_back(Tok);
|
||||
expect(")");
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,9 @@
|
||||
// -nostdlib
|
||||
// RUN: echo 'SEARCH_DIR(' %t.dir ')' > %t.script
|
||||
// RUN: ld.lld -o %t3 %t.o -script %t.script -lls
|
||||
// RUN: not ld.lld -o %t3 %t.o -script %t.script -lls -nostdlib
|
||||
// RUN: not ld.lld -o %t3 %t.o -script %t.script -lls -nostdlib \
|
||||
// RUN: 2>&1 | FileCheck --check-prefix=NOSTDLIB %s
|
||||
// NOSTDLIB: unable to find library -lls
|
||||
|
||||
.globl _start,_bar
|
||||
_start:
|
||||
|
||||
Reference in New Issue
Block a user