Translate copy-files, add_soong_config_namespace and add_soong_config_var_value macros
Bug: 194521362
Test: internal
Change-Id: I88fb62f057476d96dfb056813a900e8497e7bbb9
diff --git a/mk2rbc/expr.go b/mk2rbc/expr.go
index 915f69e..0bb8b95 100644
--- a/mk2rbc/expr.go
+++ b/mk2rbc/expr.go
@@ -516,6 +516,7 @@
}
func (cx *callExpr) emit(gctx *generationContext) {
+ sep := ""
if cx.object != nil {
gctx.write("(")
cx.object.emit(gctx)
@@ -530,8 +531,14 @@
panic(fmt.Errorf("callExpr for %q should not be there", cx.name))
}
gctx.write(kf.runtimeName, "(")
+ if kf.hiddenArg == hiddenArgGlobal {
+ gctx.write("g")
+ sep = ", "
+ } else if kf.hiddenArg == hiddenArgConfig {
+ gctx.write("cfg")
+ sep = ", "
+ }
}
- sep := ""
for _, arg := range cx.args {
gctx.write(sep)
arg.emit(gctx)