4 INSTALL_DIR
=$MOZ_FETCHES_DIR/nsis
10 export PATH
="$MOZ_FETCHES_DIR/binutils/bin:$MOZ_FETCHES_DIR/clang/bin:$PATH"
12 # Call.S, included from CallCPP.S contains directives that clang's integrated
13 # assembler doesn't understand.
14 cat <<'EOF' >$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-gcc
18 $(dirname $0)/i686-w64-mingw32-clang -fno-integrated-as "$@"
21 $(dirname $0)/i686-w64-mingw32-clang "$@"
26 chmod +x
$MOZ_FETCHES_DIR/clang
/bin
/i686-w64-mingw32-gcc
27 ln -s i686-w64-mingw32-clang
++ $MOZ_FETCHES_DIR/clang
/bin
/i686-w64-mingw32-g
++
32 make -f win32
/Makefile.gcc PREFIX
=i686-w64-mingw32-
35 patch -p1 < $GECKO_PATH/build
/win32
/nsis-no-insert-timestamp.
patch
36 patch -p1 < $GECKO_PATH/build
/win32
/nsis-no-underscore.
patch
37 patch -p1 < $GECKO_PATH/build
/win32
/nsis-scons.
patch
38 # --exclude-libs is not supported by lld, but is not required anyways.
39 # /fixed is passed by the build system when building with MSVC but not
40 # when building with GCC/binutils. The build system doesn't really support
41 # clang/lld, but apparently binutils and lld don't have the same defaults
42 # related to this. Unfortunately, /fixed is necessary for the stubs to be
43 # handled properly by the resource editor in NSIS, which doesn't handle
44 # relocations, so we pass the equivalent flag to lld-link through lld through
46 sed -i 's/-Wl,--exclude-libs,msvcrt.a/-Wl,-Xlink=-fixed/' SCons
/Config
/gnu
47 # memcpy.c and memset.c are built with a C++ compiler so we need to
48 # avoid their symbols being mangled.
49 sed -i '2i extern "C"' SCons
/Config
/{memcpy
,memset
}.c
50 # Makensisw is skipped because its resource file fails to build with
51 # llvm-rc, but we don't need makensisw.
54 CC
="clang --sysroot $MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu" \
55 CXX
="clang++ --sysroot $MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu" \
56 XGCC_W32_PREFIX
=i686-w64-mingw32- \
57 ZLIB_W32
=..
/zlib-1.3
.1 \
58 SKIPUTILS
="NSIS Menu,Makensisw" \
59 PREFIX_DEST
=$INSTALL_DIR/ \
61 NSIS_CONFIG_CONST_DATA_PATH
=no \
68 tar caf nsis.
tar.zst nsis
71 cp nsis.
tar.
* $UPLOAD_DIR