summaryrefslogtreecommitdiffstats
path: root/taskcluster/scripts/misc/repack-clang-linux-win-cross.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtaskcluster/scripts/misc/repack-clang-linux-win-cross.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/repack-clang-linux-win-cross.sh b/taskcluster/scripts/misc/repack-clang-linux-win-cross.sh
new file mode 100755
index 0000000000..a6dd88e37a
--- /dev/null
+++ b/taskcluster/scripts/misc/repack-clang-linux-win-cross.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -x -e -v
+
+# This script is to repack a linux clang with Windows clang-cl.exe and compiler runtime.
+
+cd $MOZ_FETCHES_DIR
+
+# We already have the Linux clang extracted in $MOZ_FETCHES_DIR/clang by fetch-content
+# We have a non-extracted clang-cl/clang.tar.zst for Windows clang-cl that we need to extract
+# files from.
+
+$GECKO_PATH/taskcluster/scripts/misc/zstdpy -d clang-cl/clang.tar.zst | tar -x --wildcards clang/lib/clang/*/lib/windows clang/bin/clang-cl.exe clang/bin/llvm-symbolizer.exe
+chmod +x clang/bin/clang-cl.exe
+tar -c clang | $GECKO_PATH/taskcluster/scripts/misc/zstdpy > clang.tar.zst
+
+# Put a tarball in the artifacts dir
+mkdir -p $UPLOAD_DIR
+cp clang.tar.zst $UPLOAD_DIR