Remove script and doc no longer relevant

This commit is contained in:
Xidorn Quan 2016-12-09 16:05:54 -10:00
parent 446ee7bcc3
commit 6e78325866
3 changed files with 0 additions and 50 deletions

View file

@ -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_*`

View file

@ -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 "${@}"

View file

@ -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