|
3 | 3 |
|
4 | 4 | # ignore-windows |
5 | 5 |
|
| 6 | +include ../tools.mk |
| 7 | + |
6 | 8 | SRC_DIR := $(abspath .) |
7 | 9 | SRC_DIR_PARENT := $(abspath ..) |
8 | 10 |
|
9 | | -include ../tools.mk |
| 11 | +ifeq ($(UNAME),Darwin) |
| 12 | + DEBUGINFOOPTS := -Csplit-debuginfo=off |
| 13 | +else |
| 14 | + DEBUGINFOOPTS := |
| 15 | +endif |
10 | 16 |
|
11 | 17 | all: \ |
12 | 18 | abs_input_outside_working_dir \ |
@@ -35,7 +41,7 @@ abs_input_inside_working_dir: |
35 | 41 | abs_input_inside_working_dir_scope: |
36 | 42 | # We explicitly switch to a directory that *is* a prefix of the directory our |
37 | 43 | # source code is contained in. |
38 | | - cd $(SRC_DIR) && $(RUSTC) $(SRC_DIR)/src/quux.rs -o "$(TMPDIR)/abs_input_inside_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix $(SRC_DIR)=REMAPPED -Zremap-path-scope=object |
| 44 | + cd $(SRC_DIR) && $(RUSTC) $(SRC_DIR)/src/quux.rs -o "$(TMPDIR)/abs_input_inside_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix $(SRC_DIR)=REMAPPED -Zremap-path-scope=object $(DEBUGINFOOPTS) |
39 | 45 | # We expect the path to the main source file to be remapped. |
40 | 46 | "$(LLVM_BIN_DIR)"/llvm-dwarfdump $(TMPDIR)/abs_input_inside_working_dir_scope.rlib | $(CGREP) "REMAPPED/src/quux.rs" |
41 | 47 | # No weird duplication of remapped components (see #78479) |
@@ -71,13 +77,13 @@ rel_input_remap_working_dir: |
71 | 77 | # expand the relative path to an absolute path and we expect the working directory to be remapped |
72 | 78 | # in that expansion. |
73 | 79 | rel_input_remap_working_dir_scope: |
74 | | - cd $(SRC_DIR) && $(RUSTC) src/quux.rs -o "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix "$(SRC_DIR)=REMAPPED" -Zremap-path-scope=object |
| 80 | + cd $(SRC_DIR) && $(RUSTC) src/quux.rs -o "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix "$(SRC_DIR)=REMAPPED" -Zremap-path-scope=object $(DEBUGINFOOPTS) |
75 | 81 | "$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) "REMAPPED/src/quux.rs" |
76 | 82 | # No weird duplication of remapped components (see #78479) |
77 | 83 | "$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) -v "REMAPPED/REMAPPED" |
78 | 84 |
|
79 | 85 | rel_input_remap_working_dir_diagnostics: |
80 | | - cd $(SRC_DIR) && $(RUSTC) src/quux.rs -o "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix "$(SRC_DIR)=REMAPPED" -Zremap-path-scope=diagnostics |
| 86 | + cd $(SRC_DIR) && $(RUSTC) src/quux.rs -o "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix "$(SRC_DIR)=REMAPPED" -Zremap-path-scope=diagnostics $(DEBUGINFOOPTS) |
81 | 87 | "$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) -v "REMAPPED/src/quux.rs" |
82 | 88 | "$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) -v "REMAPPED/REMAPPED" |
83 | 89 |
|
|
0 commit comments