aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorMatthew Maurer <mmaurer@google.com>2020-01-13 16:34:34 -0800
committerMatthew Maurer <mmaurer@google.com>2020-01-15 08:37:46 -0800
commit46c46ccafdbe2de0b4ae7e29651b5c11d5697752 (patch)
treec6bc6f65924ff7d13af4d2649814041a95376204 /rust
parent22cef966e1552575f891ea77bf0151555a207056 (diff)
downloadbuild_soong-46c46ccafdbe2de0b4ae7e29651b5c11d5697752.tar.gz
build_soong-46c46ccafdbe2de0b4ae7e29651b5c11d5697752.tar.bz2
build_soong-46c46ccafdbe2de0b4ae7e29651b5c11d5697752.zip
rust: Do not pass -C prefer-dynamic for cdylib
cdylib targets cannot currently dynamically link to Rust crates, so this flag was not actually doing anything, and in conjunction with -C lto which we *do* want on for this target, causes a hard error on rustc-1.40.0. Bug: 147438124 Test: Build a rust_library module, this implicitly tries to build cdylib Change-Id: I828b3e6bae7c58f4081db3e73009b443a382a296
Diffstat (limited to 'rust')
-rw-r--r--rust/library.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/library.go b/rust/library.go
index 2844e70d..0cf2dd04 100644
--- a/rust/library.go
+++ b/rust/library.go
@@ -338,7 +338,7 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
flags.RustFlags = append(flags.RustFlags, deps.depFlags...)
- if library.dylib() || library.shared() {
+ if library.dylib() {
// We need prefer-dynamic for now to avoid linking in the static stdlib. See:
// https://github.com/rust-lang/rust/issues/19680
// https://github.com/rust-lang/rust/issues/34909