summaryrefslogtreecommitdiff
path: root/rust/proc_macro.go
diff options
context:
space:
mode:
author Matthew Maurer <mmaurer@google.com> 2023-11-20 21:18:12 +0000
committer Matthew Maurer <mmaurer@google.com> 2023-11-22 00:52:10 +0000
commit1d8e20d744bae14ab3814125e6d9ac28b9fc97e3 (patch)
tree9e6e65b0cef30285e866e95ef96c82df4981da0f /rust/proc_macro.go
parentd221d315340476b27308e205311d458ac440e17b (diff)
rust: internalize srcPathFromModuleSrcs
This was frequently misused (for example, in the prebuilts module, it was used as a complex "assert(len(srcs))==1"), and can be superceded by getCrateRoot anywhere it was used. It's now only called from compiler.go, and can drop the second return parameter, as it was only actually used by the prebuilt assert misuse. Bug: 309943184 Test: m nothing Change-Id: I6c92580bc8f0ecb7586c544056b5409e6dd280e7
Diffstat (limited to 'rust/proc_macro.go')
-rw-r--r--rust/proc_macro.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/proc_macro.go b/rust/proc_macro.go
index b93b24f15..e3a48bff6 100644
--- a/rust/proc_macro.go
+++ b/rust/proc_macro.go
@@ -79,7 +79,7 @@ func (procMacro *procMacroDecorator) compile(ctx ModuleContext, flags Flags, dep
fileName := procMacro.getStem(ctx) + ctx.toolchain().ProcMacroSuffix()
outputFile := android.PathForModuleOut(ctx, fileName)
- srcPath, _ := srcPathFromModuleSrcs(ctx, procMacro.baseCompiler.Properties.Srcs)
+ srcPath := procMacro.crateRootPath(ctx)
ret := TransformSrctoProcMacro(ctx, srcPath, deps, flags, outputFile)
procMacro.baseCompiler.unstrippedOutputFile = outputFile
return ret