From 45901edb9a6ba7b42136a3ead126f94f76363eb7 Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Fri, 24 Jul 2020 16:05:01 -0400 Subject: 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 --- rust/library.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/library.go') 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" } -- cgit v1.2.3-59-g8ed1b