diff options
author | Stephen Hines <srhines@google.com> | 2020-11-12 00:28:05 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-11-12 00:28:05 +0000 |
commit | b3ea346d06becf743553a0505a7e42957d92af4d (patch) | |
tree | 22feaf72615b605be8aadf9ac89ce5875d6b8f51 | |
parent | 59a0f06cb4362734c9b3276e0296bbd6b66befb2 (diff) | |
parent | 0f6b8c7a1674814de1a8af5c18accc9454066212 (diff) | |
download | bindgen-b3ea346d06becf743553a0505a7e42957d92af4d.tar.gz |
Remove unused bindgen.sh am: 141207888d am: a4aecd2831 am: dc0c08a818 am: 0f6b8c7a16
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/bindgen/+/1496845
Change-Id: Iced6aad5a65e9ebfe4cc4441eb58d7d846f6cc93
-rw-r--r-- | android/Android.bp | 36 | ||||
-rwxr-xr-x | android/bindgen.sh | 81 |
2 files changed, 0 insertions, 117 deletions
diff --git a/android/Android.bp b/android/Android.bp deleted file mode 100644 index c6d87b1..0000000 --- a/android/Android.bp +++ /dev/null @@ -1,36 +0,0 @@ -sh_binary_host { - name: "bindgen.sh", - src: "bindgen.sh", -} - -// Example genrule module to call bindgen.sh: -// -// genrule { -// name: "my_example", -// tools: ["bindgen.sh", "bindgen"], -// depfile: true, -// srcs: ["src/my_example_wrapper.h"], -// out: ["my_example.rs"], -// cmd: "$(location)" + my_example_bindgen_flags -// + common_bindgen_flags + my_example_clang_flags, -// } -// -// If your build system installs bindgen.sh and bindgen -// in different locations, use the following cmd: -// cmd: "$(location bindgen.sh) --bindgen-path $(location bindgen)" -// + my_example_bindgen_flags -// + common_bindgen_flags + my_example_clang_flags, -// -// The 'out' file is a rust module to be included into other rust crates. -// -// common_bindgen_flags = " -o $(out) $(in) -- -MD -MF $(depfile)" -// -// Example module to use bindgen.sh genrule module. -// -// rust_library { -// name: "libmy_example", -// // declare dependency on my_example genrule module -// // src/lib.rs should include/import the output file my_example.rs -// srcs: ["src/lib.rs", ":my_example"], -// // other properties -// } diff --git a/android/bindgen.sh b/android/bindgen.sh deleted file mode 100755 index a2b60e5..0000000 --- a/android/bindgen.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2020 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -set -e - -# Ideally only 2 version numbers are changed after a new clang/rust release. -# libclang.so could be from prebuilts/clang-tools when available in the future. -CLANG_VERSION=clang-r399163b -CLANG_SO_GIT=11git - -CLANG_HOST=prebuilts/clang/host -RUST_HOST=prebuilts/rust -MYDIR=`dirname $0` -MYDIR=`(cd $MYDIR ; pwd)` -case "$MYDIR" in - */darwin-x86/bin) - export CLANG_PATH=${CLANG_HOST}/darwin-x86/${CLANG_VERSION}/bin/clang - export LIBCLANG_PATH=${CLANG_HOST}/darwin-x86/${CLANG_VERSION}/lib64/libclang.dylib - export RUSTFMT=${RUST_HOST}/darwin-x86/stable/rustfmt - ;; - */linux-x86/bin) - export CLANG_PATH=${CLANG_HOST}/linux-x86/${CLANG_VERSION}/bin/clang - export LIBCLANG_PATH=${CLANG_HOST}/linux-x86/${CLANG_VERSION}/lib64/libclang.so.${CLANG_SO_GIT} - export RUSTFMT=${RUST_HOST}/linux-x86/stable/rustfmt - ;; - *) - # there is no rustfmt for windows - echo "ERROR: bindgen.sh only works on linux-x86 and darwin-x86" - exit 1 -esac - -for (( i=1; i <= $#; i++)); do - if [[ ${!i} == "-v" || ${!i} == "--verbose" ]] - then - echo "### $0 called in `pwd`" - echo "### CLANG_PATH=${CLANG_PATH}" - echo "### LIBCLANG_PATH=${LIBCLANG_PATH}" - echo "### RUSTFMT=${RUSTFMT}" - break - fi -done - -if [ "$1" == "--bindgen-path" ] -then - # non-standard installation; user given bindgen path - BINDGEN=$2 - shift - shift -else - # standard installation; use bindgen in the same directory - BINDGEN=`dirname $0`/bindgen -fi -${BINDGEN} $* - -# find -MF flag and append tool paths to the dependent file -for (( i=1; i <= $#; i++)); do - if [ ${!i} == "-MF" ] - then - j=$((i+1)) - DEPFILE="${!j}" - echo "outputfile: ${CLANG_PATH}" >> $DEPFILE - echo "outputfile: ${LIBCLANG_PATH}" >> $DEPFILE - echo "outputfile: ${RUSTFMT}" >> $DEPFILE - exit 0 - fi -done - -echo "ERROR: bindgen.sh should be called with -MD -MF <dependent_file>" -exit 1 |