File tree 33 files changed +364
-0
lines changed
cargo_build_script_runner
allowlists/function_transition_allowlist
33 files changed +364
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,25 @@ alias(
18
18
visibility = ["//visibility:public" ],
19
19
)
20
20
21
+ filegroup (
22
+ name = "distro" ,
23
+ srcs = glob (["*.bzl" ]) + [
24
+ "//bindgen:distro" ,
25
+ "//cargo:distro" ,
26
+ "//crate_universe:distro" ,
27
+ "//proto:distro" ,
28
+ "//rust:distro" ,
29
+ "//tools:distro" ,
30
+ "//util:distro" ,
31
+ "//wasm_bindgen:distro" ,
32
+ "BUILD.bazel" ,
33
+ "README.md" ,
34
+ "LICENSE.txt" ,
35
+ "WORKSPACE.bazel" ,
36
+ ],
37
+ visibility = ["//:__subpackages__" ],
38
+ )
39
+
21
40
# This setting may be changed from the command line to generate machine readable errors.
22
41
error_format (
23
42
name = "error_format" ,
Original file line number Diff line number Diff line change @@ -57,3 +57,16 @@ http_archive(
57
57
#
58
58
# load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")
59
59
# rbe_preconfig(name = "buildkite_config", toolchain = "ubuntu1604-bazel-java8")
60
+
61
+ http_archive (
62
+ name = "rules_pkg" ,
63
+ sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66" ,
64
+ urls = [
65
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz" ,
66
+ "https://github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz" ,
67
+ ],
68
+ )
69
+
70
+ load ("@rules_pkg//:deps.bzl" , "rules_pkg_dependencies" )
71
+
72
+ rules_pkg_dependencies ()
Original file line number Diff line number Diff line change @@ -17,6 +17,16 @@ alias(
17
17
deprecation = "Please use the `@rules_rust//bindgen:bzl_lib` target instead" ,
18
18
)
19
19
20
+ filegroup (
21
+ name = "distro" ,
22
+ srcs = glob (["*.bzl" ]) + [
23
+ "//bindgen/raze:srcs" ,
24
+ "//bindgen/raze/remote:srcs" ,
25
+ "BUILD.bazel" ,
26
+ ],
27
+ visibility = ["//:__subpackages__" ],
28
+ )
29
+
20
30
rust_bindgen_toolchain (
21
31
name = "default_bindgen_toolchain_impl" ,
22
32
bindgen = "//bindgen/raze:cargo_bin_bindgen" ,
Original file line number Diff line number Diff line change @@ -13,3 +13,14 @@ alias(
13
13
actual = ":bzl_lib" ,
14
14
deprecation = "Please use the `@rules_rust//cargo:bzl_lib` target instead" ,
15
15
)
16
+
17
+ filegroup (
18
+ name = "distro" ,
19
+ srcs = glob (["*.bzl" ]) + [
20
+ "//cargo/bootstrap:distro" ,
21
+ "//cargo/cargo_build_script_runner:distro" ,
22
+ "//cargo/private:distro" ,
23
+ "BUILD.bazel" ,
24
+ ],
25
+ visibility = ["//:__subpackages__" ],
26
+ )
Original file line number Diff line number Diff line change @@ -18,3 +18,12 @@ rust_binary(
18
18
"RULES_RUST_CARGO_BOOTSTRAP_BINARY" : "$(rootpath bootstrap_installer.rs)" ,
19
19
},
20
20
)
21
+
22
+ filegroup (
23
+ name = "distro" ,
24
+ srcs = [
25
+ "BUILD.bazel" ,
26
+ "bootstrap_installer.rs" ,
27
+ ],
28
+ visibility = ["//:__subpackages__" ],
29
+ )
Original file line number Diff line number Diff line change @@ -22,3 +22,11 @@ rust_test(
22
22
crate = ":cargo_build_script_runner" ,
23
23
deps = [":cargo_build_script_runner" ],
24
24
)
25
+
26
+ filegroup (
27
+ name = "distro" ,
28
+ srcs = glob (["*.rs" ]) + [
29
+ "BUILD.bazel" ,
30
+ ],
31
+ visibility = ["//:__subpackages__" ],
32
+ )
Original file line number Diff line number Diff line change @@ -5,3 +5,11 @@ bzl_library(
5
5
srcs = glob (["**/*.bzl" ]),
6
6
visibility = ["//:__subpackages__" ],
7
7
)
8
+
9
+ filegroup (
10
+ name = "distro" ,
11
+ srcs = glob (["*.bzl" ]) + [
12
+ "BUILD.bazel" ,
13
+ ],
14
+ visibility = ["//:__subpackages__" ],
15
+ )
Original file line number Diff line number Diff line change
1
+ load ("@rules_pkg//:pkg.bzl" , "pkg_tar" )
2
+
3
+ pkg_tar (
4
+ name = "rules_rust" ,
5
+ srcs = ["//:distro" ],
6
+ extension = "tar.gz" ,
7
+ mode = "0444" ,
8
+ # Make it owned by root so it does not have the uid of the CI robot.
9
+ owner = "0.0" ,
10
+ package_dir = "." ,
11
+ strip_prefix = "." ,
12
+ visibility = ["//:__subpackages__" ],
13
+ )
14
+
15
+ # This filegroup allows the tar file to appear in runfiles
16
+ # https://github.com/bazelbuild/bazel/issues/12348
17
+ filegroup (
18
+ name = "distro" ,
19
+ srcs = [":rules_rust" ],
20
+ visibility = ["//:__subpackages__" ],
21
+ )
22
+
23
+ sh_binary (
24
+ name = "publish" ,
25
+ srcs = ["publisher.sh" ],
26
+ data = [":distro" ],
27
+ env = {"ARCHIVE" : "$(rootpath :distro)" },
28
+ target_compatible_with = select ({
29
+ "@platforms//os:linux" : [],
30
+ "@platforms//os:macos" : [],
31
+ "//conditions:default" : ["@platforms//:incompatible" ],
32
+ }),
33
+ )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ ABS_ARCHIVE=" $( pwd) /${ARCHIVE} "
6
+ cd " ${BUILD_WORKING_DIRECTORY} "
7
+ mkdir -p " $@ "
8
+
9
+ set -x
10
+ cp -fp " ${ABS_ARCHIVE} " " $@ " /" $( basename " ${ARCHIVE} " ) "
Original file line number Diff line number Diff line change @@ -14,6 +14,20 @@ alias(
14
14
actual = "//proto/raze:cargo_bin_protoc_gen_rust_grpc" ,
15
15
)
16
16
17
+ filegroup (
18
+ name = "distro" ,
19
+ srcs = glob ([
20
+ "*.bzl" ,
21
+ "*.rs" ,
22
+ ]) + [
23
+ "//proto/raze:srcs" ,
24
+ "//proto/raze/remote:srcs" ,
25
+ "//proto/patches:distro" ,
26
+ "BUILD.bazel" ,
27
+ ],
28
+ visibility = ["//:__subpackages__" ],
29
+ )
30
+
17
31
toolchain_type (name = "toolchain" )
18
32
19
33
rust_binary (
Original file line number Diff line number Diff line change @@ -3,3 +3,12 @@ package(default_visibility = ["//visibility:public"])
3
3
exports_files ([
4
4
"com_google_protobuf-v3.10.0-bzl_visibility.patch" ,
5
5
])
6
+
7
+ filegroup (
8
+ name = "distro" ,
9
+ srcs = [
10
+ "BUILD.bazel" ,
11
+ "com_google_protobuf-v3.10.0-bzl_visibility.patch" ,
12
+ ],
13
+ visibility = ["//:__subpackages__" ],
14
+ )
Original file line number Diff line number Diff line change @@ -28,3 +28,15 @@ alias(
28
28
actual = ":bzl_lib" ,
29
29
deprecation = "Please use the `@rules_rust//rust:bzl_lib` target instead" ,
30
30
)
31
+
32
+ filegroup (
33
+ name = "distro" ,
34
+ srcs = glob (["*.bzl" ]) + [
35
+ "//rust/platform:distro" ,
36
+ "//rust/private:distro" ,
37
+ "//rust/settings:distro" ,
38
+ "//rust/toolchain:distro" ,
39
+ "BUILD.bazel" ,
40
+ ],
41
+ visibility = ["//:__subpackages__" ],
42
+ )
Original file line number Diff line number Diff line change @@ -24,3 +24,14 @@ alias(
24
24
deprecation = "Please use the `@rules_rust//platform:bzl_lib` target instead" ,
25
25
visibility = ["//rust:__subpackages__" ],
26
26
)
27
+
28
+ filegroup (
29
+ name = "distro" ,
30
+ srcs = glob (["*.bzl" ]) + [
31
+ "//rust/platform/channel:distro" ,
32
+ "//rust/platform/cpu:distro" ,
33
+ "//rust/platform/os:distro" ,
34
+ "BUILD.bazel" ,
35
+ ],
36
+ visibility = ["//:__subpackages__" ],
37
+ )
Original file line number Diff line number Diff line change @@ -20,3 +20,11 @@ constraint_value(
20
20
name = "stable" ,
21
21
constraint_setting = ":channel" ,
22
22
)
23
+
24
+ filegroup (
25
+ name = "distro" ,
26
+ srcs = [
27
+ "BUILD.bazel" ,
28
+ ],
29
+ visibility = ["//:__subpackages__" ],
30
+ )
Original file line number Diff line number Diff line change @@ -3,3 +3,11 @@ constraint_value(
3
3
constraint_setting = "@platforms//cpu" ,
4
4
visibility = ["//visibility:public" ],
5
5
)
6
+
7
+ filegroup (
8
+ name = "distro" ,
9
+ srcs = [
10
+ "BUILD.bazel" ,
11
+ ],
12
+ visibility = ["//:__subpackages__" ],
13
+ )
Original file line number Diff line number Diff line change @@ -9,3 +9,11 @@ constraint_value(
9
9
constraint_setting = "@platforms//os" ,
10
10
visibility = ["//visibility:public" ],
11
11
)
12
+
13
+ filegroup (
14
+ name = "distro" ,
15
+ srcs = [
16
+ "BUILD.bazel" ,
17
+ ],
18
+ visibility = ["//:__subpackages__" ],
19
+ )
Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ alias(
16
16
visibility = ["//rust:__subpackages__" ],
17
17
)
18
18
19
+ filegroup (
20
+ name = "distro" ,
21
+ srcs = glob (["*.bzl" ]) + [
22
+ "//rust/private/dummy_cc_toolchain:distro" ,
23
+ "BUILD.bazel" ,
24
+ ],
25
+ visibility = ["//:__subpackages__" ],
26
+ )
27
+
19
28
stamp_build_setting (name = "stamp" )
20
29
21
30
rust_analyzer_detect_sysroot (
Original file line number Diff line number Diff line change @@ -11,3 +11,11 @@ toolchain(
11
11
toolchain = ":dummy_cc_wasm32" ,
12
12
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type" ,
13
13
)
14
+
15
+ filegroup (
16
+ name = "distro" ,
17
+ srcs = glob (["*.bzl" ]) + [
18
+ "BUILD.bazel" ,
19
+ ],
20
+ visibility = ["//:__subpackages__" ],
21
+ )
Original file line number Diff line number Diff line change @@ -40,3 +40,11 @@ alias(
40
40
deprecation = "Please use the `@rules_rust//settings:bzl_lib` target instead" ,
41
41
visibility = ["//rust:__subpackages__" ],
42
42
)
43
+
44
+ filegroup (
45
+ name = "distro" ,
46
+ srcs = glob (["*.bzl" ]) + [
47
+ "BUILD.bazel" ,
48
+ ],
49
+ visibility = ["//:__subpackages__" ],
50
+ )
Original file line number Diff line number Diff line change @@ -41,3 +41,11 @@ toolchain_files(
41
41
name = "current_exec_rust_stdlib_files" ,
42
42
tool = "rust_stdlib" ,
43
43
)
44
+
45
+ filegroup (
46
+ name = "distro" ,
47
+ srcs = [
48
+ "BUILD.bazel" ,
49
+ ],
50
+ visibility = ["//:__subpackages__" ],
51
+ )
Original file line number Diff line number Diff line change
1
+ filegroup (
2
+ name = "distro" ,
3
+ srcs = glob (["*.bzl" ]) + [
4
+ "BUILD.bazel" ,
5
+ "//tools/allowlists/function_transition_allowlist:distro" ,
6
+ "//tools/clippy:distro" ,
7
+ "//tools/runfiles:distro" ,
8
+ "//tools/rustdoc:distro" ,
9
+ "//tools/rustfmt:distro" ,
10
+ ],
11
+ visibility = ["//:__subpackages__" ],
12
+ )
Original file line number Diff line number Diff line change @@ -2,3 +2,11 @@ package_group(
2
2
name = "function_transition_allowlist" ,
3
3
packages = ["//..." ],
4
4
)
5
+
6
+ filegroup (
7
+ name = "distro" ,
8
+ srcs = [
9
+ "BUILD.bazel" ,
10
+ ],
11
+ visibility = ["//:__subpackages__" ],
12
+ )
Original file line number Diff line number Diff line change 1
1
exports_files (["clippy.toml" ])
2
+
3
+ filegroup (
4
+ name = "distro" ,
5
+ srcs = [
6
+ "BUILD.bazel" ,
7
+ "clippy.toml" ,
8
+ ],
9
+ visibility = ["//:__subpackages__" ],
10
+ )
Original file line number Diff line number Diff line change @@ -21,3 +21,14 @@ rust_doc_test(
21
21
name = "runfiles_doc_test" ,
22
22
crate = ":runfiles" ,
23
23
)
24
+
25
+ filegroup (
26
+ name = "distro" ,
27
+ srcs = glob ([
28
+ "data/**" ,
29
+ "**/*.rs" ,
30
+ ]) + [
31
+ "BUILD.bazel" ,
32
+ ],
33
+ visibility = ["//:__subpackages__" ],
34
+ )
Original file line number Diff line number Diff line change @@ -54,3 +54,16 @@ rust_clippy(
54
54
":gen_rust_project" ,
55
55
],
56
56
)
57
+
58
+ filegroup (
59
+ name = "distro" ,
60
+ srcs = glob ([
61
+ "*.bzl" ,
62
+ "**/*.rs" ,
63
+ ]) + [
64
+ "//tools/rust_analyzer/raze:srcs" ,
65
+ "//tools/rust_analyzer/raze/remote:srcs" ,
66
+ "BUILD.bazel" ,
67
+ ],
68
+ visibility = ["//:__subpackages__" ],
69
+ )
Original file line number Diff line number Diff line change @@ -10,3 +10,13 @@ rust_binary(
10
10
"//tools/runfiles" ,
11
11
],
12
12
)
13
+
14
+ filegroup (
15
+ name = "distro" ,
16
+ srcs = glob ([
17
+ "**/*.rs" ,
18
+ ]) + [
19
+ "BUILD.bazel" ,
20
+ ],
21
+ visibility = ["//:__subpackages__" ],
22
+ )
You can’t perform that action at this time.
0 commit comments