rust: Resolve crate roots outside rust-project
Previously, we manually re-computed crate roots inside project_json for rendering rust-project.json. In addition to added complexity, this meant that generated sources and glob sources would not render correctly - it would select e.g. `src/**.rs` or `:foo` as a crate root. Use a centralized computation of crate roots instead. Bug: 309943184 Test: SOONG_GEN_RUST_PROJECT=1 m nothing, compare rust-project.json Change-Id: I0caddbf600d025a0041f45e69812cdd6f1761234
This commit is contained in:
@@ -78,7 +78,6 @@ func (procMacro *procMacroDecorator) compilerFlags(ctx ModuleContext, flags Flag
|
||||
func (procMacro *procMacroDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) buildOutput {
|
||||
fileName := procMacro.getStem(ctx) + ctx.toolchain().ProcMacroSuffix()
|
||||
outputFile := android.PathForModuleOut(ctx, fileName)
|
||||
|
||||
srcPath := crateRootPath(ctx, procMacro)
|
||||
ret := TransformSrctoProcMacro(ctx, srcPath, deps, flags, outputFile)
|
||||
procMacro.baseCompiler.unstrippedOutputFile = outputFile
|
||||
|
Reference in New Issue
Block a user