Bob Haarman | ac82f6c | 2020-09-08 18:59:40 +0000 | [diff] [blame^] | 1 | Use printf instead of echo to write the rustc shell script. This causes the |
| 2 | "\\n" sequences to be interpreted as newlines instead of writing them literally. |
| 3 | |
| 4 | diff --git a/run_rustc/Makefile b/run_rustc/Makefile |
| 5 | index 8cd16ae..698d60b 100644 |
| 6 | --- a/run_rustc/Makefile |
| 7 | +++ b/run_rustc/Makefile |
| 8 | @@ -103,7 +103,7 @@ ifeq ($(RUSTC_VERSION),1.19.0) |
| 9 | else |
| 10 | cp $(OUTDIR)build-rustc/release/rustc_binary $(BINDIR)rustc_binary |
| 11 | endif |
| 12 | - echo '#!/bin/sh\nd=$$(dirname $$0)\nLD_LIBRARY_PATH="$(abspath $(LIBDIR))" $$d/rustc_binary $$@' >$@ |
| 13 | + printf '#!/bin/sh\nd=$$(dirname $$0)\nLD_LIBRARY_PATH="%s" $$d/rustc_binary $$@\n' $(abspath $(LIBDIR)) >$@ |
| 14 | chmod +x $@ |
| 15 | |
| 16 | $(BINDIR)hello_world: $(RUST_SRC)test/run-pass/hello.rs $(LIBDIR)libstd.rlib $(BINDIR)rustc |