CROSS_BUILD=1
EXTRA_PATH="/mnt/MICROS~1/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64:"
TOOLTOOL_DIR=/tooltool11
FXC=${TOOLTOOL_DIR}/fxc2/bin/fxc2.exe
X=$(($(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN)))

export AR="${TOOLTOOL_DIR}/mingw-w64-clang/bin/llvm-lib"
export CC="${TOOLTOOL_DIR}/mingw-w64-clang/bin/clang-cl"
export CBINDGEN="${TOOLTOOL_DIR}/cbindgen/cbindgen"
export CXX="${TOOLTOOL_DIR}/mingw-w64-clang/bin/clang-cl"
export DIA_SDK_PATH="/mnt/MICROS~1/2017/Community/DIASDK~1/"
export HOST_CC="${TOOLTOOL_DIR}/mingw-w64-clang/bin/clang"
export HOST_CXX="${TOOLTOOL_DIR}/mingw-w64-clang/bin/clang++"
export LINKER="${TOOLTOOL_DIR}/mingw-w64-clang/bin/lld-link"
export LLVM_DLLTOOL="${TOOLTOOL_DIR}/mingw-w64-clang/bin/llvm-dlltool"
export MOZ_INCLUDE_SOURCE_INFO=1
export MOZ_LTO=cross
export MOZ_REQUIRE_SIGNING=0
export WINDOWSSDKDIR="/mnt/WINDOW~1/10/"
export WIN32_REDIST_DIR="/mnt/MICROS~1/2017/Community/VC/Redist/MSVC/14.16.27012/x64/Microsoft.VC141.CRT/"
export WIN_UCRT_REDIST_DIR="${WINDOWSSDKDIR}/Redist/ucrt/DLLs/x64"

mk_add_options "export LD_PRELOAD=/tooltool11/liblowercase/liblowercase.so"
mk_add_options "export LOWERCASE_DIRS=/mnt"
mk_add_options "export PATH=${TOOLTOOL_DIR}/wine/bin:{TOOLTOOL_DIR}/fxc2/bin:/mnt/LLVM/bin:/home/akontos/tooltool11/mingw-w64-clang/bin:$EXTRA_PATH$PATH"
mk_add_options MOZ_MAKE_FLAGS=-j16

ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
ac_add_options --disable-bits-download
ac_add_options --disable-debug
ac_add_options --disable-default-browser-agent
ac_add_options --disable-dmd
ac_add_options --disable-geckodriver
ac_add_options --disable-maintenance-service
ac_add_options --disable-parental-controls
ac_add_options --disable-profiling
ac_add_options --disable-tests
ac_add_options --disable-verify-mar

ac_add_options --enable-ccache=${TOOLTOOL_DIR}/sccache/sccache
ac_add_options --enable-optimize="-O2 -Qvec -w"
ac_add_options --enable-proxy-bypass-protection
ac_add_options --enable-rust-simd
ac_add_options --enable-updater

ac_add_options --target=x86_64-pc-mingw32

ac_add_options --with-branding=browser/branding/waterfox
ac_add_options --with-l10n-base=$PWD/browser/locales/l10n
