Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependencie with bazelbuild/rules_cc #2950

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ tasks:
ubuntu2004:
# enable some unflipped incompatible flags on this platform to ensure we don't regress.
build_flags:
- "--incompatible_load_cc_rules_from_bzl"
- "--incompatible_load_proto_rules_from_bzl"
- "--incompatible_restrict_string_escapes"
- "--incompatible_enable_cc_toolchain_resolution"
test_flags:
- "--incompatible_load_cc_rules_from_bzl"
- "--incompatible_load_proto_rules_from_bzl"
- "--incompatible_restrict_string_escapes"
- "--incompatible_enable_cc_toolchain_resolution"
Expand Down
15 changes: 0 additions & 15 deletions go/private/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,6 @@ def go_rules_dependencies(is_rules_go = False):
patch_args = ["-p1"],
)

# Needed for additional targets declared around binaries with c-archive
# and c-shared link modes.
# releaser:upgrade-dep bazelbuild rules_cc
_maybe(
http_archive,
name = "rules_cc",
# main, as of 2021-06-30
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/daf6ace7cfeacd6a83e9ff2ed659f416537b6c74.zip",
"https://github.com/bazelbuild/rules_cc/archive/daf6ace7cfeacd6a83e9ff2ed659f416537b6c74.zip",
],
sha256 = "b295cad8c5899e371dde175079c0a2cdc0151f5127acc92366a8c986beb95c76",
strip_prefix = "rules_cc-daf6ace7cfeacd6a83e9ff2ed659f416537b6c74",
)

# Proto dependencies
# These are limited as much as possible. In most cases, users need to
# declare these on their own (probably via go_repository rules generated
Expand Down
1 change: 0 additions & 1 deletion go/private/rules/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ bzl_library(
name = "cgo",
srcs = ["cgo.bzl"],
visibility = ["//go:__subpackages__"],
# Don't list dependency on @rules_cc//cc:defs
deps = [
"@io_bazel_rules_go//go/private:common",
"@io_bazel_rules_go//go/private:mode",
Expand Down
1 change: 0 additions & 1 deletion tests/core/c_linkmodes/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")

go_binary(
name = "adder_archive",
Expand Down
1 change: 0 additions & 1 deletion tests/core/cgo/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_import", "cc_library")

go_test(
name = "opts_test",
Expand Down
1 change: 0 additions & 1 deletion tests/core/cgo/objc/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@rules_cc//cc:defs.bzl", "objc_library")

go_test(
name = "objc_test",
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/cgo_select/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@rules_cc//cc:defs.bzl", "cc_library")

go_library(
name = "go_default_library",
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy/examples/cgo/cc_dependency/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_import", "cc_library")

config_setting(
name = "darwin",
values = {"cpu": "darwin"},
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/transitive_data/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@rules_cc//cc:defs.bzl", "cc_library")

go_test(
name = "go_default_test",
Expand Down
10 changes: 0 additions & 10 deletions windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,8 @@ Create a workspace with a simple ``cc_binary`` target.
.. code::

-- WORKSPACE --
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "rules_cc",
commit = "7e650b11fe6d49f70f2ca7a1c4cb8bcc4a1fe239",
remote = "https://github.com/bazelbuild/rules_cc",
shallow_since = "1578064657 -0800",
)

-- BUILD.bazel --
load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
name = "hello",
srcs = ["hello.c"],
Expand Down