# This script is for building a mingw-clang toolchain for use on Linux.
if [[ $# -eq 0 ]]; then echo"Provide either x86 or x64 to specify a toolchain."
exit 1; elif [ "$1" == "x86" ]; then
machine="i686"
compiler_rt_machine="i386"
crt_flags="--enable-lib32 --disable-lib64"
WRAPPER_FLAGS="" elif [ "$1" == "x64" ]; then
machine="x86_64"
compiler_rt_machine="x86_64"
crt_flags="--disable-lib32 --enable-lib64"
WRAPPER_FLAGS="" else echo"Provide either x86 or x64 to specify a toolchain."
exit 1; fi
if [ -d "$MOZ_FETCHES_DIR/binutils/bin" ]; then export PATH="$MOZ_FETCHES_DIR/binutils/bin:$PATH" fi
# This is default value of _WIN32_WINNT. Gecko configure script explicitly sets this, # so this is not used to build Gecko itself. We default to 0x601, which is Windows 7.
default_win32_winnt=0x601
# clang-21 ONLY: this script is shared by the clang-21, clang-22 and clang-trunk # mingw builds. The upstream fix llvm/llvm-project@0991d7b8fd01 adapts libunwind's # Unwind-seh.cpp to mingw-w64 making EXCEPTION_DISPOSITION an enum (mingw-w64 # 05a0980). It is already present in the clang-22 and clang-trunk source but is # missing from the clang 21.1.x release, so we backport it here. The guard below # skips the patch once the source already contains the fix, so this patch (and # taskcluster/scripts/misc/mingw-libunwind-seh.patch) can be dropped when the mingw # build is bumped to clang-22.
patch_libunwind="$(pwd)/taskcluster/scripts/misc/mingw-libunwind-seh.patch"
pushd $TOOLCHAIN_DIR if grep -q 'return 4 /\* ExceptionExecuteHandler in mingw \*/' libunwind/src/Unwind-seh.cpp; then
patch -p1 <$patch_libunwind fi
popd
}
build_runtimes() { # Below, we specify -g -gcodeview to build static libraries with debug information. # Because we're not distributing these builds, this is fine. If one were to distribute # the builds, perhaps one would want to make those flags conditional or investigation # other options.
DEBUG_FLAGS="-g -gcodeview"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.