Bug 1523145 - Remove mk_export_correct_style. r=froydnj

It turns out, we don't need to `mk_add_options export` the variables
from the in-tree mozconfigs. If anything, that causes problems when
trying to simplify the mozconfigs, because it makes the variables
exported from .mozconfig.mk, overriding what configure may change and
store in autoconf.mk.

All the variables are handled by configure in a way that makes them
available in autoconf.mk, so there's no loss there, and with the
python/shell-based mozconfig loader, it turns out we don't need to go
through extra normalization via cmd.

autospider.py, being its own pseudo-mozconfig parser, still does need
it, though, but it was hooking into it already, so just inline that.

Differential Revision: https://phabricator.services.mozilla.com/D17769

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2019-01-28 21:06:01 +00:00
parent ba16bbdf4f
commit f33335cf10
9 changed files with 6 additions and 45 deletions

View File

@ -25,7 +25,6 @@ if [ -d "$topsrcdir/clang" ]; then
CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
export LIB=$LIB:$CLANG_LIB_DIR
mk_export_correct_style LIB
export LDFLAGS="clang_rt.profile-x86_64.lib"
fi

View File

@ -1,12 +1,10 @@
if test -d "$topsrcdir/clang/bin"; then
CLANG_DIR=`cd "$topsrcdir/clang/bin" ; pwd`
export PATH="${CLANG_DIR}:${PATH}"
mk_export_correct_style PATH
if $(cd $topsrcdir/clang/lib/clang/* && test -d lib/windows); then
CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
export LIB=$LIB:$CLANG_LIB_DIR
mk_export_correct_style LIB
fi
fi

View File

@ -1,8 +1,6 @@
if test -d "$topsrcdir/clang/bin"; then
CLANG_DIR=`cd "$topsrcdir/clang/bin" ; pwd`
export PATH="${CLANG_DIR}:${PATH}"
mk_export_correct_style PATH
fi
export LINKER=lld-link

View File

@ -1,4 +0,0 @@
# Pymake needs Windows-style paths. Use cmd.exe to hack around this.
mk_export_correct_style() {
mk_add_options "export $1=$(cmd.exe //c echo %$1%)"
}

View File

@ -23,13 +23,3 @@ if [ -d "${VSPATH}" ]; then
fi
ac_add_options --target=i686-pc-mingw32
. $topsrcdir/build/mozconfig.vs-common
mk_export_correct_style WINDOWSSDKDIR
mk_export_correct_style WIN32_REDIST_DIR
mk_export_correct_style WIN_UCRT_REDIST_DIR
mk_export_correct_style WIN_DIA_SDK_BIN_DIR
mk_export_correct_style PATH
mk_export_correct_style INCLUDE
mk_export_correct_style LIB

View File

@ -35,12 +35,3 @@ if [ -d "${VSPATH}" ]; then
export WIN64_LINK="${VSPATH}/VC/bin/Hostx64/x64/link.exe"
export WIN64_LIB="${VSPATH}/VC/lib/x64:${VSPATH}/VC/atlmfc/lib/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/ucrt/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/um/x64:${VSPATH}/DIA SDK/lib/amd64"
fi
. $topsrcdir/build/mozconfig.vs-common
mk_export_correct_style WINDOWSSDKDIR
mk_export_correct_style WIN32_REDIST_DIR
mk_export_correct_style WIN_DIA_SDK_BIN_DIR
mk_export_correct_style PATH
mk_export_correct_style INCLUDE
mk_export_correct_style LIB

View File

@ -4,7 +4,6 @@ if [ -d "$topsrcdir/clang" ]; then
CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
export LIB=$LIB:$CLANG_LIB_DIR
mk_export_correct_style LIB
export LDFLAGS="clang_rt.asan_dynamic-x86_64.lib clang_rt.asan_dynamic_runtime_thunk-x86_64.lib"
export MOZ_COPY_PDBS=1
@ -22,6 +21,5 @@ ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
ac_add_options --disable-profiling
. "$topsrcdir/build/mozconfig.vs-common"
. "$topsrcdir/build/mozconfig.clang-cl"
. "$topsrcdir/build/mozconfig.lld-link"

View File

@ -17,13 +17,3 @@ if [ -d "${VSPATH}" ]; then
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/${win_sdk_version}/ucrt:${VSPATH}/SDK/Include/${win_sdk_version}/shared:${VSPATH}/SDK/Include/${win_sdk_version}/um:${VSPATH}/SDK/Include/${win_sdk_version}/winrt:${VSPATH}/DIA SDK/include"
export LIB="${VSPATH}/VC/lib/x64:${VSPATH}/VC/atlmfc/lib/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/ucrt/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/um/x64:${VSPATH}/DIA SDK/lib/amd64"
fi
. $topsrcdir/build/mozconfig.vs-common
mk_export_correct_style WINDOWSSDKDIR
mk_export_correct_style WIN32_REDIST_DIR
mk_export_correct_style WIN_UCRT_REDIST_DIR
mk_export_correct_style WIN_DIA_SDK_BIN_DIR
mk_export_correct_style PATH
mk_export_correct_style INCLUDE
mk_export_correct_style LIB

View File

@ -1,8 +1,5 @@
# We will be sourcing mozconfig files, which end up calling mk_add_options with
# various settings. We only need the variable settings they create along the
# way. Print them out, to be sucked up when running this file.
mk_add_options() {
echo "$@"
mk_export_correct_style() {
echo "export $1=$(cmd.exe //c echo %$1%)"
}
topsrcdir="$SOURCE"
@ -28,6 +25,10 @@ fi
mk_export_correct_style CC
mk_export_correct_style CXX
mk_export_correct_style LINKER
mk_export_correct_style WINDOWSSDKDIR
mk_export_correct_style PATH
mk_export_correct_style INCLUDE
mk_export_correct_style LIB
# PATH also needs to point to mozmake.exe, which can come from either
# newer mozilla-build or tooltool.