Skip to content

Commit 26e925a

Browse files
committed
auto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton
It turns out that gyp (libuv's new build system) wants x64 for a 64-bit x86 architecture and ia32 for a 32-bit architecture, so this performs the relevant mapping and then invokes libuv's configure script with the appropriate target architecture. This can be verified by running make with VERBOSE=1 and seeing that beforehand on a 64-bit build libuv was passed "-arch i386" and now it's passed "-arch x86_64" Closes #8826
2 parents 7971c46 + 188a9dd commit 26e925a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mk/rt.mk

+6-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ ifneq ($(strip $(findstring snap,$(MAKECMDGOALS))),)
4141
SNAP_DEFINES=-DRUST_SNAPSHOT
4242
endif
4343

44+
define DEF_LIBUV_ARCH_VAR
45+
LIBUV_ARCH_$(1) = $$(subst i386,ia32,$$(subst x86_64,x64,$$(HOST_$(1))))
46+
endef
47+
$(foreach t,$(CFG_TARGET_TRIPLES),$(eval $(call DEF_LIBUV_ARCH_VAR,$(t))))
48+
4449
define DEF_RUNTIME_TARGETS
4550

4651
######################################################################
@@ -170,7 +175,7 @@ LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
170175

171176
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_GYP)
172177
(cd $(S)src/libuv/ && \
173-
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(HOST_$(1)) -D ninja \
178+
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
174179
-Goutput_dir=$$(@D) --generator-output $$(@D))
175180

176181
# XXX: Shouldn't need platform-specific conditions here

0 commit comments

Comments
 (0)