Updates corresponding to toolchain changes.
* Limit linking features used by cc_object.
* Ensure features are propagated for full_cc_library/cc_library_static
Bug: 197920036
Test: build/bazel/ci/bp2build.sh
Change-Id: I9e73b4b106f0d24dc3da53450ae91867508eae16
diff --git a/rules/cc_library_static.bzl b/rules/cc_library_static.bzl
index 904e212..8facd1e 100644
--- a/rules/cc_library_static.bzl
+++ b/rules/cc_library_static.bzl
@@ -45,7 +45,7 @@
features = []
if "features" in kwargs:
- features = kwargs["features"]
+ features += kwargs["features"]
if rtti:
features += ["rtti"]
diff --git a/rules/cc_object.bzl b/rules/cc_object.bzl
index 98e6706..d8dea88 100644
--- a/rules/cc_object.bzl
+++ b/rules/cc_object.bzl
@@ -42,7 +42,14 @@
ctx = ctx,
cc_toolchain = cc_toolchain,
requested_features = ctx.features,
- unsupported_features = ctx.disabled_features + ["linker_flags"],
+ unsupported_features = ctx.disabled_features + [
+ "linker_flags",
+ "pack_dynamic_relocations",
+ "diasble_pack_relocations",
+ "dynamic_executable",
+ "dynamic_linker",
+ "no_undefined_symbols",
+ ],
)
compilation_contexts = []
diff --git a/rules/full_cc_library.bzl b/rules/full_cc_library.bzl
index d5a7d9a..092a173 100644
--- a/rules/full_cc_library.bzl
+++ b/rules/full_cc_library.bzl
@@ -38,6 +38,8 @@
shared_name = name + "_bp2build_cc_library_shared"
features = []
+ if "features" in kwargs:
+ features += kwargs["features"]
if not use_libcrt:
features += ["-use_libcrt"]