summaryrefslogtreecommitdiff
path: root/build-prebuilts.sh
diff options
context:
space:
mode:
authorMatthias Maennich <maennich@google.com>2021-11-08 17:33:02 +0000
committerMatthias Maennich <maennich@google.com>2021-11-09 18:33:00 +0000
commit215b405ae638b5d71345d9eba2ef41e7a81fdc90 (patch)
tree02f2bc2c84e2fececc335ea6de6c85a8d18d658f /build-prebuilts.sh
parent66bcb775043ae3a5f94e61edd31bcb0a09e024b1 (diff)
downloadbuild-tools-215b405ae638b5d71345d9eba2ef41e7a81fdc90.tar.gz
Interceptor: initial version
This adds the interceptor and its runtime library in a first draft version. The interceptor is typically called like $ interceptor [interceptor_args] [--] program [program_args] It will locate the corresponding libinterceptor runtime library, set some environment variables (mostly based on passed arguments) and spawn the original process with the runtime library LD_PRELOAD'ed. The runtime library will intercept `execve` libc calls but nothing is happening with them for now. A sample command that builds the Android common kernel: $ interceptor -- BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh Note, setting environment variables after -- is supported (and encouraged). Bug: 205577427 Signed-off-by: Matthias Maennich <maennich@google.com> Change-Id: Ia258a585078dd8bdda2799734cc0796e4d4cec82
Diffstat (limited to 'build-prebuilts.sh')
-rwxr-xr-xbuild-prebuilts.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/build-prebuilts.sh b/build-prebuilts.sh
index f300e3e..ec50dc6 100755
--- a/build-prebuilts.sh
+++ b/build-prebuilts.sh
@@ -35,6 +35,7 @@ EOF
e2fsck
e2fsdroid
img2simg
+ interceptor
lpmake
lz4
mkbootfs
@@ -52,6 +53,7 @@ EOF
SOONG_LIBRARIES=(
libcrypto-host.so
libelf.so
+ libinterceptor.so
)
binaries="${SOONG_BINARIES[@]/#/${SOONG_HOST_OUT}/bin/}"