blob: 380fd2e131b0a161af786f992ef7c94273b6b278 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#!/bin/bash
set -x
SPIDERMONKEY_VARIANT=${SPIDERMONKEY_VARIANT:-plain}
UPLOAD_DIR=${UPLOAD_DIR:-$HOME/artifacts/}
WORK=${WORK:-$HOME/workspace}
export TOOLTOOL_CHECKOUT=${TOOLTOOL_CHECKOUT:-$WORK}
( # Create scope for set -e
set -e
mkdir -p $WORK
cd $WORK
# Need to install things from tooltool. Figure out what platform to use.
case $(uname -m) in
i686 | arm )
BITS=32
;;
*)
BITS=64
;;
esac
case "$OSTYPE" in
darwin*)
PLATFORM_OS=macosx
;;
linux-gnu)
PLATFORM_OS=linux
;;
msys)
PLATFORM_OS=win
;;
*)
echo "Unrecognized OSTYPE '$OSTYPE'" >&2
PLATFORM_OS=linux
;;
esac
# Install everything needed for the browser on this platform. Not all of it is
# necessary for the JS shell, but it's less duplication to share tooltool
# manifests.
BROWSER_PLATFORM=$PLATFORM_OS$BITS
(cd $TOOLTOOL_CHECKOUT && ${GECKO_PATH}/mach artifact toolchain${TOOLTOOL_MANIFEST:+ -v --tooltool-manifest $GECKO_PATH/$TOOLTOOL_MANIFEST}${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE})
) || exit 1 # end of set -e scope
# Add all the fetches and tooltool binaries to our $PATH.
for bin in $MOZ_FETCHES_DIR/*/bin $TOOLTOOL_CHECKOUT/VC/bin/Hostx64/x86; do
if [ ! -d "$bin" ]; then
continue
fi
absbin=$(cd "$bin" && pwd)
export PATH="$absbin:$PATH"
done
if [ -e $MOZ_FETCHES_DIR/rustc ]; then
export RUSTC="$MOZ_FETCHES_DIR/rustc/bin/rustc"
export CARGO="$MOZ_FETCHES_DIR/rustc/bin/cargo"
fi
if [ -e $MOZ_FETCHES_DIR/cbindgen ]; then
export CBINDGEN="$MOZ_FETCHES_DIR/cbindgen/cbindgen"
fi
|