Soong Rust source clean up.
Break up some of the longer lines in the Rust source and refactor the TransformSrcto* functions to take fewer arguments. Bug: N/A Test: m -j crosvm.experimental Change-Id: Ia0deb8bfe3e1bfd07ef35633e9a7e6f5e799b3a3
This commit is contained in:
@@ -28,7 +28,8 @@ type BinaryCompilerProperties struct {
|
||||
// path to the main source file that contains the program entry point (e.g. src/main.rs)
|
||||
Srcs []string `android:"path,arch_variant"`
|
||||
|
||||
// passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib (assuming it has no dylib dependencies already)
|
||||
// passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib
|
||||
// (assuming it has no dylib dependencies already)
|
||||
Prefer_dynamic *bool
|
||||
}
|
||||
|
||||
@@ -73,7 +74,8 @@ func (binary *binaryDecorator) compilerFlags(ctx ModuleContext, flags Flags) Fla
|
||||
flags = binary.baseCompiler.compilerFlags(ctx, flags)
|
||||
|
||||
if ctx.toolchain().Bionic() {
|
||||
// no-undefined-version breaks dylib compilation since __rust_*alloc* functions aren't defined, but we can apply this to binaries.
|
||||
// no-undefined-version breaks dylib compilation since __rust_*alloc* functions aren't defined,
|
||||
// but we can apply this to binaries.
|
||||
flags.LinkFlags = append(flags.LinkFlags,
|
||||
"-Wl,--gc-sections",
|
||||
"-Wl,-z,nocopyreloc",
|
||||
|
Reference in New Issue
Block a user