-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #85362 - jsgf:fix-emit-metadata, r=estebank
Use command line metadata path if provided If the command-line has `--emit metadata=some/path/libfoo.rmeta` then use that. Closes #85356 I couldn't find any existing tests for the `--emit TYPE=PATH` command line syntax, so I wasn't sure how to test this aside from ad-hoc manual testing. Is there a ui test type for "generated output file with expected name"?
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-include ../../run-make-fulldeps/tools.mk | ||
|
||
OUT=$(TMPDIR)/emit | ||
|
||
all: asm llvm-bc llvm-ir obj metadata link dep-info mir | ||
|
||
asm: $(OUT) | ||
$(RUSTC) --emit asm=$(OUT)/libfoo.s foo.rs | ||
test -f $(OUT)/libfoo.s | ||
llvm-bc: $(OUT) | ||
$(RUSTC) --emit llvm-bc=$(OUT)/libfoo.bc foo.rs | ||
test -f $(OUT)/libfoo.bc | ||
llvm-ir: $(OUT) | ||
$(RUSTC) --emit llvm-ir=$(OUT)/libfoo.ll foo.rs | ||
test -f $(OUT)/libfoo.ll | ||
obj: $(OUT) | ||
$(RUSTC) --emit obj=$(OUT)/libfoo.o foo.rs | ||
test -f $(OUT)/libfoo.o | ||
metadata: $(OUT) | ||
$(RUSTC) --emit metadata=$(OUT)/libfoo.rmeta foo.rs | ||
test -f $(OUT)/libfoo.rmeta | ||
link: $(OUT) | ||
$(RUSTC) --emit link=$(OUT)/libfoo.rlib foo.rs | ||
test -f $(OUT)/libfoo.rlib | ||
dep-info: $(OUT) | ||
$(RUSTC) --emit dep-info=$(OUT)/libfoo.d foo.rs | ||
test -f $(OUT)/libfoo.d | ||
mir: $(OUT) | ||
$(RUSTC) --emit mir=$(OUT)/libfoo.mir foo.rs | ||
test -f $(OUT)/libfoo.mir | ||
|
||
$(OUT): | ||
mkdir -p $(OUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#![crate_type = "rlib"] |