build: Enable ivy in google3 if ng_module attr is True (#34238)
This commit creates a way for `ng_module` rule to compile with Ivy based on the `ivy` attribute. This enables google3 targets to pick the compiler without using `define` flags. PR Close #34238
This commit is contained in:
parent
0341f3239a
commit
d6f278867f
|
@ -42,6 +42,11 @@ def is_ivy_enabled(ctx):
|
|||
attr = "ng_module",
|
||||
)
|
||||
|
||||
# This attribute is only defined in google's private ng_module rule and not
|
||||
# available externally. For external users, this is effectively a no-op.
|
||||
if hasattr(ctx.attr, "ivy") and ctx.attr.ivy == True:
|
||||
return True
|
||||
|
||||
# TODO(josephperrott): Remove configuration via compile=aot define flag.
|
||||
if ctx.var.get("compile", None) == "aot":
|
||||
# buildifier: disable=print
|
||||
|
|
Loading…
Reference in New Issue