This repository has been archived by the owner on Jul 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUCK
127 lines (115 loc) · 3.26 KB
/
BUCK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
load(
"@prelude//toolchains/conan:defs.bzl",
"conan_init",
"conan_profile",
"system_conan_toolchain"
)
load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain")
load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain")
load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain")
load("@prelude//toolchains:remote_test_execution.bzl", "remote_test_execution_toolchain")
system_cxx_toolchain(
name = "cxx",
compiler_type = "clang",
cxx_compiler = select({
"prelude//os:linux": "clang++",
"prelude//os:macos": "/opt/homebrew/opt/llvm/bin/clang++",
"prelude//os:windows": "clang++"
}),
cxx_flags = select({
"config//os:linux": [
"-std=c++2c",
"-Wall",
"-Wunused-variable",
"-Wunused-const-variable",],
"config//os:macos": [
"-std=c++2c",
"-Wall",
"-Wunused-variable",
"-Wunused-const-variable",
"-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS",
"-D__STDC_LIMIT_MACROS",
"-I/opt/homebrew/opt/llvm/include/",
"-L/opt/homebrew/opt/llvm/lib/c++",
"-stdlib=libc++",
"-Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++",
"-Wl,-search_paths_first",
"-Wl,-headerpad_max_install_names",],
"config//os:windows": [
"-std=c++2c",
"-Wall",
"-Wunused-variable",
"-Wunused-const-variable",],
}),
visibility = ["PUBLIC"],
)
system_genrule_toolchain(
name = "genrule",
visibility = ["PUBLIC"],
)
system_python_bootstrap_toolchain(
name = "python_bootstrap",
visibility = ["PUBLIC"],
)
system_conan_toolchain(
name = "conan",
conan_path = "conan",
visibility = ["PUBLIC"],
)
conan_profile(
name = "conan-profile-linux",
arch = "x86_64",
build_type = "Release",
compiler = "clang",
compiler_libcxx = "libstdc++",
compiler_version = "16",
os = "Linux",
)
conan_profile(
name = "conan-profile-macos-x86_64",
arch = "x86_64",
build_type = "Release",
compiler = "clang",
compiler_libcxx = "libc++",
compiler_version = "16",
os = "Macos",
)
conan_profile(
name = "conan-profile-macos-arm64",
arch = "armv8",
build_type = "Release",
compiler = "clang",
compiler_libcxx = "libc++",
compiler_version = "16",
os = "Macos",
)
conan_profile(
name = "conan-profile-windows",
arch = "x86_64",
build_type = "Release",
compiler = "clang",
compiler_libcxx = "libstdc++",
compiler_version = "16",
os = "Windows",
)
alias(
name = "conan-profile",
actual = select({
"prelude//os:linux": ":conan-profile-linux",
"prelude//os:macos": select({
"prelude//cpu:arm64": ":conan-profile-macos-arm64",
"prelude//cpu:x86_64": ":conan-profile-macos-x86_64",
}),
"prelude//os:windows": ":conan-profile-windows",
}),
)
conan_init(
name = "conan-init",
profile = ":conan-profile",
visibility = ["PUBLIC"],
)
remote_test_execution_toolchain(
name = "remote_test_execution",
visibility = ["PUBLIC"],
)