mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 21:17:52 +00:00
Bug 1317504 - Make MSVC builds use the LINK variable instead of LD. r=chmanchester
At the same time, remove HOST_LD. It was only used for MSVC builds, which don't support cross-compile anyways, so we can, at least for now, use LINK for both host and target. --HG-- extra : rebase_source : 9ee9e7e1bd3edefc043fa63d5c03f2a242f76982
This commit is contained in:
parent
c1d2e37624
commit
07083a8dfb
@ -413,7 +413,7 @@ set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
|
||||
link = check_prog('LINK', depends_win()(lambda: ('link.exe',)),
|
||||
paths=vc_compiler_path)
|
||||
|
||||
add_old_configure_assignment('LD', depends_win(link)(lambda x: x))
|
||||
add_old_configure_assignment('LINK', depends_win(link)(lambda x: x))
|
||||
|
||||
|
||||
# Normally, we'd just have CC, etc. set to absolute paths, but the build system
|
||||
|
@ -548,7 +548,7 @@ EXPAND_LIBS_GEN = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_gen.py
|
||||
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
|
||||
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
|
||||
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
|
||||
EXPAND_LD = $(EXPAND_LIBS_EXEC) --uselist -- $(LD)
|
||||
EXPAND_LINK = $(EXPAND_LIBS_EXEC) --uselist -- $(LINK)
|
||||
EXPAND_MKSHLIB_ARGS = --uselist
|
||||
ifdef SYMBOL_ORDER
|
||||
EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
||||
|
@ -640,7 +640,7 @@ $(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESF
|
||||
$(REPORT_BUILD)
|
||||
@$(RM) $@.manifest
|
||||
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
|
||||
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
$(EXPAND_LINK) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
if test -f '$(srcdir)/$@.manifest'; then \
|
||||
@ -675,7 +675,7 @@ endif
|
||||
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(REPORT_BUILD)
|
||||
ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
|
||||
$(EXPAND_LIBS_EXEC) -- $(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
$(EXPAND_LIBS_EXEC) -- $(LINK) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
if test -f '$(srcdir)/$@.manifest'; then \
|
||||
@ -712,7 +712,7 @@ endif
|
||||
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(REPORT_BUILD)
|
||||
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
|
||||
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
$(EXPAND_LINK) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
|
||||
@ -734,7 +734,7 @@ endif
|
||||
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(REPORT_BUILD)
|
||||
ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
|
||||
$(EXPAND_LIBS_EXEC) -- $(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
$(EXPAND_LIBS_EXEC) -- $(LINK) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
else
|
||||
ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
|
||||
$(EXPAND_LIBS_EXEC) -- $(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXXFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
|
@ -208,7 +208,7 @@ case "$target" in
|
||||
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
|
||||
|
||||
# Check linker version
|
||||
_LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_FULL_VERSION=`"${LINK}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||
@ -677,7 +677,6 @@ case "$target" in
|
||||
TARGET_COMPILER_ABI=msvc
|
||||
HOST_CC='$(CC)'
|
||||
HOST_CXX='$(CXX)'
|
||||
HOST_LD='$(LD)'
|
||||
if test "$AS_BIN"; then
|
||||
AS="$(basename "$AS_BIN")"
|
||||
fi
|
||||
@ -692,8 +691,8 @@ case "$target" in
|
||||
DLL_PREFIX=
|
||||
LIB_PREFIX=
|
||||
IMPORT_LIB_SUFFIX=lib
|
||||
MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
dnl Set subsystem version 5 for Windows XP.
|
||||
if test "$CPU_ARCH" = "x86"; then
|
||||
WIN32_SUBSYSTEM_VERSION=5.01
|
||||
@ -2165,7 +2164,6 @@ AC_SUBST(HOST_LDFLAGS)
|
||||
AC_SUBST(HOST_OPTIMIZE_FLAGS)
|
||||
AC_SUBST(HOST_AR)
|
||||
AC_SUBST(HOST_AR_FLAGS)
|
||||
AC_SUBST(HOST_LD)
|
||||
AC_SUBST(HOST_RANLIB)
|
||||
AC_SUBST(HOST_BIN_SUFFIX)
|
||||
|
||||
|
@ -297,7 +297,7 @@ case "$target" in
|
||||
fi
|
||||
|
||||
# Check linker version
|
||||
_LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_FULL_VERSION=`"${LINK}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||
@ -964,7 +964,6 @@ case "$target" in
|
||||
MOZ_FOLD_LIBS_FLAGS=-mnop-fun-dllimport
|
||||
else
|
||||
TARGET_COMPILER_ABI=msvc
|
||||
HOST_LD='$(LD)'
|
||||
if test "$AS_BIN"; then
|
||||
AS="$(basename "$AS_BIN")"
|
||||
fi
|
||||
@ -979,8 +978,8 @@ case "$target" in
|
||||
DLL_PREFIX=
|
||||
LIB_PREFIX=
|
||||
IMPORT_LIB_SUFFIX=lib
|
||||
MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
dnl Set subsystem version 5 for Windows XP.
|
||||
if test "$CPU_ARCH" = "x86"; then
|
||||
WIN32_SUBSYSTEM_VERSION=5.01
|
||||
@ -5626,7 +5625,6 @@ AC_SUBST(HOST_LDFLAGS)
|
||||
AC_SUBST(HOST_OPTIMIZE_FLAGS)
|
||||
AC_SUBST(HOST_AR)
|
||||
AC_SUBST(HOST_AR_FLAGS)
|
||||
AC_SUBST(HOST_LD)
|
||||
AC_SUBST(HOST_RANLIB)
|
||||
AC_SUBST(HOST_BIN_SUFFIX)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user