Skip to content

Commit e9e72ff

Browse files
authored
Add rules_cc 0.0.1 (bazelbuild#16)
* Add rules_cc 2021-10-06-8ab61cf * Fix version number * Use 0.0.1 source
1 parent 46bff53 commit e9e72ff

File tree

5 files changed

+108
-0
lines changed

5 files changed

+108
-0
lines changed

modules/rules_cc/0.0.1/MODULE.bazel

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module(
2+
name = "rules_cc",
3+
version = "0.0.1",
4+
compatibility_level = 1,
5+
toolchains_to_register = ["@local_config_cc_toolchains//:all"],
6+
)
7+
8+
bazel_dep(name = "bazel_skylib", version = "1.0.3")
9+
bazel_dep(name = "platforms", version = "0.0.4")
10+
11+
cc_configure = use_extension("@rules_cc//bzlmod:extensions.bzl", "cc_configure")
12+
use_repo(cc_configure, "local_config_cc_toolchains")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
commit 6c0a2c8eb9f0bc522787c4bfaa5794ad0e3bdb07
2+
Author: Yun Peng <[email protected]>
3+
Date: Wed Oct 6 18:09:19 2021 +0200
4+
5+
Modularize rules_cc
6+
7+
diff --git a/MODULE.bazel b/MODULE.bazel
8+
new file mode 100644
9+
index 0000000..be5b13d
10+
--- /dev/null
11+
+++ b/MODULE.bazel
12+
@@ -0,0 +1,12 @@
13+
+module(
14+
+ name = "rules_cc",
15+
+ version = "0.0.1",
16+
+ compatibility_level = 1,
17+
+ toolchains_to_register = ["@local_config_cc_toolchains//:all"],
18+
+)
19+
+
20+
+bazel_dep(name = "bazel_skylib", version = "1.0.3")
21+
+bazel_dep(name = "platforms", version = "0.0.4")
22+
+
23+
+cc_configure = use_extension("@rules_cc//bzlmod:extensions.bzl", "cc_configure")
24+
+use_repo(cc_configure, "local_config_cc_toolchains")
25+
diff --git a/bzlmod/BUILD b/bzlmod/BUILD
26+
new file mode 100644
27+
index 0000000..8b13789
28+
--- /dev/null
29+
+++ b/bzlmod/BUILD
30+
@@ -0,0 +1 @@
31+
+
32+
diff --git a/bzlmod/extensions.bzl b/bzlmod/extensions.bzl
33+
new file mode 100644
34+
index 0000000..3fdbe87
35+
--- /dev/null
36+
+++ b/bzlmod/extensions.bzl
37+
@@ -0,0 +1,22 @@
38+
+# Copyright 2018 The Bazel Authors. All rights reserved.
39+
+#
40+
+# Licensed under the Apache License, Version 2.0 (the "License");
41+
+# you may not use this file except in compliance with the License.
42+
+# You may obtain a copy of the License at
43+
+#
44+
+# http://www.apache.org/licenses/LICENSE-2.0
45+
+#
46+
+# Unless required by applicable law or agreed to in writing, software
47+
+# distributed under the License is distributed on an "AS IS" BASIS,
48+
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49+
+# See the License for the specific language governing permissions and
50+
+# limitations under the License.
51+
+"""Module extension for cc auto configuration."""
52+
+
53+
+load("//cc/private/toolchain:cc_configure.bzl", "cc_autoconf_toolchains", "cc_autoconf")
54+
+
55+
+def _cc_configure_impl(ctx):
56+
+ cc_autoconf_toolchains(name = "local_config_cc_toolchains")
57+
+ cc_autoconf(name = "local_config_cc")
58+
+
59+
+cc_configure = module_extension(implementation = _cc_configure_impl)

modules/rules_cc/0.0.1/presubmit.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
platforms:
2+
centos7:
3+
build_targets:
4+
- '@rules_cc//cc/...'
5+
- '@rules_cc//tools/runfiles'
6+
debian10:
7+
build_targets:
8+
- '@rules_cc//cc/...'
9+
- '@rules_cc//tools/runfiles'
10+
macos:
11+
build_targets:
12+
- '@rules_cc//cc/...'
13+
- '@rules_cc//tools/runfiles'
14+
ubuntu2004:
15+
build_targets:
16+
- '@rules_cc//cc/...'
17+
- '@rules_cc//tools/runfiles'
18+
windows:
19+
build_targets:
20+
- '@rules_cc//cc/...'
21+
- '@rules_cc//tools/runfiles'

modules/rules_cc/0.0.1/source.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"integrity": "sha256-Tcy/0iwN7xZMj0dFi9UODHFI89kgAs20WcKpamhJgkE=",
3+
"patch_strip": 1,
4+
"patches": {
5+
"add_module_extension.patch": "sha256-ees694Rs4ca6Ogle8ZY93xLl3Hfhggojy9KyJG706Xo="
6+
},
7+
"url": "https://github.com/bazelbuild/rules_cc/releases/download/0.0.1/rules_cc-0.0.1.tar.gz"
8+
}

modules/rules_cc/metadata.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"homepage": "https://github.com/bazelbuild/rules_cc",
3+
"maintainers": [],
4+
"versions": [
5+
"0.0.1"
6+
],
7+
"yanked_versions": {}
8+
}

0 commit comments

Comments
 (0)