[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.
diff --git a/lld/test/COFF/reloc-discarded.s b/lld/test/COFF/reloc-discarded.s
index 667df0f..404f797 100644
--- a/lld/test/COFF/reloc-discarded.s
+++ b/lld/test/COFF/reloc-discarded.s
@@ -1,5 +1,5 @@
# REQUIRES: x86
-# RUN: echo -e '.section .bss,"bw",discard,main_global\n.global main_global\n main_global:\n .long 0' | \
+# RUN: printf '.section .bss,"bw",discard,main_global\n.global main_global\n main_global:\n .long 0' | \
# RUN: llvm-mc - -filetype=obj -o %t1.obj -triple x86_64-windows-msvc
# RUN: llvm-mc %s -filetype=obj -o %t2.obj -triple x86_64-windows-msvc
diff --git a/lld/test/ELF/msp430.s b/lld/test/ELF/msp430.s
index 39079ed596..732af38 100644
--- a/lld/test/ELF/msp430.s
+++ b/lld/test/ELF/msp430.s
@@ -1,6 +1,6 @@
; REQUIRES: msp430
; RUN: llvm-mc -filetype=obj -triple=msp430-elf -o %t1.o %s
-; RUN: echo -e '.global _start\n _start: nop' | llvm-mc -filetype=obj -triple=msp430-elf -o %t2.o -
+; RUN: printf '.global _start\n _start: nop' | llvm-mc -filetype=obj -triple=msp430-elf -o %t2.o -
; RUN: ld.lld -o %t.exe --image-base=0x1000 --Tdata=0x2000 --Ttext=0x8000 --defsym=_byte=0x21 -z separate-code %t2.o %t1.o
; RUN: llvm-objdump -s -d %t.exe | FileCheck %s
diff --git a/lld/test/ELF/weak-shared-gc.s b/lld/test/ELF/weak-shared-gc.s
index 833d7b7..2bba634 100644
--- a/lld/test/ELF/weak-shared-gc.s
+++ b/lld/test/ELF/weak-shared-gc.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
-# RUN: echo -e '.globl __cxa_finalize\n__cxa_finalize:' | \
+# RUN: printf '.globl __cxa_finalize\n__cxa_finalize:' | \
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
# RUN: ld.lld %t2.o -o %t2.so -shared
# RUN: ld.lld %t1.o --as-needed --gc-sections %t2.so -o %t
diff --git a/lld/test/ELF/weak-undef-lib.s b/lld/test/ELF/weak-undef-lib.s
index 0ff1bc7..8f89c6f 100644
--- a/lld/test/ELF/weak-undef-lib.s
+++ b/lld/test/ELF/weak-undef-lib.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
-# RUN: echo -e '.globl foo\nfoo: ret' | \
+# RUN: printf '.globl foo\nfoo: ret' | \
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
# RUN: ld.lld -shared -o %t.so %t1.o --start-lib %t2.o