Pass "--extern proc_macro" to rust_proc_macros.
This is actually required for some code. Test: Modify the new test so it fails and see it fail. Test: Build crates that fail without it. Change-Id: I527752b765e5552aa2de7e201f056955e053e1f3
This commit is contained in:
@@ -63,6 +63,12 @@ func (procMacro *procMacroDecorator) compilerProps() []interface{} {
|
||||
&procMacro.Properties)
|
||||
}
|
||||
|
||||
func (procMacro *procMacroDecorator) compilerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
flags = procMacro.baseCompiler.compilerFlags(ctx, flags)
|
||||
flags.RustFlags = append(flags.RustFlags, "--extern proc_macro")
|
||||
return flags
|
||||
}
|
||||
|
||||
func (procMacro *procMacroDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Path {
|
||||
fileName := procMacro.getStem(ctx) + ctx.toolchain().ProcMacroSuffix()
|
||||
outputFile := android.PathForModuleOut(ctx, fileName)
|
||||
|
Reference in New Issue
Block a user