Skip to content

Commit

Permalink
Bug 1523145 - Remove mk_export_correct_style. r=froydnj
Browse files Browse the repository at this point in the history
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
  • Loading branch information
glandium committed Jan 28, 2019
1 parent ba16bbd commit f33335c
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 45 deletions.
1 change: 0 additions & 1 deletion browser/config/mozconfigs/win64/code-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions build/mozconfig.clang-cl
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 0 additions & 2 deletions build/mozconfig.lld-link
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions build/mozconfig.vs-common

This file was deleted.

10 changes: 0 additions & 10 deletions build/win32/mozconfig.vs2017
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 0 additions & 9 deletions build/win64-aarch64/mozconfig.vs2017
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions build/win64/mozconfig.asan
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
10 changes: 0 additions & 10 deletions build/win64/mozconfig.vs2017
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 6 additions & 5 deletions js/src/devtools/automation/winbuildenv.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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.
Expand Down

0 comments on commit f33335c

Please sign in to comment.