-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Flag: --incompatible_load_cc_rules_from_bzl
Available since: 0.28 (July2019 release)
Will be flipped in: 1.0 (September 2019 release)
Tracking issue: #7643
cc_library, cc_binary, cc_test, cc_import, cc_proto_library, fdo_profile, fdo_prefetch_hints, objc_library, objc_import, cc_toolchain, cc_toolchain_suite, cc_flags_supplier and compiler_flag have to be loaded from @rules_cc.
For example if you are using cc_library, add the following load statement to your BUILD/bzl file.
load("@rules_cc//cc:defs.bzl", "cc_library")
You will have to add the rules_cc to your WORKSPACE file as well:
http_archive(
name = "rules_cc",
sha256 = "e75dfb05bc1e89ebbb6696cadb5e455833690009310d9dc5512151c5adb0e4e3",
strip_prefix = "rules_cc-cfe68f6bc79dea602f2f6a767797f94a5904997f",
urls = [
"https://github.com/bazelbuild/rules_cc/archive/cfe68f6bc79dea602f2f6a767797f94a5904997f.zip",
],
)
There is a bug in a previous version of rules_cc that may cause problems when you have tags of your own that come from a separate bzl file. If you have to use the old version of rules_cc, you can get around the bug by passing tags = list(TAGS) to the cc_* rule. instead of doing tags = TAGS directly.