platform_build_soong/rust
Thiébaud Weksteen fabaff6bd7 rust: strip libraries and binaries
Reuses the cc.Stripper logic. Abstracts Stripper to avoid the spreading
of references to the cc package.

rustc requires unstripped libraries (precisely, with the `.rustc`
section) when building dependent targets. Contrary to cc, the output of
a compiler module will remain unstripped and only an extra build rule
will be added. This rule will be referenced at install time (in
baseCompiler.install or androidmk).

This change drastically reduces the size of the installed libraries:
(unstripped, from out/target/product/crosshatch/system)
$ find . -name \*.dylib.so -print0 | du -c --files0-from=-
149996  total

(stripped, with this change)
$ find . -name \*.dylib.so -print0 | du -c --files0-from=-
42380   total

Bug: 153430439
Test: cd external/rust; mma
Change-Id: I94fd8bbcec97e0610aa325d3db4460be84d01734
2020-08-28 10:50:17 +02:00
..
config rust: enable use-android-relr-tags 2020-08-28 10:47:11 +02:00
Android.bp rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
OWNERS Add Matt to OWNERS for Rust 2020-06-26 09:23:47 +02:00
androidmk.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
binary.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
binary_test.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
bindgen.go rust: add ccToolchain to Module 2020-08-28 10:47:11 +02:00
bindgen_test.go Merge "[rust] Escape flags for bindgen" 2020-08-06 21:33:49 +00:00
builder.go Merge "Add source collision test, rust_bindgen doc." 2020-07-22 17:44:03 +00:00
builder_test.go [rust] Add SourceProviders as crates support. 2020-08-04 08:13:24 -04:00
clippy.go rust: modify linting properties 2020-08-13 15:58:09 +02:00
clippy_test.go rust: modify linting properties 2020-08-13 15:58:09 +02:00
compiler.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
compiler_test.go Link device binaries dynamically by default. 2020-08-25 13:32:53 -04:00
coverage.go Migrate away from removed option 2020-08-25 15:27:15 -07:00
coverage_test.go Migrate away from removed option 2020-08-25 15:27:15 -07:00
library.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
library_test.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
prebuilt.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
proc_macro.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
project_json.go rust: validate existence of library source 2020-08-06 15:17:46 +02:00
project_json_test.go rust: validate existence of library source 2020-08-06 15:17:46 +02:00
rust.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
rust_test.go [rust] Pass cc dependencies as linker flags. 2020-08-26 17:07:29 -04:00
source_provider.go rust: add ccToolchain to Module 2020-08-28 10:47:11 +02:00
source_provider_test.go Make source_stem required for Rust SourceProviders 2020-08-05 13:31:34 -04:00
strip.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
test.go rust: strip libraries and binaries 2020-08-28 10:50:17 +02:00
test_test.go Make rust_test file output more similar to cc_test. 2020-06-11 17:12:19 -04:00
testing.go Stop using prebuilt NDK CRT objects. 2020-08-11 15:06:55 -07:00