From f33335cf10ef5c6005c529e08f569e19869256c8 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Mon, 28 Jan 2019 21:06:01 +0000 Subject: [PATCH] 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 --- browser/config/mozconfigs/win64/code-coverage | 1 - build/mozconfig.clang-cl | 2 -- build/mozconfig.lld-link | 2 -- build/mozconfig.vs-common | 4 ---- build/win32/mozconfig.vs2017 | 10 ---------- build/win64-aarch64/mozconfig.vs2017 | 9 --------- build/win64/mozconfig.asan | 2 -- build/win64/mozconfig.vs2017 | 10 ---------- js/src/devtools/automation/winbuildenv.sh | 11 ++++++----- 9 files changed, 6 insertions(+), 45 deletions(-) delete mode 100644 build/mozconfig.vs-common diff --git a/browser/config/mozconfigs/win64/code-coverage b/browser/config/mozconfigs/win64/code-coverage index 0770c945afa1..d80d2e8bab2a 100644 --- a/browser/config/mozconfigs/win64/code-coverage +++ b/browser/config/mozconfigs/win64/code-coverage @@ -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 diff --git a/build/mozconfig.clang-cl b/build/mozconfig.clang-cl index bcb5398fde67..efaec52e1d95 100644 --- a/build/mozconfig.clang-cl +++ b/build/mozconfig.clang-cl @@ -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 diff --git a/build/mozconfig.lld-link b/build/mozconfig.lld-link index d63405bd3e03..56f0878ec5c1 100644 --- a/build/mozconfig.lld-link +++ b/build/mozconfig.lld-link @@ -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 diff --git a/build/mozconfig.vs-common b/build/mozconfig.vs-common deleted file mode 100644 index ca5df2f3aa2b..000000000000 --- a/build/mozconfig.vs-common +++ /dev/null @@ -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%)" -} diff --git a/build/win32/mozconfig.vs2017 b/build/win32/mozconfig.vs2017 index 031cb3ad6c27..49e9bbddf359 100644 --- a/build/win32/mozconfig.vs2017 +++ b/build/win32/mozconfig.vs2017 @@ -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 diff --git a/build/win64-aarch64/mozconfig.vs2017 b/build/win64-aarch64/mozconfig.vs2017 index 8df80d7d2c4a..7ee2c709a82e 100644 --- a/build/win64-aarch64/mozconfig.vs2017 +++ b/build/win64-aarch64/mozconfig.vs2017 @@ -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 diff --git a/build/win64/mozconfig.asan b/build/win64/mozconfig.asan index af6f1817e64e..c0872d2908f7 100644 --- a/build/win64/mozconfig.asan +++ b/build/win64/mozconfig.asan @@ -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" diff --git a/build/win64/mozconfig.vs2017 b/build/win64/mozconfig.vs2017 index 4601f8105a3a..22a9cdf1c4ec 100644 --- a/build/win64/mozconfig.vs2017 +++ b/build/win64/mozconfig.vs2017 @@ -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 diff --git a/js/src/devtools/automation/winbuildenv.sh b/js/src/devtools/automation/winbuildenv.sh index 4dd358177fb9..86b98a4eca70 100644 --- a/js/src/devtools/automation/winbuildenv.sh +++ b/js/src/devtools/automation/winbuildenv.sh @@ -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.