[lld] r312922 - [ELF] Fix issue with test when build path contains '@'
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 08:55:54 PDT 2017
Author: jhenderson
Date: Mon Sep 11 08:55:54 2017
New Revision: 312922
URL: http://llvm.org/viewvc/llvm-project?rev=312922&view=rev
Log:
[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
Modified:
lld/trunk/test/ELF/linkerscript/include-cycle.s
Modified: lld/trunk/test/ELF/linkerscript/include-cycle.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/include-cycle.s?rev=312922&r1=312921&r2=312922&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/include-cycle.s (original)
+++ lld/trunk/test/ELF/linkerscript/include-cycle.s Mon Sep 11 08:55:54 2017
@@ -1,11 +1,11 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: echo INCLUDE %t1.script > %t1.script
+# RUN: echo "INCLUDE \"%t1.script\"" > %t1.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
-# RUN: echo INCLUDE %t2.script > %t1.script
-# RUN: echo INCLUDE %t1.script > %t2.script
+# RUN: echo "INCLUDE \"%t2.script\"" > %t1.script
+# RUN: echo "INCLUDE \"%t1.script\"" > %t2.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
# CHECK: there is a cycle in linker script INCLUDEs
More information about the llvm-commits
mailing list