diff --git a/components/style/binding_tools/README.md b/components/style/binding_tools/README.md index 5b23c7a57bb..e1465143e32 100644 --- a/components/style/binding_tools/README.md +++ b/components/style/binding_tools/README.md @@ -5,8 +5,3 @@ This directory contains simple tools for generating the Rust bindings for [stylo ## `setup_bindgen.sh` This clones Servo's version of bindgen, and uses `llvm-3.8` library to build it. It will then be used to generate the Rust bindings. - -## `regen.sh` - -This will regenerate the bindings for the `ServoBindings.h` file in your gecko -build. The generated bindings live in `components/style/gecko_bindings/bindings.rs`. For structs, the bindings are in `components/style/gecko_bindings/structs_*` diff --git a/components/style/binding_tools/regen.sh b/components/style/binding_tools/regen.sh deleted file mode 100755 index d08e17116b0..00000000000 --- a/components/style/binding_tools/regen.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -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 "${TOOLS_DIR}/rust-bindgen" ]]; then - echo "rust-bindgen not found. Run setup_bindgen.sh first." - exit 1 -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.'" - exit 1 -fi - -if [[ "$(uname)" == "Linux" ]]; then - LIBCLANG_PATH=/usr/lib/llvm-3.8/lib -else - LIBCLANG_PATH="$(brew --prefix llvm38)/lib/llvm-3.8/lib" -fi - -"./${TOOLS_DIR}/regen.py" --target all "${@}" diff --git a/components/style/binding_tools/setup_bindgen.sh b/components/style/binding_tools/setup_bindgen.sh index feb788d4bab..4447b2ccda3 100755 --- a/components/style/binding_tools/setup_bindgen.sh +++ b/components/style/binding_tools/setup_bindgen.sh @@ -28,11 +28,3 @@ fi export LD_LIBRARY_PATH="${LIBCLANG_PATH}" export DYLD_LIBRARY_PATH="${LIBCLANG_PATH}" - -# Don't try to clone twice. -if [[ ! -d rust-bindgen ]]; then - git clone https://github.com/servo/rust-bindgen.git -fi - -cd rust-bindgen -cargo build --features llvm_stable --release