mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Minor cleanup to the bindgen scripts
This commit is contained in:
parent
1924df0c00
commit
67d26b36a1
2 changed files with 10 additions and 15 deletions
|
@ -8,13 +8,15 @@ set -o errexit
|
|||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
TOOLS_DIR="$(dirname ${0})"
|
||||
|
||||
if [[ ${#} -eq 0 ]]; then
|
||||
echo "Usage: ${0} /path/to/gecko/objdir [other-regen.py-flags]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for rust-bindgen
|
||||
if [[ ! -d rust-bindgen ]]; then
|
||||
if [[ ! -d "${TOOLS_DIR}/rust-bindgen" ]]; then
|
||||
echo "rust-bindgen not found. Run setup_bindgen.sh first."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -22,7 +24,7 @@ fi
|
|||
# Check for /usr/include
|
||||
if [[ ! -d /usr/include ]]; then
|
||||
echo "/usr/include doesn't exist." \
|
||||
"Mac users may need to run xcode-select --install."
|
||||
"Mac users may need to run 'xcode-select --install.'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -32,4 +34,4 @@ else
|
|||
LIBCLANG_PATH="$(brew --prefix llvm38)/lib/llvm-3.8/lib"
|
||||
fi
|
||||
|
||||
./regen.py --target all "${@}"
|
||||
"./${TOOLS_DIR}/regen.py" --target all "${@}"
|
||||
|
|
|
@ -18,28 +18,21 @@ else
|
|||
export LIBCLANG_PATH="$(brew --prefix llvm38)/lib/llvm-3.8/lib"
|
||||
fi
|
||||
|
||||
# Make sure we have llvm38.
|
||||
# Make sure we have llvm-3.8.
|
||||
if [[ ! -x "$(command -v clang-3.8)" ]]; then
|
||||
echo "llmv38 must be installed." \
|
||||
"Mac users should |brew install llvm38|, Linux varies by distro."
|
||||
exit 1
|
||||
echo "llvm-3.8 is required." \
|
||||
"Mac users should |brew install llvm38|," \
|
||||
"Linux users can find it in clang-3.8."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="${LIBCLANG_PATH}"
|
||||
export DYLD_LIBRARY_PATH="${LIBCLANG_PATH}"
|
||||
|
||||
# Check for multirust
|
||||
if [[ ! -x "$(command -v multirust)" ]]; then
|
||||
echo "multirust must be installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Don't try to clone twice.
|
||||
if [[ ! -d rust-bindgen ]]; then
|
||||
git clone https://github.com/servo/rust-bindgen.git
|
||||
fi
|
||||
|
||||
cd rust-bindgen
|
||||
|
||||
multirust override nightly
|
||||
cargo build --features llvm_stable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue