|
1 |
| -# This file needs to exist to avoid build system breakage, see https://fburl.com/workplace/jtdlgdmd |
| 1 | +load("@buck//apple:apple_library.bzl", "apple_library") |
| 2 | +load("@buck//apple:apple_resource.bzl", "apple_resource") |
| 3 | +load("@buck//apple:apple_test.bzl", "apple_test") |
| 4 | + |
| 5 | +apple_library( |
| 6 | + name = "ExecuTorch", |
| 7 | + modular = True, |
| 8 | + srcs = glob([ |
| 9 | + "ExecuTorch/Exported/*.m", |
| 10 | + "ExecuTorch/Exported/*.mm", |
| 11 | + "ExecuTorch/Internal/*.m", |
| 12 | + "ExecuTorch/Internal/*.mm", |
| 13 | + ]), |
| 14 | + exported_headers = glob([ |
| 15 | + "ExecuTorch/Exported/*.h", |
| 16 | + ]), |
| 17 | + headers = glob([ |
| 18 | + "ExecuTorch/Internal/*.h", |
| 19 | + ]), |
| 20 | + include_directories = [ |
| 21 | + "ExecuTorch/Exported", |
| 22 | + "ExecuTorch/Internal", |
| 23 | + ], |
| 24 | + frameworks = [ |
| 25 | + "$SDKROOT/System/Library/Frameworks/Foundation.framework", |
| 26 | + ], |
| 27 | + compiler_flags = [ |
| 28 | + "-DET_LOG_ENABLED=1", |
| 29 | + "-fobjc-arc", |
| 30 | + "-fno-exceptions", |
| 31 | + "-fno-rtti", |
| 32 | + ], |
| 33 | + deps = [ |
| 34 | + "//xplat/executorch/extension/module:moduleApple", |
| 35 | + "//xplat/executorch/extension/tensor:tensorApple", |
| 36 | + "//xplat/executorch/runtime/platform:platformApple", |
| 37 | + ], |
| 38 | +) |
| 39 | + |
| 40 | +apple_resource( |
| 41 | + name = "ExecuTorchTestResource", |
| 42 | + files = [ |
| 43 | + "ExecuTorch/__tests__/resources/add.pte", |
| 44 | + ], |
| 45 | +) |
| 46 | + |
| 47 | +apple_test( |
| 48 | + name = "ExecuTorchTests", |
| 49 | + srcs = glob([ |
| 50 | + "ExecuTorch/__tests__/*.swift", |
| 51 | + ]), |
| 52 | + frameworks = [ |
| 53 | + "$SDKROOT/System/Library/Frameworks/XCTest.framework", |
| 54 | + ], |
| 55 | + deps = [ |
| 56 | + ":ExecuTorch", |
| 57 | + ":ExecuTorchTestResource", |
| 58 | + ], |
| 59 | +) |
0 commit comments