Skip to content

Commit

Permalink
auto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Aug 29, 2013
2 parents 7971c46 + 188a9dd commit 26e925a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mk/rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ ifneq ($(strip $(findstring snap,$(MAKECMDGOALS))),)
SNAP_DEFINES=-DRUST_SNAPSHOT
endif

define DEF_LIBUV_ARCH_VAR
LIBUV_ARCH_$(1) = $$(subst i386,ia32,$$(subst x86_64,x64,$$(HOST_$(1))))
endef
$(foreach t,$(CFG_TARGET_TRIPLES),$(eval $(call DEF_LIBUV_ARCH_VAR,$(t))))

define DEF_RUNTIME_TARGETS

######################################################################
Expand Down Expand Up @@ -170,7 +175,7 @@ LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \

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

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

0 comments on commit 26e925a

Please sign in to comment.