mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
mk: Get rid of redundant LIBUV_FLAGS.
This commit is contained in:
parent
6820ed4dcf
commit
a2c111abde
@ -231,7 +231,7 @@ CFG_LIB_NAME_x86_64-apple-darwin=lib$(1).dylib
|
||||
CFG_STATIC_LIB_NAME_x86_64-apple-darwin=lib$(1).a
|
||||
CFG_LIB_GLOB_x86_64-apple-darwin=lib$(1)-*.dylib
|
||||
CFG_LIB_DSYM_GLOB_x86_64-apple-darwin=lib$(1)-*.dylib.dSYM
|
||||
CFG_GCCISH_CFLAGS_x86_64-apple-darwin := -Wall -Werror -g -fPIC -m64 -arch x86_64
|
||||
CFG_GCCISH_CFLAGS_x86_64-apple-darwin := -Wall -g -fPIC -m64 -arch x86_64
|
||||
CFG_GCCISH_CXXFLAGS_x86_64-apple-darwin := -fno-rtti
|
||||
CFG_GCCISH_LINK_FLAGS_x86_64-apple-darwin := -dynamiclib -pthread -framework CoreServices -m64
|
||||
CFG_GCCISH_DEF_FLAG_x86_64-apple-darwin := -Wl,-exported_symbols_list,
|
||||
@ -300,6 +300,7 @@ CFG_LDPATH_arm-linux-androideabi :=
|
||||
CFG_RUN_arm-linux-androideabi=
|
||||
CFG_RUN_TARG_arm-linux-androideabi=
|
||||
RUSTC_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
|
||||
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
|
||||
|
||||
# arm-unknown-linux-gnueabihf configuration
|
||||
CROSS_PREFIX_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-
|
||||
@ -395,7 +396,7 @@ CFG_LIB_NAME_i686-pc-mingw32=$(1).dll
|
||||
CFG_STATIC_LIB_NAME_i686-pc-mingw32=$(1).lib
|
||||
CFG_LIB_GLOB_i686-pc-mingw32=$(1)-*.dll
|
||||
CFG_LIB_DSYM_GLOB_i686-pc-mingw32=$(1)-*.dylib.dSYM
|
||||
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600 -I$(CFG_SRC_DIR)src/etc/mingw-fix-include
|
||||
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -g -m32 -march=i686 -D_WIN32_WINNT=0x0600 -I$(CFG_SRC_DIR)src/etc/mingw-fix-include
|
||||
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
|
||||
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
|
||||
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
|
||||
|
39
mk/rt.mk
39
mk/rt.mk
@ -23,39 +23,6 @@
|
||||
# fit the experimental data (i.e., I was able to get the system
|
||||
# working under these assumptions).
|
||||
|
||||
# Hack for passing flags into LIBUV, see below.
|
||||
define DEF_LIBUV_FLAGS
|
||||
ifeq ($(HOST_$(1)), i386)
|
||||
ifneq (,$(findstring mingw32,$(OSTYPE_$(1))))
|
||||
# Don't add -fPIC since it's ignored for this target
|
||||
# and it will just cause the build to fail due to -Werror
|
||||
LIBUV_FLAGS_$(1) = -m32 -I$(S)src/etc/mingw-fix-include
|
||||
else
|
||||
LIBUV_FLAGS_$(1) = -m32 -fPIC -I$(S)src/etc/mingw-fix-include
|
||||
endif
|
||||
else ifeq ($(HOST_$(1)), x86_64)
|
||||
ifneq (,$(findstring mingw32,$(OSTYPE_$(1))))
|
||||
# Don't add -fPIC since it's ignored for this target
|
||||
# and it will just cause the build to fail due to -Werror
|
||||
LIBUV_FLAGS_$(1) = -m64
|
||||
else
|
||||
LIBUV_FLAGS_$(1) = -m64 -fPIC
|
||||
endif
|
||||
else ifeq ($(HOST_$(1)), arm)
|
||||
ifeq ($(OSTYPE_$(1)), apple-darwin)
|
||||
IOS_SDK := $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
|
||||
LIBUV_FLAGS_$(1) = -fPIC -std=gnu99 -I$(IOS_SDK)/usr/include -I$(IOS_SDK)/usr/include/c++/4.2.1
|
||||
else
|
||||
LIBUV_FLAGS_$(1) = -fPIC -std=gnu99
|
||||
endif
|
||||
else ifeq ($(HOST_$(1)), mips)
|
||||
LIBUV_FLAGS_$(1) = -fPIC -mips32r2 -msoft-float -mabi=32
|
||||
else
|
||||
LIBUV_FLAGS_$(1) = -fPIC -std=gnu99
|
||||
endif
|
||||
endef
|
||||
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_LIBUV_FLAGS,$(t))))
|
||||
|
||||
# when we're doing a snapshot build, we intentionally degrade as many
|
||||
# features in libuv and the runtime as possible, to ease portability.
|
||||
|
||||
@ -238,15 +205,15 @@ $$(LIBUV_MAKEFILE_$(1)): $$(LIBUV_DEPS)
|
||||
ifdef CFG_WINDOWSY_$(1)
|
||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
|
||||
$$(Q)$$(MAKE) -C $$(S)src/libuv -f Makefile.mingw \
|
||||
CC="$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) $$(LIBUV_FLAGS_$(1)) $$(SNAP_DEFINES)" \
|
||||
CC="$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) $$(SNAP_DEFINES)" \
|
||||
AR="$$(AR_$(1))" \
|
||||
V=$$(VERBOSE)
|
||||
$$(Q)cp $$(S)src/libuv/libuv.a $$@
|
||||
else
|
||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1))
|
||||
$$(Q)$$(MAKE) -C $$(@D) \
|
||||
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1)) $$(LIBUV_FLAGS_$(1)) $$(SNAP_DEFINES)" \
|
||||
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS_$(1)) $$(LIBUV_FLAGS_$(1))" \
|
||||
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1)) $$(SNAP_DEFINES)" \
|
||||
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS_$(1))" \
|
||||
CC="$$(CC_$(1))" \
|
||||
CXX="$$(CXX_$(1))" \
|
||||
AR="$$(AR_$(1))" \
|
||||
|
Loading…
Reference in New Issue
Block a user