mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Auto merge of #30263 - pnkfelix:rsbegin-rsend-are-window-gnu-only, r=alexcrichton
The `rsbegin.o` and `rsend.o` build products should not be generated on non WinGnu platforms. This is another path to resolving #30063 for non win-gnu targets. (And it won't require a snapshot, unlike PR #30208.) r? @alexcrichton
This commit is contained in:
commit
9cadb2955f
@ -24,3 +24,4 @@ CFG_RUN_TARG_i686-pc-windows-gnu=$(call CFG_RUN_i686-pc-windows-gnu,,$(2))
|
||||
CFG_GNU_TRIPLE_i686-pc-windows-gnu := i686-w64-mingw32
|
||||
CFG_THIRD_PARTY_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o
|
||||
CFG_INSTALLED_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
|
||||
CFG_RUSTRT_HAS_STARTUP_OBJS_i686-pc-windows-gnu := 1
|
||||
|
@ -24,3 +24,4 @@ CFG_RUN_TARG_x86_64-pc-windows-gnu=$(call CFG_RUN_x86_64-pc-windows-gnu,,$(2))
|
||||
CFG_GNU_TRIPLE_x86_64-pc-windows-gnu := x86_64-w64-mingw32
|
||||
CFG_THIRD_PARTY_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o
|
||||
CFG_INSTALLED_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
|
||||
CFG_RUSTRT_HAS_STARTUP_OBJS_x86_64-pc-windows-gnu := 1
|
||||
|
@ -152,12 +152,14 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(4).o: \
|
||||
@$$(call E, rustc: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) --emit=obj -o $$@ $$<
|
||||
|
||||
ifeq ($$(CFG_RUSTRT_HAS_STARTUP_OBJS_$(2)), 1)
|
||||
# Add dependencies on Rust startup objects to all crates that depend on core.
|
||||
# This ensures that they are built after core (since they depend on it),
|
||||
# but before everything else (since they are needed for linking dylib crates).
|
||||
$$(foreach crate, $$(TARGET_CRATES), \
|
||||
$$(if $$(findstring core,$$(DEPS_$$(crate))), \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate))) : $$(TLIB$(1)_T_$(2)_H_$(3))/$(4).o
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user