summaryrefslogtreecommitdiff
path: root/rust/library.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2020-07-24 16:05:01 -0400
committer Ivan Lozano <ivanlozano@google.com> 2020-07-28 14:53:57 -0400
commit45901edb9a6ba7b42136a3ead126f94f76363eb7 (patch)
treeb5270f6d6fd3889442b77c32f9d8153cd7d388b2 /rust/library.go
parente1e844b83cb37c72bf233034c3985a69f71e2e9d (diff)
Ensure hermetic device rust_bindgen.
rust_bindgen was not hermetic previously as it would pull in host headers for device targets. This fixes that by using the same flags we use when compiling with Clang. This also makes sure our rust_bindgen headers are built as similar as possible to their respective cc_libraries. This also pulls in the bionic dependencies as well, which provide the headers required for device targets. Bug: 162007475 Test: device rust_bindgen deps file does not reference host headers. Change-Id: I4efdf333e011a6c6d73a0345e5485823f166d17a
Diffstat (limited to 'rust/library.go')
-rw-r--r--rust/library.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/library.go b/rust/library.go
index acca25627..28c979248 100644
--- a/rust/library.go
+++ b/rust/library.go
@@ -340,7 +340,7 @@ func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
deps = library.baseCompiler.compilerDeps(ctx, deps)
if ctx.toolchain().Bionic() && (library.dylib() || library.shared()) {
- deps = library.baseCompiler.bionicDeps(ctx, deps)
+ deps = bionicDeps(deps)
deps.CrtBegin = "crtbegin_so"
deps.CrtEnd = "crtend_so"
}