mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
Remove libuv, gyp
This commit removes the libuv and gyp submodules, as well as all build infrastructure related to them. For more context, see the [runtime removal RFC](https://github.com/rust-lang/rfcs/pull/230) [breaking-change]
This commit is contained in:
parent
002643dcf0
commit
c5d2ed54a3
7
.gitmodules
vendored
7
.gitmodules
vendored
@ -2,13 +2,6 @@
|
||||
path = src/llvm
|
||||
url = https://github.com/rust-lang/llvm.git
|
||||
branch = master
|
||||
[submodule "src/libuv"]
|
||||
path = src/libuv
|
||||
url = https://github.com/rust-lang/libuv.git
|
||||
branch = master
|
||||
[submodule "src/gyp"]
|
||||
path = src/gyp
|
||||
url = https://github.com/rust-lang/gyp.git
|
||||
[submodule "src/compiler-rt"]
|
||||
path = src/compiler-rt
|
||||
url = https://github.com/rust-lang/compiler-rt.git
|
||||
|
35
COPYRIGHT
35
COPYRIGHT
@ -213,41 +213,6 @@ their own copyright notices and license terms:
|
||||
as the Rust compiler or runtime libraries themselves).
|
||||
|
||||
|
||||
* The libuv asynchronous I/O library. Code for this package
|
||||
is found in the src/libuv directory, within this
|
||||
distribution. This package is redistributed under the
|
||||
following terms, as noted in its source:
|
||||
|
||||
Copyright Joyent, Inc. and other Node contributors. All
|
||||
rights reserved. Permission is hereby granted, free of
|
||||
charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
* Additional libraries included in libuv carry separate
|
||||
BSD-compatible licenses. See src/libuv/LICENSE for
|
||||
details.
|
||||
|
||||
* The src/rt/miniz.c file, carrying an implementation of
|
||||
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
|
||||
<richgel99@gmail.com>. All uses of this file are
|
||||
|
10
configure
vendored
10
configure
vendored
@ -438,7 +438,6 @@ valopt prefix "/usr/local" "set installation prefix"
|
||||
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
|
||||
valopt llvm-root "" "set LLVM root"
|
||||
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
|
||||
valopt libuv-root "" "set directory where libuv.a is located"
|
||||
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
|
||||
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
|
||||
|
||||
@ -869,10 +868,6 @@ do
|
||||
do
|
||||
make_dir $t/rt/stage$s
|
||||
make_dir $t/rt/jemalloc
|
||||
make_dir $t/rt/libuv
|
||||
make_dir $t/rt/libuv/src/ares
|
||||
make_dir $t/rt/libuv/src/eio
|
||||
make_dir $t/rt/libuv/src/ev
|
||||
for i in \
|
||||
isaac sync test \
|
||||
arch/i386 arch/x86_64 arch/arm arch/mips \
|
||||
@ -952,10 +947,6 @@ then
|
||||
msg "git: submodule deinit src/jemalloc"
|
||||
"${CFG_GIT}" submodule deinit src/jemalloc
|
||||
fi
|
||||
if [ ! -z "${CFG_LIBUV_ROOT}" ]; then
|
||||
msg "git: submodule deinit src/libuv"
|
||||
"${CFG_GIT}" submodule deinit src/libuv
|
||||
fi
|
||||
|
||||
msg "git: submodule update"
|
||||
"${CFG_GIT}" submodule update
|
||||
@ -1216,7 +1207,6 @@ putvar CFG_MINGW32_CROSS_PATH
|
||||
putvar CFG_MANDIR
|
||||
putvar CFG_DISABLE_INJECT_STD_VERSION
|
||||
putvar CFG_JEMALLOC_ROOT
|
||||
putvar CFG_LIBUV_ROOT
|
||||
putvar CFG_DISABLE_JEMALLOC
|
||||
|
||||
# Avoid spurious warnings from clang by feeding it original source on
|
||||
|
@ -16,13 +16,11 @@
|
||||
.PHONY: TAGS.emacs TAGS.vi
|
||||
|
||||
# This is using a blacklist approach, probably more durable than a whitelist.
|
||||
# We exclude: external dependencies (llvm, libuv, gyp, rt/{msvc,sundown,vg}),
|
||||
# We exclude: external dependencies (llvm, rt/{msvc,sundown,vg}),
|
||||
# tests (compiletest, test) and a couple of other things (rt/arch, etc)
|
||||
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
|
||||
$(patsubst ${CFG_SRC_DIR}src/libuv,, \
|
||||
$(patsubst ${CFG_SRC_DIR}src/compiletest,, \
|
||||
$(patsubst ${CFG_SRC_DIR}src/test,, \
|
||||
$(patsubst ${CFG_SRC_DIR}src/gyp,, \
|
||||
$(patsubst ${CFG_SRC_DIR}src/etc,, \
|
||||
$(patsubst ${CFG_SRC_DIR}src/rt,, \
|
||||
$(patsubst ${CFG_SRC_DIR}src/rt/arch,, \
|
||||
|
@ -35,7 +35,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
|
||||
|
||||
PKG_TAR = dist/$(PKG_NAME).tar.gz
|
||||
|
||||
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp $(S)src/compiler-rt \
|
||||
PKG_GITMODULES := $(S)src/llvm $(S)src/compiler-rt \
|
||||
$(S)src/rt/hoedown $(S)src/jemalloc
|
||||
PKG_FILES := \
|
||||
$(S)COPYRIGHT \
|
||||
|
@ -118,7 +118,6 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-linux-gnu := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_x86_64-unknown-linux-gnu := .linux.def
|
||||
CFG_LLC_FLAGS_x86_64-unknown-linux-gnu :=
|
||||
CFG_INSTALL_NAME_x86_64-unknown-linux-gnu =
|
||||
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-linux-gnu =
|
||||
CFG_EXE_SUFFIX_x86_64-unknown-linux-gnu =
|
||||
CFG_WINDOWSY_x86_64-unknown-linux-gnu :=
|
||||
CFG_UNIXY_x86_64-unknown-linux-gnu := 1
|
||||
@ -146,7 +145,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-unknown-linux-gnu := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_i686-unknown-linux-gnu := .linux.def
|
||||
CFG_LLC_FLAGS_i686-unknown-linux-gnu :=
|
||||
CFG_INSTALL_NAME_i686-unknown-linux-gnu =
|
||||
CFG_LIBUV_LINK_FLAGS_i686-unknown-linux-gnu =
|
||||
CFG_EXE_SUFFIX_i686-unknown-linux-gnu =
|
||||
CFG_WINDOWSY_i686-unknown-linux-gnu :=
|
||||
CFG_UNIXY_i686-unknown-linux-gnu := 1
|
||||
@ -180,7 +178,6 @@ CFG_GCCISH_POST_LIB_FLAGS_arm-apple-ios :=
|
||||
CFG_DEF_SUFFIX_arm-apple-ios := .darwin.def
|
||||
CFG_LLC_FLAGS_arm-apple-ios := -mattr=+vfp3,+v7,+thumb2,+neon -march=arm
|
||||
CFG_INSTALL_NAME_arm-apple-ios = -Wl,-install_name,@rpath/$(1)
|
||||
CFG_LIBUV_LINK_FLAGS_arm-apple-ios =
|
||||
CFG_EXE_SUFFIX_arm-apple-ios :=
|
||||
CFG_WINDOWSY_arm-apple-ios :=
|
||||
CFG_UNIXY_arm-apple-ios := 1
|
||||
@ -216,7 +213,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i386-apple-ios =
|
||||
CFG_DEF_SUFFIX_i386-apple-ios = .darwin.def
|
||||
CFG_LLC_FLAGS_i386-apple-ios =
|
||||
CFG_INSTALL_NAME_i386-apple-ios = -Wl,-install_name,@rpath/$(1)
|
||||
CFG_LIBUV_LINK_FLAGS_i386-apple-ios =
|
||||
CFG_EXE_SUFFIX_i386-apple-ios =
|
||||
CFG_WINDOWSY_i386-apple-ios =
|
||||
CFG_UNIXY_i386-apple-ios = 1
|
||||
@ -245,7 +241,6 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-apple-darwin :=
|
||||
CFG_DEF_SUFFIX_x86_64-apple-darwin := .darwin.def
|
||||
CFG_LLC_FLAGS_x86_64-apple-darwin :=
|
||||
CFG_INSTALL_NAME_x86_64-apple-darwin = -Wl,-install_name,@rpath/$(1)
|
||||
CFG_LIBUV_LINK_FLAGS_x86_64-apple-darwin =
|
||||
CFG_EXE_SUFFIX_x86_64-apple-darwin :=
|
||||
CFG_WINDOWSY_x86_64-apple-darwin :=
|
||||
CFG_UNIXY_x86_64-apple-darwin := 1
|
||||
@ -273,7 +268,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-apple-darwin :=
|
||||
CFG_DEF_SUFFIX_i686-apple-darwin := .darwin.def
|
||||
CFG_LLC_FLAGS_i686-apple-darwin :=
|
||||
CFG_INSTALL_NAME_i686-apple-darwin = -Wl,-install_name,@rpath/$(1)
|
||||
CFG_LIBUV_LINK_FLAGS_i686-apple-darwin =
|
||||
CFG_EXE_SUFFIX_i686-apple-darwin :=
|
||||
CFG_WINDOWSY_i686-apple-darwin :=
|
||||
CFG_UNIXY_i686-apple-darwin := 1
|
||||
@ -301,7 +295,6 @@ CFG_GCCISH_POST_LIB_FLAGS_arm-linux-androideabi := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_arm-linux-androideabi := .android.def
|
||||
CFG_LLC_FLAGS_arm-linux-androideabi :=
|
||||
CFG_INSTALL_NAME_arm-linux-androideabi =
|
||||
CFG_LIBUV_LINK_FLAGS_arm-linux-androideabi =
|
||||
CFG_EXE_SUFFIX_arm-linux-androideabi :=
|
||||
CFG_WINDOWSY_arm-linux-androideabi :=
|
||||
CFG_UNIXY_arm-linux-androideabi := 1
|
||||
@ -332,7 +325,6 @@ CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-linux-gnueabihf := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_arm-unknown-linux-gnueabihf := .linux.def
|
||||
CFG_LLC_FLAGS_arm-unknown-linux-gnueabihf :=
|
||||
CFG_INSTALL_NAME_ar,-unknown-linux-gnueabihf =
|
||||
CFG_LIBUV_LINK_FLAGS_arm-unknown-linux-gnueabihf =
|
||||
CFG_EXE_SUFFIX_arm-unknown-linux-gnueabihf :=
|
||||
CFG_WINDOWSY_arm-unknown-linux-gnueabihf :=
|
||||
CFG_UNIXY_arm-unknown-linux-gnueabihf := 1
|
||||
@ -363,7 +355,6 @@ CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-linux-gnueabi := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_arm-unknown-linux-gnueabi := .linux.def
|
||||
CFG_LLC_FLAGS_arm-unknown-linux-gnueabi :=
|
||||
CFG_INSTALL_NAME_arm-unknown-linux-gnueabi =
|
||||
CFG_LIBUV_LINK_FLAGS_arm-unknown-linux-gnueabi =
|
||||
CFG_EXE_SUFFIX_arm-unknown-linux-gnueabi :=
|
||||
CFG_WINDOWSY_arm-unknown-linux-gnueabi :=
|
||||
CFG_UNIXY_arm-unknown-linux-gnueabi := 1
|
||||
@ -393,7 +384,6 @@ CFG_GCCISH_POST_LIB_FLAGS_mipsel-linux := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_mipsel-linux := .linux.def
|
||||
CFG_LLC_FLAGS_mipsel-linux :=
|
||||
CFG_INSTALL_NAME_mipsel-linux =
|
||||
CFG_LIBUV_LINK_FLAGS_mipsel-linux =
|
||||
CFG_EXE_SUFFIX_mipsel-linux :=
|
||||
CFG_WINDOWSY_mipsel-linux :=
|
||||
CFG_UNIXY_mipsel-linux := 1
|
||||
@ -423,7 +413,6 @@ CFG_GCCISH_POST_LIB_FLAGS_mips-unknown-linux-gnu := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_mips-unknown-linux-gnu := .linux.def
|
||||
CFG_LLC_FLAGS_mips-unknown-linux-gnu :=
|
||||
CFG_INSTALL_NAME_mips-unknown-linux-gnu =
|
||||
CFG_LIBUV_LINK_FLAGS_mips-unknown-linux-gnu =
|
||||
CFG_EXE_SUFFIX_mips-unknown-linux-gnu :=
|
||||
CFG_WINDOWSY_mips-unknown-linux-gnu :=
|
||||
CFG_UNIXY_mips-unknown-linux-gnu := 1
|
||||
@ -452,7 +441,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i586-mingw32msvc :=
|
||||
CFG_DEF_SUFFIX_i586-mingw32msvc := .mingw32.def
|
||||
CFG_LLC_FLAGS_i586-mingw32msvc :=
|
||||
CFG_INSTALL_NAME_i586-mingw32msvc =
|
||||
CFG_LIBUV_LINK_FLAGS_i586-mingw32msvc := -L$(CFG_MINGW32_CROSS_PATH)/i586-mingw32msvc/lib -lws2_32 -lpsapi -liphlpapi
|
||||
CFG_EXE_SUFFIX_i586-mingw32msvc := .exe
|
||||
CFG_WINDOWSY_i586-mingw32msvc := 1
|
||||
CFG_UNIXY_i586-mingw32msvc :=
|
||||
@ -483,7 +471,6 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-w64-mingw32 :=
|
||||
CFG_DEF_SUFFIX_i686-w64-mingw32 := .mingw32.def
|
||||
CFG_LLC_FLAGS_i686-w64-mingw32 :=
|
||||
CFG_INSTALL_NAME_i686-w64-mingw32 =
|
||||
CFG_LIBUV_LINK_FLAGS_i686-w64-mingw32 := -lws2_32 -lpsapi -liphlpapi
|
||||
CFG_EXE_SUFFIX_i686-w64-mingw32 := .exe
|
||||
CFG_WINDOWSY_i686-w64-mingw32 := 1
|
||||
CFG_UNIXY_i686-w64-mingw32 :=
|
||||
@ -515,7 +502,6 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-w64-mingw32 :=
|
||||
CFG_DEF_SUFFIX_x86_64-w64-mingw32 := .mingw32.def
|
||||
CFG_LLC_FLAGS_x86_64-w64-mingw32 :=
|
||||
CFG_INSTALL_NAME_x86_64-w64-mingw32 =
|
||||
CFG_LIBUV_LINK_FLAGS_x86_64-w64-mingw32 := -lws2_32 -lpsapi -liphlpapi
|
||||
CFG_EXE_SUFFIX_x86_64-w64-mingw32 := .exe
|
||||
CFG_WINDOWSY_x86_64-w64-mingw32 := 1
|
||||
CFG_UNIXY_x86_64-w64-mingw32 :=
|
||||
@ -543,7 +529,6 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-freebsd := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_x86_64-unknown-freebsd := .bsd.def
|
||||
CFG_LLC_FLAGS_x86_64-unknown-freebsd :=
|
||||
CFG_INSTALL_NAME_x86_64-unknown-freebsd =
|
||||
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-freebsd := -pthread -lkvm
|
||||
CFG_EXE_SUFFIX_x86_64-unknown-freebsd :=
|
||||
CFG_WINDOWSY_x86_64-unknown-freebsd :=
|
||||
CFG_UNIXY_x86_64-unknown-freebsd := 1
|
||||
@ -570,7 +555,6 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-dragonfly := -Wl,-no-whole-archive
|
||||
CFG_DEF_SUFFIX_x86_64-unknown-dragonfly := .bsd.def
|
||||
CFG_LLC_FLAGS_x86_64-unknown-dragonfly :=
|
||||
CFG_INSTALL_NAME_x86_64-unknown-dragonfly =
|
||||
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-dragonfly := -pthread -lkvm
|
||||
CFG_EXE_SUFFIX_x86_64-unknown-dragonfly :=
|
||||
CFG_WINDOWSY_x86_64-unknown-dragonfly :=
|
||||
CFG_UNIXY_x86_64-unknown-dragonfly := 1
|
||||
|
@ -16,7 +16,7 @@ rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \
|
||||
ifndef CFG_DISABLE_MANAGE_SUBMODULES
|
||||
# This is a pretty expensive operation but I don't see any way to avoid it
|
||||
# NB: This only looks for '+' status (wrong commit checked out), not '-' status
|
||||
# (nothing checked out at all). `./configure --{llvm,jemalloc,libuv}-root`
|
||||
# (nothing checked out at all). `./configure --{llvm,jemalloc}-root`
|
||||
# will explicitly deinitialize the corresponding submodules, and we don't
|
||||
# want to force constant rebuilds in that case.
|
||||
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^+')
|
||||
|
137
mk/rt.mk
137
mk/rt.mk
@ -83,7 +83,7 @@ $$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
|
||||
@$$(call E, compile: $$@)
|
||||
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, \
|
||||
-I $$(S)src/rt/hoedown/src \
|
||||
-I $$(S)src/libuv/include -I $$(S)src/rt \
|
||||
-I $$(S)src/rt \
|
||||
$$(RUNTIME_CFLAGS_$(1))) $$<
|
||||
|
||||
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.S $$(MKFILE_DEPS) \
|
||||
@ -129,155 +129,20 @@ $(foreach lib,$(NATIVE_LIBS), \
|
||||
# in the correct location.
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# libuv
|
||||
################################################################################
|
||||
|
||||
define DEF_LIBUV_ARCH_VAR
|
||||
LIBUV_ARCH_$(1) = $$(subst i386,ia32,$$(subst x86_64,x64,$$(HOST_$(1))))
|
||||
endef
|
||||
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_LIBUV_ARCH_VAR,$(t))))
|
||||
|
||||
ifdef CFG_ENABLE_FAST_MAKE
|
||||
LIBUV_DEPS := $(S)/.gitmodules
|
||||
else
|
||||
LIBUV_DEPS := $(wildcard \
|
||||
$(S)src/libuv/* \
|
||||
$(S)src/libuv/*/* \
|
||||
$(S)src/libuv/*/*/* \
|
||||
$(S)src/libuv/*/*/*/*)
|
||||
endif
|
||||
|
||||
LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
|
||||
uv_dtrace_header.target.mk uv_dtrace_provider.target.mk
|
||||
|
||||
export PYTHONPATH := $(PYTHONPATH):$(S)src/gyp/pylib
|
||||
|
||||
define DEF_THIRD_PARTY_TARGETS
|
||||
|
||||
# $(1) is the target triple
|
||||
|
||||
ifeq ($$(CFG_WINDOWSY_$(1)), 1)
|
||||
LIBUV_OSTYPE_$(1) := win
|
||||
# This isn't necessarily a desired option, but it's harmless and works around
|
||||
# what appears to be a mingw-w64 bug.
|
||||
#
|
||||
# https://sourceforge.net/p/mingw-w64/bugs/395/
|
||||
JEMALLOC_ARGS_$(1) := --enable-lazy-lock
|
||||
else ifeq ($(OSTYPE_$(1)), apple-darwin)
|
||||
LIBUV_OSTYPE_$(1) := mac
|
||||
else ifeq ($(OSTYPE_$(1)), apple-ios)
|
||||
LIBUV_OSTYPE_$(1) := ios
|
||||
JEMALLOC_ARGS_$(1) := --disable-tls
|
||||
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
|
||||
LIBUV_OSTYPE_$(1) := freebsd
|
||||
else ifeq ($(OSTYPE_$(1)), unknown-dragonfly)
|
||||
LIBUV_OSTYPE_$(1) := freebsd
|
||||
# required on DragonFly, otherwise gyp fails with a Python exception
|
||||
LIBUV_GYP_ARGS_$(1) := --no-parallel
|
||||
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
|
||||
LIBUV_OSTYPE_$(1) := android
|
||||
LIBUV_ARGS_$(1) := PLATFORM=android host=android OS=linux
|
||||
JEMALLOC_ARGS_$(1) := --disable-tls
|
||||
else
|
||||
LIBUV_OSTYPE_$(1) := linux
|
||||
endif
|
||||
|
||||
LIBUV_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),uv)
|
||||
LIBUV_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/libuv
|
||||
LIBUV_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(LIBUV_NAME_$(1))
|
||||
|
||||
LIBUV_MAKEFILE_$(1) := $$(CFG_BUILD_DIR)$$(RT_OUTPUT_DIR_$(1))/libuv/Makefile
|
||||
LIBUV_BUILD_DIR_$(1) := $$(CFG_BUILD_DIR)$$(RT_OUTPUT_DIR_$(1))/libuv
|
||||
LIBUV_XCODEPROJ_$(1) := $$(LIBUV_BUILD_DIR_$(1))/uv.xcodeproj
|
||||
|
||||
LIBUV_STAMP_$(1) = $$(LIBUV_DIR_$(1))/libuv-auto-clean-stamp
|
||||
|
||||
$$(LIBUV_STAMP_$(1)): $(S)src/rt/libuv-auto-clean-trigger
|
||||
$$(Q)rm -rf $$(LIBUV_DIR_$(1))
|
||||
$$(Q)mkdir -p $$(@D)
|
||||
touch $$@
|
||||
|
||||
# libuv triggers a few warnings on some platforms
|
||||
LIBUV_CFLAGS_$(1) := $(subst -Werror,,$(CFG_GCCISH_CFLAGS_$(1)))
|
||||
|
||||
$$(LIBUV_MAKEFILE_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
|
||||
(cd $(S)src/libuv/ && \
|
||||
CC="$$(CC_$(1))" \
|
||||
CXX="$$(CXX_$(1))" \
|
||||
AR="$$(AR_$(1))" \
|
||||
$$(CFG_PYTHON) ./gyp_uv.py -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) \
|
||||
-D ninja \
|
||||
-DOS=$$(LIBUV_OSTYPE_$(1)) \
|
||||
-Goutput_dir=$$(@D) $$(LIBUV_GYP_ARGS_$(1)) --generator-output $$(@D))
|
||||
touch $$@
|
||||
|
||||
# Windows has a completely different build system for libuv because of mingw. In
|
||||
# theory when we support msvc then we should be using gyp's msvc output instead
|
||||
# of mingw's makefile for windows
|
||||
ifdef CFG_WINDOWSY_$(1)
|
||||
LIBUV_LOCAL_$(1) := $$(S)src/libuv/libuv.a
|
||||
$$(LIBUV_LOCAL_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS)
|
||||
$$(Q)$$(MAKE) -C $$(S)src/libuv -f Makefile.mingw \
|
||||
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS_$(1))" \
|
||||
CC="$$(CC_$(1)) $$(LIBUV_CFLAGS_$(1)) $$(SNAP_DEFINES)" \
|
||||
CXX="$$(CXX_$(1))" \
|
||||
AR="$$(AR_$(1))" \
|
||||
V=$$(VERBOSE)
|
||||
else ifeq ($(OSTYPE_$(1)), apple-ios) # iOS
|
||||
$$(LIBUV_XCODEPROJ_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
|
||||
cp -rf $(S)src/libuv/ $$(LIBUV_BUILD_DIR_$(1))
|
||||
(cd $$(LIBUV_BUILD_DIR_$(1)) && \
|
||||
CC="$$(CC_$(1))" \
|
||||
CXX="$$(CXX_$(1))" \
|
||||
AR="$$(AR_$(1))" \
|
||||
$$(CFG_PYTHON) ./gyp_uv.py -f xcode \
|
||||
-D ninja \
|
||||
-R libuv)
|
||||
touch $$@
|
||||
|
||||
LIBUV_XCODE_OUT_LIB_$(1) := $$(LIBUV_BUILD_DIR_$(1))/build/Release-$$(CFG_SDK_NAME_$(1))/libuv.a
|
||||
|
||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_XCODE_OUT_LIB_$(1)) $$(MKFILE_DEPS)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(LIBUV_XCODE_OUT_LIB_$(1)): $$(LIBUV_DEPS) $$(LIBUV_XCODEPROJ_$(1)) \
|
||||
$$(MKFILE_DEPS)
|
||||
$$(Q)xcodebuild -project $$(LIBUV_BUILD_DIR_$(1))/uv.xcodeproj \
|
||||
CFLAGS="$$(LIBUV_CFLAGS_$(1)) $$(SNAP_DEFINES)" \
|
||||
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS_$(1))" \
|
||||
$$(LIBUV_ARGS_$(1)) \
|
||||
V=$$(VERBOSE) \
|
||||
-configuration Release \
|
||||
-sdk "$$(CFG_SDK_NAME_$(1))" \
|
||||
ARCHS="$$(CFG_SDK_ARCHS_$(1))"
|
||||
$$(Q)touch $$@
|
||||
else
|
||||
LIBUV_LOCAL_$(1) := $$(LIBUV_DIR_$(1))/Release/libuv.a
|
||||
$$(LIBUV_LOCAL_$(1)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)) $$(MKFILE_DEPS)
|
||||
$$(Q)$$(MAKE) -C $$(LIBUV_DIR_$(1)) \
|
||||
CFLAGS="$$(LIBUV_CFLAGS_$(1)) $$(SNAP_DEFINES)" \
|
||||
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS_$(1))" \
|
||||
CC="$$(CC_$(1))" \
|
||||
CXX="$$(CXX_$(1))" \
|
||||
AR="$$(AR_$(1))" \
|
||||
$$(LIBUV_ARGS_$(1)) \
|
||||
BUILDTYPE=Release \
|
||||
NO_LOAD="$$(LIBUV_NO_LOAD)" \
|
||||
V=$$(VERBOSE)
|
||||
$$(Q)touch $$@
|
||||
endif
|
||||
|
||||
ifeq ($(1),$$(CFG_BUILD))
|
||||
ifneq ($$(CFG_LIBUV_ROOT),)
|
||||
$$(LIBUV_LIB_$(1)): $$(CFG_LIBUV_ROOT)/libuv.a
|
||||
$$(Q)cp $$< $$@
|
||||
else
|
||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_LOCAL_$(1))
|
||||
$$(Q)cp $$< $$@
|
||||
endif
|
||||
else
|
||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_LOCAL_$(1))
|
||||
$$(Q)cp $$< $$@
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
1
src/gyp
1
src/gyp
@ -1 +0,0 @@
|
||||
Subproject commit 1e46da1000bc29679ab4cebf3c1034cb7d6f4487
|
@ -1 +0,0 @@
|
||||
Subproject commit dec0561d198d86a274b1067b53b64fea3c659202
|
Loading…
Reference in New Issue
Block a user