Bug 1731195 - Use a linux-native makensis for Windows cross-builds. r=firefox-build-system-reviewers,andi

Because the result is 99% identical to the win64-nsis toolchain, we
produce a single toolchain that can be used both on native windows and
on cross builds.

Differential Revision: https://phabricator.services.mozilla.com/D125926
This commit is contained in:
Mike Hommey 2021-09-17 09:11:22 +00:00
Родитель 9fc3821798
Коммит c2981c2307
8 изменённых файлов: 73 добавлений и 50 удалений

Просмотреть файл

@ -59,8 +59,8 @@ win32/debug:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- win64-nsis
fetch:
- upx-3.95-win
@ -113,8 +113,8 @@ win32/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- win64-nsis
fetch:
- upx-3.95-win
@ -167,9 +167,9 @@ win64/debug:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
@ -219,9 +219,9 @@ win64-hybrid/plain:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
@ -274,9 +274,9 @@ win64-fuzzing/debug:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
optimization:
@ -320,7 +320,7 @@ win64-plain/debug:
- win64-winchecksec
- win64-mozmake
- win64-dump_syms
- win64-nsis
- nsis
- sysroot-wasm32-wasi
optimization:
skip-unless-expanded: null
@ -378,9 +378,9 @@ win64/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
@ -422,7 +422,7 @@ win64-plain/opt:
- win64-winchecksec
- win64-mozmake
- win64-dump_syms
- win64-nsis
- nsis
- sysroot-wasm32-wasi
optimization:
skip-unless-expanded: null
@ -490,8 +490,8 @@ win32-shippable/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- win64-nsis
fetch:
- upx-3.95-win
@ -547,9 +547,9 @@ win64-shippable/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
@ -599,8 +599,8 @@ win32-add-on-devel/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- win64-nsis
fetch:
- upx-3.95-win
@ -650,9 +650,9 @@ win64-add-on-devel/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
@ -702,9 +702,9 @@ win64-noopt/debug:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
@ -754,8 +754,8 @@ win32-noopt/debug:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- win64-nsis
fetch:
- upx-3.95-win
@ -982,7 +982,7 @@ win64-ccov/opt:
- win64-winchecksec
- win64-mozmake
- win64-dump_syms
- win64-nsis
- nsis
- sysroot-wasm32-wasi
win64-asan/debug:
@ -1031,10 +1031,10 @@ win64-asan/debug:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-llvm-symbolizer
- win64-nsis
fetch:
- upx-3.95-win
optimization:
@ -1087,10 +1087,10 @@ win64-asan/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-llvm-symbolizer
- win64-nsis
fetch:
- upx-3.95-win
@ -1152,10 +1152,10 @@ win64-asan-reporter-shippable/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-llvm-symbolizer
- win64-nsis
fetch:
- upx-3.95-win
@ -1204,10 +1204,10 @@ win64-asan-fuzzing/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-llvm-symbolizer
- win64-nsis
fetch:
- upx-3.95-win
optimization:
@ -1276,8 +1276,8 @@ win32-devedition/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- win64-nsis
fetch:
- upx-3.95-win
@ -1334,9 +1334,9 @@ win64-devedition/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
@ -1388,9 +1388,9 @@ win64-aarch64/debug:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
optimization:
@ -1450,9 +1450,9 @@ win64-aarch64/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
optimization:
@ -1495,7 +1495,7 @@ win64-aarch64-eme/opt:
toolchain:
- linux64-node
- linux64-wine
- win64-nsis
- nsis
fetch:
- upx-3.95-win
optimization:
@ -1594,7 +1594,7 @@ win64-aarch64-shippable/opt:
toolchain:
- linux64-node
- linux64-wine
- win64-nsis
- nsis
fetch:
- upx-3.95-win
optimization:
@ -1656,9 +1656,9 @@ win64-aarch64-shippable-no-eme/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win
optimization:
@ -1758,7 +1758,7 @@ win64-aarch64-devedition/opt:
toolchain:
- linux64-node
- linux64-wine
- win64-nsis
- nsis
fetch:
- upx-3.95-win
@ -1819,8 +1819,8 @@ win64-aarch64-devedition-no-eme/opt:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win

Просмотреть файл

@ -260,8 +260,8 @@ jobs:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- win64-nsis
fetch:
- upx-3.95-win
@ -304,8 +304,8 @@ jobs:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win

Просмотреть файл

@ -50,7 +50,7 @@ job-template:
win.*:
- linux64-wine
- linux64-liblowercase
- win64-nsis
- nsis
fetch:
by-build-platform:
default: []

Просмотреть файл

@ -146,9 +146,9 @@ jobs:
- linux64-wine
- linux64-liblowercase
- linux64-winchecksec
- nsis
- sysroot-x86_64-linux-gnu
- sysroot-wasm32-wasi
- win64-nsis
fetch:
- upx-3.95-win

Просмотреть файл

@ -60,7 +60,7 @@ job-template:
win.*:
- linux64-wine
- linux64-liblowercase
- win64-nsis
- nsis
fetch:
by-build-platform:
default: []

Просмотреть файл

@ -298,13 +298,17 @@ win64-mozmake:
fetch:
- gnumake
win64-nsis:
description: "NSIS for Windows"
nsis:
description: "NSIS for Linux and Windows"
treeherder:
symbol: TW64(nsis)
symbol: TL(nsis)
run:
script: repack-nsis.sh
script: build-nsis.sh
toolchain-artifact: public/build/nsis.tar.zst
fetches:
fetch:
- nsis-3.07
- nsis-3.07-win
toolchain:
- linux64-clang-12
- sysroot-x86_64-linux-gnu

Просмотреть файл

@ -0,0 +1,32 @@
#!/bin/bash
set -x -e -v
export PATH=$MOZ_FETCHES_DIR/clang/bin:$PATH
# nsis/ contains the pre-built windows native nsis. We build a linux
# makensis from source and install it there.
INSTALL_DIR=$MOZ_FETCHES_DIR/nsis
cd $MOZ_FETCHES_DIR/nsis-3.07-src
patch -p1 < $GECKO_PATH/build/win32/nsis-no-underscore.patch
scons \
-j $(nproc) \
PATH=$PATH \
CC="clang --sysroot $MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu" \
CXX="clang++ --sysroot $MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu" \
SKIPSTUBS=all \
SKIPPLUGINS=all \
SKIPUTILS=all \
SKIPMISC=all \
PREFIX_DEST=$INSTALL_DIR/ \
PREFIX_BIN=bin \
NSIS_CONFIG_CONST_DATA_PATH=no \
VERSION=3.07 \
install-compiler
cd $MOZ_FETCHES_DIR
tar caf nsis.tar.zst nsis
mkdir -p $UPLOAD_DIR
cp nsis.tar.zst $UPLOAD_DIR

Просмотреть файл

@ -1,13 +0,0 @@
#!/bin/sh
set -x -e -v
cd "$MOZ_FETCHES_DIR"
# We want a lowercase bin directory and executable .exes to help configure
# on cross-compiles.
mv nsis/Bin nsis/bin
chmod +x nsis/bin/*.exe
tar caf nsis.tar.zst nsis
mkdir -p "$UPLOAD_DIR"
mv nsis.tar.zst "$UPLOAD_DIR"