Skip to content
Closed
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
15 changes: 15 additions & 0 deletions build/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,21 @@ function(extract_sources sources_file)
message(FATAL_ERROR "Unsupported ANDROID_ABI setting ${ANDROID_ABI}. Please add it here!")
endif()
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(target_platforms_arg "--target-platforms=shim//:ios-arm64")
endif()
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(target_platforms_arg "--target-platforms=shim//:macos-arm64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(target_platforms_arg "--target-platforms=shim//:macos-x86_64")
endif()
endif()

execute_process(
COMMAND
${PYTHON_EXECUTABLE} ${executorch_root}/build/extract_sources.py
Expand Down
24 changes: 24 additions & 0 deletions shim/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,27 @@ execution_platform(
use_windows_path_separators = host_info().os.is_windows,
visibility = ["PUBLIC"],
)

execution_platform(
name = "ios-arm64",
cpu_configuration = "prelude//cpu:arm64",
os_configuration = "prelude//os:ios",
use_windows_path_separators = False,
visibility = ["PUBLIC"],
)

execution_platform(
name = "macos-arm64",
cpu_configuration = "prelude//cpu:arm64",
os_configuration = "prelude//os:macos",
use_windows_path_separators = False,
visibility = ["PUBLIC"],
)

execution_platform(
name = "macos-x86_64",
cpu_configuration = "prelude//cpu:x86_64",
os_configuration = "prelude//os:macos",
use_windows_path_separators = False,
visibility = ["PUBLIC"],
)
Loading