diff --git a/backends/nxp/runtime/TARGETS b/backends/nxp/runtime/TARGETS new file mode 100644 index 00000000000..f91c46c0f20 --- /dev/null +++ b/backends/nxp/runtime/TARGETS @@ -0,0 +1,5 @@ +load("targets.bzl", "define_common_targets") + +oncall("executorch") + +define_common_targets() diff --git a/backends/nxp/runtime/targets.bzl b/backends/nxp/runtime/targets.bzl new file mode 100644 index 00000000000..ee2852dcbf7 --- /dev/null +++ b/backends/nxp/runtime/targets.bzl @@ -0,0 +1,21 @@ +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +load("//arvr/firmware/projects/smartglasses/config:config.bzl", "sg_config") + +def define_common_targets(): + runtime.cxx_library( + name = "nxp_backend", + srcs = ["NeutronBackend.cpp"], + headers = ["NeutronDriver.h", "NeutronErrors.h"], + compatible_with = ["ovr_config//cpu:arm32-embedded", sg_config("embedded-mcu-rtos")], + # Neutron runtime needs to compile with executor as whole + # @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole) + link_whole = True, + # Constructor needed for backend registration. + compiler_flags = ["-Wno-global-constructors", "-fno-rtti", "-DNO_HEAP_USAGE"], + visibility = ["@EXECUTORCH_CLIENTS"], + deps = [ + "//executorch/runtime/backend:interface", + "//executorch/runtime/core:core", + "//arvr/third-party/toolchains/nxp-sdk/2.16.0/middleware/eiq/executorch/third-party/neutron/rt700:libNeutron", + ], + )