forked from google/gfxstream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
79 lines (69 loc) · 3 KB
/
Copy pathMODULE.bazel
File metadata and controls
79 lines (69 loc) · 3 KB
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
module(
name = "gfxstream",
version = "0.0.1",
)
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", repo_name = "com_google_googletest")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_cc", version = "0.2.16")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "protobuf", version = "33.4")
########### When building Gfxstream from standalone repo ###########
bazel_dep(name = "abseil-cpp", version = "20260107.0", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.7.1", dev_dependency = True)
bazel_dep(name = "toolchains_llvm", version = "1.6.0", dev_dependency = True)
bazel_dep(name = "apple_support", version = "1.21.0", repo_name = "build_bazel_apple_support", dev_dependency = True)
bazel_dep(name = "rules_python", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_shell", version = "0.6.1", dev_dependency = True)
bazel_dep(name = "rules_rust", version = "0.68.1", dev_dependency = True)
bazel_dep(name = "zlib", version = "1.3.1.bcr.3", dev_dependency = True)
# Register the Apple CC (Xcode) toolchain so that `objc_library`/`.mm` targets can
# be compiled on macOS. The hermetic LLVM toolchain registered below does not
# support Objective-C compilation. This must be registered before the LLVM
# toolchain so that it is selected first when targeting macOS; the Apple toolchain
# is constrained to Apple platforms, so Linux/other builds still use LLVM.
apple_cc_configure = use_extension(
"@build_bazel_apple_support//crosstool:setup.bzl",
"apple_cc_configure_extension",
dev_dependency = True,
)
use_repo(apple_cc_configure, "local_config_apple_cc_toolchains")
register_toolchains(
"@local_config_apple_cc_toolchains//:all",
dev_dependency = True,
)
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(
llvm_version = "18.1.8",
)
use_repo(llvm, "llvm_toolchain")
file_detector = use_repo_rule("//toolchain/bazel:file_detector.bzl", "file_detector")
file_detector(
name = "clang_detector",
dev_dependency = True,
files = {
"/usr/bin/clang-11": "clang_11",
"/usr/bin/clang-12": "clang_12",
"/usr/bin/clang-13": "clang_13",
"/usr/bin/clang-14": "clang_14",
"/usr/bin/clang-15": "clang_15",
"/usr/bin/clang-16": "clang_16",
"/usr/bin/clang-17": "clang_17",
"/usr/bin/clang-18": "clang_18",
"/usr/bin/clang-19": "clang_19",
},
)
# The first toolchain that satisfies platform constraints is chosen.
# Alternatively, a specific toolchain can be chosen with the
# `--extra_toolchains` flag, e.g.
# ```
# bazel build //cuttlefish/package:cvd \
# --extra_toolchains=//toolchain:linux_local_clang_19
# ```
#
# For more information, see https://bazel.build/extending/toolchains
register_toolchains(
"@llvm_toolchain//:all",
dev_dependency = True,
)
include("//third_party:third_party.MODULE.bazel")