Skip to content

Commit 86acba3

Browse files
committed
Move shim/xplat to shim_et
In preparation for replacing the checked-in files in shim/ with https://github.com/facebook/buck2-shims-meta as a submodule. The portions of this diff that are not a pure move are: - creation of shim_et/BUCK - movement of Android toolchains from shim/BUCK to shim_et/BUCK because they are not present in buck2-shims-meta - edits to .buckconfig - edit to Utils.cmake to point at shim_et// instead of shim// ghstack-source-id: c99b5d0 ghstack-comment-id: 2669799227 Pull Request resolved: #8583
1 parent b6ffe1a commit 86acba3

File tree

17 files changed

+64
-29
lines changed

17 files changed

+64
-29
lines changed

.buckconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
root = .
99
prelude = third-party/prelude
1010
shim = shim
11+
shim_et = shim_et
1112

1213
[repository_aliases]
1314
config = prelude
1415
ovr_config = prelude
15-
toolchains = shim
16-
fbcode = shim
17-
fbcode_macros = shim
18-
fbsource = shim
16+
toolchains = shim_et
17+
fbcode = shim_et
18+
fbcode_macros = shim_et
19+
fbsource = shim_et
1920
buck = shim
2021

2122
[cxx]

build/Utils.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ function(extract_sources sources_file)
206206

207207
if(ANDROID_ABI)
208208
if("${ANDROID_ABI}" STREQUAL "arm64-v8a")
209-
set(target_platforms_arg "--target-platforms=shim//:android-arm64")
209+
set(target_platforms_arg "--target-platforms=shim_et//:android-arm64")
210210
elseif("${ANDROID_ABI}" STREQUAL "x86_64")
211-
set(target_platforms_arg "--target-platforms=shim//:android-x86_64")
211+
set(target_platforms_arg "--target-platforms=shim_et//:android-x86_64")
212212
else()
213213
message(
214214
FATAL_ERROR

shim/BUCK

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,3 @@ remote_test_execution_toolchain(
6161
name = "remote_test_execution",
6262
visibility = ["PUBLIC"],
6363
)
64-
65-
execution_platform(
66-
name = "android-arm64",
67-
cpu_configuration = "prelude//cpu:arm64",
68-
os_configuration = "prelude//os:android",
69-
# REVIEW: not sure if this is correct
70-
use_windows_path_separators = host_info().os.is_windows,
71-
visibility = ["PUBLIC"],
72-
)
73-
74-
execution_platform(
75-
name = "android-x86_64",
76-
cpu_configuration = "prelude//cpu:x86_64",
77-
os_configuration = "prelude//os:android",
78-
# REVIEW: not sure if this is correct
79-
use_windows_path_separators = host_info().os.is_windows,
80-
visibility = ["PUBLIC"],
81-
)
82-
83-
noop_test_toolchain(
84-
name = "test",
85-
visibility = ["PUBLIC"],
86-
)

shim_et/BUCK

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
load("@prelude//platforms:defs.bzl", "execution_platform")
2+
load("@prelude//tests:test_toolchain.bzl", "noop_test_toolchain")
3+
load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain")
4+
load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain")
5+
load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain", "system_python_toolchain")
6+
load("@prelude//toolchains:remote_test_execution.bzl", "remote_test_execution_toolchain")
7+
8+
# Although the non-Android toolchains below are present in shim/BUCK, it appears that we
9+
# have to duplicate them here or builds won't work.
10+
system_cxx_toolchain(
11+
name = "cxx",
12+
cxx_flags = ["-std=c++20"],
13+
visibility = ["PUBLIC"],
14+
)
15+
16+
system_genrule_toolchain(
17+
name = "genrule",
18+
visibility = ["PUBLIC"],
19+
)
20+
21+
system_python_toolchain(
22+
name = "python",
23+
visibility = ["PUBLIC"],
24+
)
25+
26+
system_python_bootstrap_toolchain(
27+
name = "python_bootstrap",
28+
visibility = ["PUBLIC"],
29+
)
30+
31+
execution_platform(
32+
name = "android-arm64",
33+
cpu_configuration = "prelude//cpu:arm64",
34+
os_configuration = "prelude//os:android",
35+
# REVIEW: not sure if this is correct
36+
use_windows_path_separators = host_info().os.is_windows,
37+
visibility = ["PUBLIC"],
38+
)
39+
40+
execution_platform(
41+
name = "android-x86_64",
42+
cpu_configuration = "prelude//cpu:x86_64",
43+
os_configuration = "prelude//os:android",
44+
# REVIEW: not sure if this is correct
45+
use_windows_path_separators = host_info().os.is_windows,
46+
visibility = ["PUBLIC"],
47+
)
48+
49+
noop_test_toolchain(
50+
name = "test",
51+
visibility = ["PUBLIC"],
52+
)
53+
54+
remote_test_execution_toolchain(
55+
name = "remote_test_execution",
56+
visibility = ["PUBLIC"],
57+
)

0 commit comments

Comments
 (0)