Skip to content

Commit 4c2a3ec

Browse files
committed
[ELF] Fix issue with test when build path contains '@'
'@' is a valid character in file paths, but the linker script tokenizer treats it as a separate token. This was leading to an unexpected test failure, on our local builds. This patch changes the test to quote the path to prevent this happening. An alternative would have been to add '@' to the list of "unquoted tokens" in ScriptLexer.cpp, but ld.bfd has the same behaviour as the current LLD. Reviewers: ruiu Differential Revision: https://reviews.llvm.org/D37689 llvm-svn: 312922
1 parent 255488a commit 4c2a3ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lld/test/ELF/linkerscript/include-cycle.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
33

4-
# RUN: echo INCLUDE %t1.script > %t1.script
4+
# RUN: echo "INCLUDE \"%t1.script\"" > %t1.script
55
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
66

7-
# RUN: echo INCLUDE %t2.script > %t1.script
8-
# RUN: echo INCLUDE %t1.script > %t2.script
7+
# RUN: echo "INCLUDE \"%t2.script\"" > %t1.script
8+
# RUN: echo "INCLUDE \"%t1.script\"" > %t2.script
99
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
1010

1111
# CHECK: there is a cycle in linker script INCLUDEs

0 commit comments

Comments
 (0)