summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2023-11-22 15:20:06 -0800
committerCole Faust <colefaust@google.com>2023-11-22 15:20:06 -0800
commitf9558d33aa771fd38a16d585b137cba6aa4eed57 (patch)
tree90e9264923dc91f819e3d4bdf7a3ec6b10e0f349
parenteba35a9fd0f861f3f65cb2f0a0fd31b537a9ec11 (diff)
downloadboringssl-f9558d33aa771fd38a16d585b137cba6aa4eed57.tar.gz
Sandbox libbssl_sys_src_nostd
go/roboleaf-busy-beavers-sandboxing gensrcs should require output_extension to be set, when it's not, you get some weird filename like `lib.`. Switch to genrules for simplicity. Bug: 307824623 Test: ./build/soong/tests/genrule_sandbox_test.py libbssl_sys_src_nostd Change-Id: I0939005198c51d048ae1ce244e8b7e59de099ce3
-rw-r--r--Android.bp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Android.bp b/Android.bp
index 1885ff2f..f00dff93 100644
--- a/Android.bp
+++ b/Android.bp
@@ -817,9 +817,10 @@ cc_library_host_static {
}
// Replace the upstream CMake placeholder with a re-export of all of the local bindgen output.
-gensrcs {
+genrule {
name: "libbssl_sys_src",
srcs: ["src/rust/bssl-sys/src/lib.rs"],
+ out: ["lib.rs"],
cmd: "sed 's@^include!(env!(\"BINDGEN_RS_FILE\"));@pub use bssl_sys_raw::*;@' $(in) > $(out)",
}
@@ -861,9 +862,10 @@ rust_library_host_rlib {
],
}
-gensrcs {
+genrule {
name: "libbssl_sys_src_nostd",
srcs: [":libbssl_sys_src"],
+ out: ["lib.rs"],
cmd: "(echo '#![no_std]' && cat $(in)) > $(out)",
}