mirror of https://github.com/bazelbuild/rules_cc
Refactor rules_cc to follow https://docs.bazel.build/versions/master/skylark/deploying.html
RELNOTES: None. PiperOrigin-RevId: 253736769 Change-Id: Ib13ecb077559f890aa3cc207b7ec1a53ac18d553
This commit is contained in:
parent
dfd3d3408e
commit
d36c8d400c
|
@ -26,7 +26,7 @@ http_archive(
|
|||
Then, in your BUILD files, import and use the rules:
|
||||
|
||||
```
|
||||
load("@rules_cc//cc:rules.bzl", "cc_library")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
cc_library(
|
||||
...
|
||||
)
|
||||
|
|
|
@ -81,5 +81,5 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_to
|
|||
go_rules_dependencies()
|
||||
go_register_toolchains()
|
||||
|
||||
load("//cc:deps.bzl", "rules_cc_deps")
|
||||
rules_cc_deps()
|
||||
load("//cc:repositories.bzl", "rules_cc_dependencies")
|
||||
rules_cc_dependencies()
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
"""Repository rules entry point module for rules_cc."""
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
def rules_cc_deps():
|
||||
def rules_cc_dependencies():
|
||||
_maybe(
|
||||
http_archive,
|
||||
name = "bazel_skylib",
|
|
@ -17,7 +17,7 @@ licenses(["notice"])
|
|||
|
||||
load("//examples/my_c_compile:my_c_compile.bzl", "my_c_compile")
|
||||
load("//examples/my_c_archive:my_c_archive.bzl", "my_c_archive")
|
||||
load("//cc:rules.bzl", "cc_binary")
|
||||
load("//cc:defs.bzl", "cc_binary")
|
||||
|
||||
cc_binary(
|
||||
name = "main",
|
||||
|
|
Loading…
Reference in New Issue