Skip to content

Commit efbf5f5

Browse files
[lld] Prefer printf over echo -e
Otherwise we break some MacOS bots when using the lit internal shell because /bin/echo on MacOS does not support -e. Using the external shell we end up using the echo builtin to /bin/bash, which does support this. The echo builtin implementation in lit does support this, but that is currently not enabled in pipelines. Might be worth looking into fixing at some point.
1 parent c507848 commit efbf5f5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lld/test/COFF/reloc-discarded.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# REQUIRES: x86
2-
# RUN: echo -e '.section .bss,"bw",discard,main_global\n.global main_global\n main_global:\n .long 0' | \
2+
# RUN: printf '.section .bss,"bw",discard,main_global\n.global main_global\n main_global:\n .long 0' | \
33
# RUN: llvm-mc - -filetype=obj -o %t1.obj -triple x86_64-windows-msvc
44
# RUN: llvm-mc %s -filetype=obj -o %t2.obj -triple x86_64-windows-msvc
55

lld/test/ELF/msp430.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; REQUIRES: msp430
22
; RUN: llvm-mc -filetype=obj -triple=msp430-elf -o %t1.o %s
3-
; RUN: echo -e '.global _start\n _start: nop' | llvm-mc -filetype=obj -triple=msp430-elf -o %t2.o -
3+
; RUN: printf '.global _start\n _start: nop' | llvm-mc -filetype=obj -triple=msp430-elf -o %t2.o -
44
; RUN: ld.lld -o %t.exe --image-base=0x1000 --Tdata=0x2000 --Ttext=0x8000 --defsym=_byte=0x21 -z separate-code %t2.o %t1.o
55
; RUN: llvm-objdump -s -d %t.exe | FileCheck %s
66

lld/test/ELF/weak-shared-gc.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
3-
# RUN: echo -e '.globl __cxa_finalize\n__cxa_finalize:' | \
3+
# RUN: printf '.globl __cxa_finalize\n__cxa_finalize:' | \
44
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
55
# RUN: ld.lld %t2.o -o %t2.so -shared
66
# RUN: ld.lld %t1.o --as-needed --gc-sections %t2.so -o %t

lld/test/ELF/weak-undef-lib.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
3-
# RUN: echo -e '.globl foo\nfoo: ret' | \
3+
# RUN: printf '.globl foo\nfoo: ret' | \
44
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
55

66
# RUN: ld.lld -shared -o %t.so %t1.o --start-lib %t2.o

0 commit comments

Comments
 (0)