diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-08-28 17:01:44 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-08-28 17:32:27 -0700 |
| commit | 188a9dd210e5cbc1db6a31992dc298d143d80526 (patch) | |
| tree | fbae7d2ad350ab0beb66521130f00f027e7ff779 | |
| parent | 66a07b0550c9e361f28a5a39aa72982b7acb41e2 (diff) | |
Fix compilation issues with libuv on OSX
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
| -rw-r--r-- | mk/rt.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/rt.mk b/mk/rt.mk index 823dfd94c1a..366acb7e379 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -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 ###################################################################### @@ -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 |
