Merge "Rust library linking fixes" into main
This commit is contained in:
@@ -466,7 +466,15 @@ func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags) F
|
|||||||
library.includeDirs = append(library.includeDirs, android.PathsForModuleSrc(ctx, library.Properties.Include_dirs)...)
|
library.includeDirs = append(library.includeDirs, android.PathsForModuleSrc(ctx, library.Properties.Include_dirs)...)
|
||||||
}
|
}
|
||||||
if library.shared() {
|
if library.shared() {
|
||||||
flags.LinkFlags = append(flags.LinkFlags, "-Wl,-soname="+library.sharedLibFilename(ctx))
|
if ctx.Darwin() {
|
||||||
|
flags.LinkFlags = append(
|
||||||
|
flags.LinkFlags,
|
||||||
|
"-dynamic_lib",
|
||||||
|
"-install_name @rpath/"+library.sharedLibFilename(ctx),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
flags.LinkFlags = append(flags.LinkFlags, "-Wl,-soname="+library.sharedLibFilename(ctx))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return flags
|
return flags
|
||||||
|
@@ -1224,6 +1224,11 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
|||||||
if _, exists := skipModuleList[depName]; exists {
|
if _, exists := skipModuleList[depName]; exists {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if depTag == android.DarwinUniversalVariantTag {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if rustDep, ok := dep.(*Module); ok && !rustDep.CcLibraryInterface() {
|
if rustDep, ok := dep.(*Module); ok && !rustDep.CcLibraryInterface() {
|
||||||
//Handle Rust Modules
|
//Handle Rust Modules
|
||||||
makeLibName := rustMakeLibName(ctx, mod, rustDep, depName+rustDep.Properties.RustSubName)
|
makeLibName := rustMakeLibName(ctx, mod, rustDep, depName+rustDep.Properties.RustSubName)
|
||||||
|
Reference in New Issue
Block a user