Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f5809a0 authored by Matthew Maurer's avatar Matthew Maurer Committed by Gerrit Code Review
Browse files

Merge changes I828b3e6b,I5d85ea8b

* changes:
  rust: Do not pass -C prefer-dynamic for cdylib
  rust: Include Soong module name as metadata
parents 0b031cf1 46c46cca
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
	return deps
}
func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags) Flags {
	flags.RustFlags = append(flags.RustFlags, "-C metadata="+ctx.baseModuleName())
	flags = library.baseCompiler.compilerFlags(ctx, flags)
	if library.shared() || library.static() {
		library.includeDirs = append(library.includeDirs, android.PathsForModuleSrc(ctx, library.Properties.Include_dirs)...)
@@ -337,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