Skip to content

Commit 4f5113c

Browse files
kimishpatelmeta-codesync[bot]
authored andcommitted
temp trial of cria pybindings (#16348)
Summary: Pull Request resolved: #16348 Move actual pybindings to xplat to allow for running on mac or devserver Reviewed By: JacobSzwejbka Differential Revision: D89434480
1 parent 227ff2e commit 4f5113c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

kernels/optimized/lib_defs.bzl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
1010
# functions in order to declare the required compiler flags needed in order to
1111
# access CPU vector intrinsics.
1212

13+
def get_exported_linker_flags():
14+
if not runtime.is_oss:
15+
exported_linker_flags = select({
16+
"DEFAULT": [],
17+
"ovr_config//os:macos-arm64": ["-framework", "Accelerate"],
18+
"ovr_config//os:macos-x86_64": ["-framework", "Accelerate"],
19+
}),
20+
return exported_linker_flags
21+
return []
22+
1323
def get_vec_preprocessor_flags():
1424
if not runtime.is_oss:
1525
# various ovr_configs are not available in oss
@@ -204,6 +214,7 @@ def define_libs(is_fbcode=False):
204214
exported_headers = native.glob([
205215
"blas/**/*.h",
206216
]),
217+
exported_linker_flags = get_exported_linker_flags(),
207218
compiler_flags = ["-Wno-pass-failed"] + select({
208219
"ovr_config//runtime:fbcode": [],
209220
# TODO: replace with get_compiler_optimization_flags from op_registration_util.bzl when that

0 commit comments

Comments
 (0)