depot/third_party/nixpkgs/pkgs/development/compilers/mrustc/patches/0003-echo-newlines.patch
Default email 2189cff663 Project import generated by Copybara.
GitOrigin-RevId: 1fe6ed37fd9beb92afe90671c0c2a662a03463dd
2021-04-24 22:57:28 -05:00

13 lines
508 B
Diff

--- a/run_rustc/Makefile
+++ b/run_rustc/Makefile
@@ -103,7 +103,9 @@
else
cp $(OUTDIR)build-rustc/release/rustc_binary $(BINDIR)rustc_binary
endif
- echo '#!/bin/sh\nd=$$(dirname $$0)\nLD_LIBRARY_PATH="$(abspath $(LIBDIR))" $$d/rustc_binary $$@' >$@
+ echo '#!$(shell which bash)' > $@
+ echo 'd=$$(dirname $$0)' >> $@
+ echo 'LD_LIBRARY_PATH="$(abspath $(LIBDIR))" $$d/rustc_binary $$@' >> $@
chmod +x $@
$(BINDIR)hello_world: $(RUST_SRC)test/run-pass/hello.rs $(LIBDIR)libstd.rlib $(BINDIR)rustc