Skip to content

Use xplat/caffe2:ovrsource_aten_Config.h for arvr build modes #9462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions runtime/core/portable_type/c10/c10/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime", "is_arvr_mode")

def get_sleef_preprocessor_flags():
if runtime.is_oss:
Expand Down Expand Up @@ -78,9 +78,8 @@ def define_common_targets():
] + get_sleef_preprocessor_flags(),
xplat_exported_deps = [
"//xplat/caffe2:aten_header",
"//xplat/caffe2:generated_aten_config_header",
"//xplat/caffe2/c10:c10_headers",
],
] + ["//xplat/caffe2:ovrsource_aten_Config.h" if is_arvr_mode() else "//xplat/caffe2:generated_aten_config_header",],
exported_preprocessor_flags = select({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we also need to cover line 63 above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be needed as arvr only uses xplat_exported_deps and not fbcode_exported_deps

# Intentionally punting on non-fbcode x86 sleef support
# for now because of fbsource//third-party/sleef:sleef
Expand Down
1 change: 1 addition & 0 deletions shim_et/xplat/executorch/build/env_interface.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ env = struct(
genrule = native.genrule,
is_oss = True,
is_xplat = lambda: False,
is_arvr_mode = lambda: False,
patch_deps = _patch_deps,
patch_cxx_compiler_flags = _patch_cxx_compiler_flags,
patch_executorch_genrule_cmd = _patch_executorch_genrule_cmd,
Expand Down
3 changes: 3 additions & 0 deletions shim_et/xplat/executorch/build/runtime_wrapper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ use TARGETS files normally. Same for xplat-only directories and BUCK files.
load(":env_interface.bzl", "env")
load(":selects.bzl", "selects")

def is_arvr_mode():
return env.is_arvr_mode()

def is_xplat():
return env.is_xplat()

Expand Down
Loading