Skip to content

Commit d66055e

Browse files
authored
Merge branch 'main' into chore/upgrade-spidermonkey-to-8a28ad5
2 parents e008851 + d43c1b9 commit d66055e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

setup.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ fi
3434
# Install rust compiler
3535
echo "Installing rust compiler"
3636
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.76
37-
. $HOME/.cargo/env
38-
cargo install cbindgen
37+
CARGO_BIN="$HOME/.cargo/bin/cargo" # also works for Windows. On Windows this equals to %USERPROFILE%\.cargo\bin\cargo
38+
$CARGO_BIN install cbindgen
3939
# Setup Poetry
4040
echo "Installing poetry"
4141
curl -sSL https://install.python-poetry.org | python3 - --version "1.7.1"
4242
if [[ "$OSTYPE" == "msys"* ]]; then # Windows
4343
POETRY_BIN="$APPDATA/Python/Scripts/poetry"
4444
else
45-
POETRY_BIN=`echo ~/.local/bin/poetry` # expand tilde
45+
POETRY_BIN="$HOME/.local/bin/poetry"
4646
fi
4747
$POETRY_BIN self add 'poetry-dynamic-versioning[plugin]'
4848
echo "Done installing dependencies"
@@ -63,7 +63,8 @@ sed -i'' -e '/"winheap.cpp"/d' ./memory/mozalloc/moz.build # https://bugzilla.mo
6363
sed -i'' -e 's/"install-name-tool"/"install_name_tool"/' ./moz.configure # `install-name-tool` does not exist, but we have `install_name_tool`
6464
sed -i'' -e 's/bool Unbox/JS_PUBLIC_API bool Unbox/g' ./js/public/Class.h # need to manually add JS_PUBLIC_API to js::Unbox until it gets fixed in Spidermonkey
6565
sed -i'' -e 's/bool js::Unbox/JS_PUBLIC_API bool js::Unbox/g' ./js/src/vm/JSObject.cpp # same here
66-
sed -i'' -e 's/shared_lib = self._pretty_path(libdef.output_path, backend_file)/shared_lib = libdef.lib_name/' ./python/mozbuild/mozbuild/backend/recursivemake.py
66+
sed -i'' -e 's/shared_lib = self._pretty_path(libdef.output_path, backend_file)/shared_lib = libdef.lib_name/' ./python/mozbuild/mozbuild/backend/recursivemake.py # would generate a Makefile to install the binary files from an invalid path prefix
67+
sed -i'' -e 's/% self._pretty_path(libdef.import_path, backend_file)/% libdef.import_name/' ./python/mozbuild/mozbuild/backend/recursivemake.py # same as above. Shall we file a bug in bugzilla?
6768
sed -i'' -e 's/if version < Version(mac_sdk_min_version())/if False/' ./build/moz.configure/toolchain.configure # do not verify the macOS SDK version as the required version is not available on Github Actions runner
6869
sed -i'' -e 's/return JS::GetWeakRefsEnabled() == JS::WeakRefSpecifier::Disabled/return false/' ./js/src/vm/GlobalObject.cpp # forcibly enable FinalizationRegistry
6970
sed -i'' -e 's/return !IsIteratorHelpersEnabled()/return false/' ./js/src/vm/GlobalObject.cpp # forcibly enable iterator helpers

0 commit comments

Comments
 (0)