diff options
author | 2023-09-23 05:19:13 +0000 | |
---|---|---|
committer | 2023-09-23 05:19:13 +0000 | |
commit | 40c7bae1df1028cc4f5545938858c16d5040442f (patch) | |
tree | e58fd7c96d37c504959ccfe41431323f2e2c0c21 /rust/binary.go | |
parent | 4ad574cc37f23d36428d8947dd3f29bcacdb0ef4 (diff) | |
parent | 930fd8bfb1190e20789c332d3f8d7de79bcee13c (diff) |
Merge changes from topics "revert-2629131-sandbox-rust-inputs-JRFPQTIPEY", "revert-2758566-WBNIADIEXA" into main
* changes:
Revert^3 "add rust_toolchain_rustc_prebuilt module type"
Revert^3 "add crate_root property to rust modules"
Revert^3 "allow Ninja variables in RuleBuilder API"
Revert "conditionally escape rule builder command"
Revert "support sandboxed rust rules"
Revert "fix failing rust_aconfig_library test"
Revert "rustSetToolchainSource to use linux-x86 srcs"
Revert "remove rust deps on clang prebuilts"
Diffstat (limited to 'rust/binary.go')
-rw-r--r-- | rust/binary.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rust/binary.go b/rust/binary.go index 353381d78..1408ff17b 100644 --- a/rust/binary.go +++ b/rust/binary.go @@ -138,17 +138,13 @@ func (binary *binaryDecorator) preferRlib() bool { func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) buildOutput { fileName := binary.getStem(ctx) + ctx.toolchain().ExecutableSuffix() + srcPath, _ := srcPathFromModuleSrcs(ctx, binary.baseCompiler.Properties.Srcs) outputFile := android.PathForModuleOut(ctx, fileName) ret := buildOutput{outputFile: outputFile} - var crateRootPath android.Path - if binary.baseCompiler.Properties.Crate_root == nil { - crateRootPath, _ = srcPathFromModuleSrcs(ctx, binary.baseCompiler.Properties.Srcs) - } else { - crateRootPath = android.PathForModuleSrc(ctx, *binary.baseCompiler.Properties.Crate_root) - } flags.RustFlags = append(flags.RustFlags, deps.depFlags...) flags.LinkFlags = append(flags.LinkFlags, deps.depLinkFlags...) + flags.LinkFlags = append(flags.LinkFlags, deps.linkObjects.Strings()...) if binary.stripper.NeedsStrip(ctx) { strippedOutputFile := outputFile @@ -159,7 +155,7 @@ func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps Path } binary.baseCompiler.unstrippedOutputFile = outputFile - ret.kytheFile = TransformSrcToBinary(ctx, binary, crateRootPath, deps, flags, outputFile).kytheFile + ret.kytheFile = TransformSrcToBinary(ctx, srcPath, deps, flags, outputFile).kytheFile return ret } |