Skip to content

Commit b7dfd8a

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Fix Android x86_64 build (pytorch#5434)
Summary: Pull Request resolved: pytorch#5434 Reviewed By: dbort Differential Revision: D62892393 Pulled By: kirklandsign fbshipit-source-id: 32cc89511d188438259def4d7b36d034eaa1ef15
1 parent 2e1043b commit b7dfd8a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

build/Utils.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ function(extract_sources sources_file)
187187
if(ANDROID_ABI)
188188
if("${ANDROID_ABI}" STREQUAL "arm64-v8a")
189189
set(target_platforms_arg "--target-platforms=shim//:android-arm64")
190+
elseif("${ANDROID_ABI}" STREQUAL "x86_64")
191+
set(target_platforms_arg "--target-platforms=shim//:android-x86_64")
190192
else()
191193
message(FATAL_ERROR "Unsupported ANDROID_ABI setting ${ANDROID_ABI}. Please add it here!")
192194
endif()

shim/BUCK

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,12 @@ execution_platform(
6565
use_windows_path_separators = host_info().os.is_windows,
6666
visibility = ["PUBLIC"],
6767
)
68+
69+
execution_platform(
70+
name = "android-x86_64",
71+
cpu_configuration = "prelude//cpu:x86_64",
72+
os_configuration = "prelude//os:android",
73+
# REVIEW: not sure if this is correct
74+
use_windows_path_separators = host_info().os.is_windows,
75+
visibility = ["PUBLIC"],
76+
)

0 commit comments

Comments
 (0)