diff options
author | 2024-05-17 14:13:41 -0400 | |
---|---|---|
committer | 2024-06-26 01:35:41 +0000 | |
commit | fd47b1ab6a51ce3b148e2d4644b1d96b058c2064 (patch) | |
tree | 70d50006ec4333b14d8f47c4fc790283b92e87dc /rust/fuzz_test.go | |
parent | 9c067f62d0b4d3e9c5a245f51f14dc51521c0e63 (diff) |
cc/rust: Alias ffi rlib variant for static_libs
Alias the rlib variant to "link: static". This allows declaring
rust_ffi_rlib modules in static_libs. This effectively removes any
distinction between rust_ffi_static and rust_ffi_rlib. Removing the
functionality for building Rust staticlib modules will be cleaned up in
a follow-on CL.
This should have the effect of changing the default linkage for all rust
modules in static_libs from linking individual staticlibs to building a
single staticlib that includes all rust_ffi rlib dependencies.
This removes the static_rlibs property, as we're now handling
the choice dynamically. This also makes rlibs only propagate through
cc_library_static modules if the rlib is included in
whole_static_lib. This both mirrors the expected behavior of
cc libraries and helps control which version of a crate ends up in the
final link (e.g. libdoh_ffi vs libdoh_ffi_for_test).
Bug: 254469782
Test: m
Test: m blueprint_tests
Change-Id: I2925f67f6dc9329dae3dcccafb8560900ac8a6fc
Diffstat (limited to 'rust/fuzz_test.go')
-rw-r--r-- | rust/fuzz_test.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rust/fuzz_test.go b/rust/fuzz_test.go index 0d4622a7e..6cb8b9319 100644 --- a/rust/fuzz_test.go +++ b/rust/fuzz_test.go @@ -114,17 +114,23 @@ func TestCCFuzzDepBundling(t *testing.T) { srcs: ["foo.rs"], shared_libs: ["libcc_transitive_dep"], } + rust_ffi_static { + name: "libtest_fuzzing_static", + crate_name: "test_fuzzing", + srcs: ["foo.rs"], + shared_libs: ["libcc_transitive_dep"], + } cc_fuzz { name: "fuzz_shared_libtest", shared_libs: ["libtest_fuzzing"], } cc_fuzz { name: "fuzz_static_libtest", - static_rlibs: ["libtest_fuzzing"], + static_libs: ["libtest_fuzzing"], } cc_fuzz { name: "fuzz_staticffi_libtest", - static_libs: ["libtest_fuzzing"], + static_libs: ["libtest_fuzzing_static"], } `) |