-
Notifications
You must be signed in to change notification settings - Fork 564
Expand file tree
/
Copy pathMODULE.bazel
More file actions
44 lines (38 loc) · 1.29 KB
/
MODULE.bazel
File metadata and controls
44 lines (38 loc) · 1.29 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
module(
name = "rules_rust_test_cc_common_link_with_global_alloc",
version = "0.0.0",
)
bazel_dep(name = "rules_rust", version = "0.0.0")
local_path_override(
module_name = "rules_rust",
path = "../../..",
)
bazel_dep(name = "rules_cc", version = "0.2.4")
bazel_dep(name = "platforms", version = "1.0.0")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2018",
target_settings = [
"@rules_rust//rust/settings:experimental_use_allocator_libraries_with_mangled_symbols_off",
],
)
# Generate a toolchain to be used for rust-based allocator symbols.
# A recent enough version of rustc that mangles the internal allocator symbols.
VERSION = "nightly/2026-01-25"
rust.repository_set(
name = "rust_with_alloc_mangling_linux_x86_64",
allocator_library = "@rules_rust//ffi/rs:empty",
edition = "2021",
exec_triple = "x86_64-unknown-linux-gnu",
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
],
target_settings = [
"@rules_rust//rust/settings:experimental_use_allocator_libraries_with_mangled_symbols_on",
],
target_triple = "x86_64-unknown-linux-gnu",
versions = [VERSION],
)
use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")