Skip to content

Commit 9cce2b7

Browse files
committed
auto merge of #17449 : mcoffin/rust/master, r=alexcrichton
Right now, libuv will **always** be built for the host system (at least when building on OSX) because the information about the cross compiler is never actually passed to GYP. I don't know how anybody has been managing to build cross compilers with this. Note that, at least on OSX, there is a bug in GYP that will send clang flags to non-clang compilers and it will still attempt to use Xcode's libtool, so this doesn't completely fix the problem of cross-compiling on an OSX host, but it's a start.
2 parents c8bafe0 + bcc4ee0 commit 9cce2b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mk/rt.mk

+6
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ LIBUV_CFLAGS_$(1) := $(subst -Werror,,$(CFG_GCCISH_CFLAGS_$(1)))
203203

204204
$$(LIBUV_MAKEFILE_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
205205
(cd $(S)src/libuv/ && \
206+
CC="$$(CC_$(1))" \
207+
CXX="$$(CXX_$(1))" \
208+
AR="$$(AR_$(1))" \
206209
$$(CFG_PYTHON) ./gyp_uv.py -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) \
207210
-D ninja \
208211
-DOS=$$(LIBUV_OSTYPE_$(1)) \
@@ -225,6 +228,9 @@ else ifeq ($(OSTYPE_$(1)), apple-ios) # iOS
225228
$$(LIBUV_XCODEPROJ_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
226229
cp -rf $(S)src/libuv/ $$(LIBUV_BUILD_DIR_$(1))
227230
(cd $$(LIBUV_BUILD_DIR_$(1)) && \
231+
CC="$$(CC_$(1))" \
232+
CXX="$$(CXX_$(1))" \
233+
AR="$$(AR_$(1))" \
228234
$$(CFG_PYTHON) ./gyp_uv.py -f xcode \
229235
-D ninja \
230236
-R libuv)

0 commit comments

Comments
 (0)