Skip to content

Commit

Permalink
Add rules_cc and rules_shell loads
Browse files Browse the repository at this point in the history
  • Loading branch information
keith committed Dec 6, 2024
1 parent ca8b66c commit d2fd625
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ module(
bazel_dep(name = "bazel_features", version = "1.10.0")
bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "platforms", version = "0.0.9")
bazel_dep(name = "rules_cc", version = "0.0.17")

bazel_dep(name = "rules_shell", version = "0.3.0", dev_dependency = True)
bazel_dep(
name = "stardoc",
version = "0.6.2",
Expand Down
13 changes: 13 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,16 @@ stardoc_external_deps()
load("@stardoc_maven//:defs.bzl", stardoc_pinned_maven_install = "pinned_maven_install")

stardoc_pinned_maven_install()

http_archive(
name = "rules_shell",
sha256 = "d8cd4a3a91fc1dc68d4c7d6b655f09def109f7186437e3f50a9b60ab436a0c53",
strip_prefix = "rules_shell-0.3.0",
url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.3.0/rules_shell-v0.3.0.tar.gz",
)

load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")

rules_shell_dependencies()

rules_shell_toolchains()
2 changes: 2 additions & 0 deletions crosstool/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_binary")

package(default_visibility = ["//visibility:public"])

# Files which shouldn't be publicly visible and dependencies of all objc_* or ios_* rules should be excluded.
Expand Down
1 change: 1 addition & 0 deletions doc/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

_DOC_SRCS = {
"rules": [
Expand Down
1 change: 1 addition & 0 deletions lib/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@rules_cc//cc:defs.bzl", "objc_library")

licenses(["notice"])

Expand Down
8 changes: 8 additions & 0 deletions lib/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,12 @@ def apple_support_dependencies():
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.10.0/bazel_features-v1.10.0.tar.gz",
)

_maybe(
http_archive,
name = "rules_cc",
sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1",
strip_prefix = "rules_cc-0.0.17",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz",
)

apple_cc_configure()
2 changes: 2 additions & 0 deletions test/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
load("//rules:apple_genrule.bzl", "apple_genrule")
load(":apple_support_test.bzl", "apple_support_test")
load(":available_xcodes_test.bzl", "available_xcodes_test")
Expand Down
1 change: 1 addition & 0 deletions test/header_parsing/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_cc//cc:defs.bzl", "cc_library", "objc_library")

package(features = ["parse_headers"])

Expand Down
1 change: 1 addition & 0 deletions test/layering_check/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test", "objc_library")

package(features = ["layering_check"])

Expand Down
3 changes: 3 additions & 0 deletions test/shell/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
load("@rules_shell//shell:sh_library.bzl", "sh_library")
load("@rules_shell//shell:sh_test.bzl", "sh_test")

exports_files([
"verify_binary.sh",
"verify_relative_oso.sh",
Expand Down
1 change: 1 addition & 0 deletions test/test_data/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "objc_library")
load("//rules:universal_binary.bzl", "universal_binary")
load("//test:starlark_apple_binary.bzl", "starlark_apple_binary")
load("//test:starlark_apple_static_library.bzl", "starlark_apple_static_library")
Expand Down

0 comments on commit d2fd625

Please sign in to comment.