Bug 1712350 - Create a mozmake toolchain artifact for Windows. r=firefox-build-system-reviewers,mhentges
The script is derived from the one in https://hg.mozilla.org/mozilla-build/file/3b8c537ca3c879551956ad47ca9f089583f647c5/make-mozmake.sh We take on the occasion to update to Make 4.3, which also means we need less things because it's not coming off git. We also apply the patch from http://savannah.gnu.org/bugs/?58656. Differential Revision: https://phabricator.services.mozilla.com/D116063
This commit is contained in:
@@ -594,3 +594,14 @@ nodejs-10-win64:
|
||||
artifact-name: nodejs.tar.zst
|
||||
strip-components: 1
|
||||
add-prefix: node/
|
||||
|
||||
gnumake:
|
||||
description: GNU make source
|
||||
fetch:
|
||||
type: static-url
|
||||
url: http://ftp.gnu.org/gnu/make/make-4.3.tar.gz
|
||||
sha256: e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19
|
||||
size: 2317073
|
||||
artifact-name: make.tar.zst
|
||||
strip-components: 1
|
||||
add-prefix: make/
|
||||
|
||||
@@ -342,3 +342,19 @@ linux64-makecab:
|
||||
- makecab
|
||||
toolchain:
|
||||
- linux64-rust-1.47
|
||||
|
||||
win64-mozmake:
|
||||
description: "mozmake for Windows"
|
||||
treeherder:
|
||||
symbol: TW64(mozmake)
|
||||
worker:
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.8.manifest"
|
||||
worker-type: b-win2012
|
||||
run:
|
||||
script: build-mozmake.sh
|
||||
toolchain-artifact: public/build/mozmake.tar.bz2
|
||||
tooltool-downloads: internal
|
||||
fetches:
|
||||
fetch:
|
||||
- gnumake
|
||||
|
||||
63
taskcluster/scripts/misc/build-mozmake.sh
Executable file
63
taskcluster/scripts/misc/build-mozmake.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
set -x -e -v
|
||||
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/tooltool-download.sh
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
|
||||
|
||||
cd $MOZ_FETCHES_DIR/make
|
||||
|
||||
# Patch for http://savannah.gnu.org/bugs/?58656
|
||||
patch -p1 <<'EOF'
|
||||
diff --git a/src/remake.c b/src/remake.c
|
||||
index fb237c5..b2ba069 100644
|
||||
--- a/src/remake.c
|
||||
+++ b/src/remake.c
|
||||
@@ -35,6 +35,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#endif
|
||||
#ifdef WINDOWS32
|
||||
#include <io.h>
|
||||
+#include <sys/stat.h>
|
||||
+#if defined(_MSC_VER) && _MSC_VER > 1200
|
||||
+/* VC7 or later support _stat64 to access 64-bit file size. */
|
||||
+#define stat64 _stat64
|
||||
+#else
|
||||
+#define stat64 stat
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1466,7 +1473,11 @@ static FILE_TIMESTAMP
|
||||
name_mtime (const char *name)
|
||||
{
|
||||
FILE_TIMESTAMP mtime;
|
||||
+#if defined(WINDOWS32)
|
||||
+ struct stat64 st;
|
||||
+#else
|
||||
struct stat st;
|
||||
+#endif
|
||||
int e;
|
||||
|
||||
#if defined(WINDOWS32)
|
||||
@@ -1498,7 +1509,7 @@ name_mtime (const char *name)
|
||||
tend = &tem[0];
|
||||
}
|
||||
|
||||
- e = stat (tem, &st);
|
||||
+ e = stat64 (tem, &st);
|
||||
if (e == 0 && !_S_ISDIR (st.st_mode) && tend < tem + (p - name - 1))
|
||||
{
|
||||
errno = ENOTDIR;
|
||||
EOF
|
||||
|
||||
chmod +w src/config.h.W32
|
||||
sed -i "/#define BATCH_MODE_ONLY_SHELL/s/\/\*\(.*\)\*\//\1/" src/config.h.W32
|
||||
cmd /c build_w32.bat
|
||||
|
||||
mkdir mozmake
|
||||
cp WinRel/gnumake.exe mozmake/mozmake.exe
|
||||
|
||||
tar -acf mozmake.tar.bz2 mozmake
|
||||
mkdir -p $UPLOAD_DIR
|
||||
cp mozmake.tar.bz2 $UPLOAD_DIR
|
||||
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh
|
||||
Reference in New Issue
Block a user