зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1904873 - Move HOST_LDFLAGS from old-configure to moz.configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D214988
This commit is contained in:
Родитель
7e492ed44a
Коммит
c95a2597fc
|
@ -589,6 +589,20 @@ def host_cflags(base_cxxflags, compilation_flags, host_common_flags):
|
|||
return flags
|
||||
|
||||
|
||||
@depends("HOST_LDFLAGS", linker_flags, host_linker_ldflags, host, host_c_compiler)
|
||||
@imports(_from="mozbuild.shellutil", _import="split")
|
||||
def host_ldflags(env_ldflags, linker_flags, host_linker_ldflags, host, compiler):
|
||||
flags = split(env_ldflags[0])
|
||||
flags += host_linker_ldflags
|
||||
if host.kernel == "WINNT" and compiler.type == "clang-cl":
|
||||
if host.cpu == "x86":
|
||||
flags += ["-MACHINE:X86"]
|
||||
elif host.cpu == "x86_64":
|
||||
flags += ["-MACHINE:X64"]
|
||||
flags += linker_flags.host_ldflags
|
||||
return flags
|
||||
|
||||
|
||||
# Please keep these last in this file.
|
||||
add_old_configure_assignment("_COMPILATION_ASFLAGS", asm_flags.asflags)
|
||||
add_old_configure_assignment("_COMPILATION_HOST_ASFLAGS", asm_flags.host_asflags)
|
||||
|
@ -596,11 +610,11 @@ add_old_configure_assignment("_COMPILATION_LDFLAGS", linker_flags.ldflags)
|
|||
add_old_configure_assignment(
|
||||
"_COMPILATION_OPTIMIZE_LDFLAGS", linker_optimize_flags.ldflags
|
||||
)
|
||||
add_old_configure_assignment("_COMPILATION_HOST_LDFLAGS", linker_flags.host_ldflags)
|
||||
|
||||
add_old_configure_assignment("_COMPILATION_CFLAGS", compilation_flags.cflags)
|
||||
add_old_configure_assignment("_COMPILATION_CXXFLAGS", compilation_flags.cxxflags)
|
||||
|
||||
set_config("HOST_CFLAGS", host_cflags)
|
||||
set_config("HOST_CXXFLAGS", host_cflags)
|
||||
set_config("HOST_LDFLAGS", host_ldflags)
|
||||
set_config("DSO_LDOPTS", dso_flags.ldopts)
|
||||
|
|
|
@ -22,6 +22,14 @@ option(
|
|||
)
|
||||
|
||||
|
||||
option(
|
||||
env="HOST_LDFLAGS",
|
||||
help="Extra flags for linking host object files.",
|
||||
nargs=1,
|
||||
default="",
|
||||
)
|
||||
|
||||
|
||||
# Code optimization
|
||||
# ==============================================================
|
||||
|
||||
|
@ -2103,7 +2111,6 @@ linker_ldflags = linker_ldflags_tmpl(target)
|
|||
add_old_configure_assignment("LINKER_LDFLAGS", linker_ldflags)
|
||||
|
||||
host_linker_ldflags = linker_ldflags_tmpl(host)
|
||||
add_old_configure_assignment("HOST_LINKER_LDFLAGS", host_linker_ldflags)
|
||||
|
||||
|
||||
# There's a wrinkle with MinGW: linker configuration is not enabled, so
|
||||
|
|
|
@ -13,6 +13,7 @@ unset HOST_CC
|
|||
unset HOST_CXX
|
||||
unset HOST_CFLAGS
|
||||
unset HOST_CXXFLAGS
|
||||
unset HOST_LDFLAGS
|
||||
unset LINKER
|
||||
unset RUSTFLAGS
|
||||
unset TOOLCHAIN_PREFIX
|
||||
|
|
|
@ -22,7 +22,6 @@ CFLAGS="${CFLAGS=}"
|
|||
CPPFLAGS="${CPPFLAGS=}"
|
||||
CXXFLAGS="${CXXFLAGS=}"
|
||||
LDFLAGS="${LDFLAGS=}"
|
||||
HOST_LDFLAGS="${HOST_LDFLAGS=}"
|
||||
|
||||
dnl Propagate extra android flags
|
||||
dnl =============================
|
||||
|
@ -41,7 +40,6 @@ dnl ========================================================
|
|||
W32API_VERSION=3.14
|
||||
|
||||
LDFLAGS="$LDFLAGS $LINKER_LDFLAGS $PACK_REL_RELOC_FLAGS"
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS $HOST_LINKER_LDFLAGS"
|
||||
|
||||
if test -z "$JS_STANDALONE"; then
|
||||
autoconfmk=autoconf-js.mk
|
||||
|
@ -159,19 +157,6 @@ dnl ========================================================
|
|||
case "$host" in
|
||||
*mingw*)
|
||||
HOST_BIN_SUFFIX=.exe
|
||||
|
||||
case "${host_cpu}" in
|
||||
i*86)
|
||||
if test "$HOST_CC_TYPE" = clang-cl; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86"
|
||||
fi
|
||||
;;
|
||||
x86_64)
|
||||
if test "$HOST_CC_TYPE" = clang-cl; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -384,10 +369,6 @@ LDFLAGS=`echo \
|
|||
$LDFLAGS \
|
||||
$_COMPILATION_LDFLAGS`
|
||||
|
||||
HOST_LDFLAGS=`echo \
|
||||
$HOST_LDFLAGS \
|
||||
$_COMPILATION_HOST_LDFLAGS`
|
||||
|
||||
OS_CFLAGS="$CFLAGS"
|
||||
OS_CXXFLAGS="$CXXFLAGS"
|
||||
OS_CPPFLAGS="$CPPFLAGS"
|
||||
|
@ -400,7 +381,6 @@ AC_SUBST_LIST(OS_LDFLAGS)
|
|||
AC_SUBST(HOST_CC)
|
||||
AC_SUBST(HOST_CXX)
|
||||
AC_SUBST_LIST(HOST_CPPFLAGS)
|
||||
AC_SUBST(HOST_LDFLAGS)
|
||||
AC_SUBST(HOST_BIN_SUFFIX)
|
||||
|
||||
AC_SUBST(BIN_SUFFIX)
|
||||
|
|
|
@ -22,7 +22,6 @@ CFLAGS="${CFLAGS=}"
|
|||
CPPFLAGS="${CPPFLAGS=}"
|
||||
CXXFLAGS="${CXXFLAGS=}"
|
||||
LDFLAGS="${LDFLAGS=}"
|
||||
HOST_LDFLAGS="${HOST_LDFLAGS=}"
|
||||
|
||||
|
||||
dnl Propagate extra android flags
|
||||
|
@ -43,7 +42,6 @@ W32API_VERSION=3.14
|
|||
|
||||
|
||||
LDFLAGS="$LDFLAGS $LINKER_LDFLAGS $PACK_REL_RELOC_FLAGS"
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS $HOST_LINKER_LDFLAGS"
|
||||
|
||||
dnl ========================================================
|
||||
dnl Checks for compilers.
|
||||
|
@ -163,19 +161,6 @@ dnl ========================================================
|
|||
case "$host" in
|
||||
*mingw*)
|
||||
HOST_BIN_SUFFIX=.exe
|
||||
|
||||
case "${host_cpu}" in
|
||||
i*86)
|
||||
if test "$HOST_CC_TYPE" = clang-cl; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86"
|
||||
fi
|
||||
;;
|
||||
x86_64)
|
||||
if test "$HOST_CC_TYPE" = clang-cl; then
|
||||
HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -537,10 +522,6 @@ LDFLAGS=`echo \
|
|||
$LDFLAGS \
|
||||
$_COMPILATION_LDFLAGS`
|
||||
|
||||
HOST_LDFLAGS=`echo \
|
||||
$HOST_LDFLAGS \
|
||||
$_COMPILATION_HOST_LDFLAGS`
|
||||
|
||||
OS_CFLAGS="$CFLAGS"
|
||||
OS_CXXFLAGS="$CXXFLAGS"
|
||||
OS_CPPFLAGS="$CPPFLAGS"
|
||||
|
@ -553,7 +534,6 @@ AC_SUBST_LIST(OS_LDFLAGS)
|
|||
AC_SUBST(HOST_CC)
|
||||
AC_SUBST(HOST_CXX)
|
||||
AC_SUBST_LIST(HOST_CPPFLAGS)
|
||||
AC_SUBST(HOST_LDFLAGS)
|
||||
AC_SUBST(HOST_BIN_SUFFIX)
|
||||
|
||||
AC_SUBST(BIN_SUFFIX)
|
||||
|
|
Загрузка…
Ссылка в новой задаче