Skip to content

Commit 1f131fb

Browse files
committed
Auto merge of #32560 - alexcrichton:metadata-for-our-crates, r=nikomatsakis
mk: Add `-C metadata` for compiling crates we ship This should re-enable all external builds of crates with the same name. Right now Cargo doesn't pass `-C metadata` for the top-level library being compiled, so if that library is called `libc`, for example, then it won't be able to link to the standard library which *also* has a `libc` library compiled without `-C metadata`. This can result in naming conflicts which need to be resolved. By passing `-C metadata` to the in-tree crates we ship it should add some extra salt to all symbol names to ensure that they don't collide. Closes #32532
2 parents 53a03b5 + 6908e4e commit 1f131fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mk/target.mk

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8989
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
9090
--out-dir $$(@D) \
9191
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
92+
-C metadata=$$(CFG_FILENAME_EXTRA) \
9293
$$<
9394
@touch -r $$@.start_time $$@ && rm $$@.start_time
9495
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

0 commit comments

Comments
 (0)