bp2build: convert more cc_objects.

This CL also discovered that a couple of cc_objects include headers from the bionic subdir, without declaring them in the local_include_dirs.

Test: build/bazel/scripts/milestone-2/demo.sh full && build/bazel/scripts/milestone-2/demo.sh cleanup
Change-Id: I943980b1d1c6dab39d3c27da8037e587f97f76e3
This commit is contained in:
Jingwen Chen 2021-02-18 23:22:03 -05:00
parent 10e3cd784d
commit 0b1611e637

View file

@ -2078,6 +2078,7 @@ cc_object {
srcs: ["arch-common/bionic/crtbegin_so.c"], srcs: ["arch-common/bionic/crtbegin_so.c"],
defaults: ["crt_so_defaults"], defaults: ["crt_so_defaults"],
bazel_module: { bp2build_available: true }, bazel_module: { bp2build_available: true },
} }
@ -2097,15 +2098,22 @@ cc_object {
srcs: ["arch-common/bionic/crtend_so.S"], srcs: ["arch-common/bionic/crtend_so.S"],
defaults: ["crt_so_defaults"], defaults: ["crt_so_defaults"],
bazel_module: { bp2build_available: true },
} }
cc_object { cc_object {
name: "crtbegin_static1", name: "crtbegin_static1",
local_include_dirs: ["include"], local_include_dirs: [
"include",
"bionic", // crtbegin.c includes bionic/libc_init_common.h
],
srcs: ["arch-common/bionic/crtbegin.c"], srcs: ["arch-common/bionic/crtbegin.c"],
defaults: ["crt_defaults"], defaults: ["crt_defaults"],
// When using libc.a, we're using the latest library regardless of target API level. // When using libc.a, we're using the latest library regardless of target API level.
min_sdk_version: "current", min_sdk_version: "current",
bazel_module: { bp2build_available: true },
} }
cc_object { cc_object {
@ -2122,9 +2130,14 @@ cc_object {
cc_object { cc_object {
name: "crtbegin_dynamic1", name: "crtbegin_dynamic1",
local_include_dirs: ["include"], local_include_dirs: [
"include",
"bionic", // crtbegin.c includes bionic/libc_init_common.h
],
srcs: ["arch-common/bionic/crtbegin.c"], srcs: ["arch-common/bionic/crtbegin.c"],
defaults: ["crt_defaults"], defaults: ["crt_defaults"],
bazel_module: { bp2build_available: true },
} }
cc_object { cc_object {
@ -2153,6 +2166,8 @@ cc_object {
srcs: ["arch-common/bionic/crtend.S"], srcs: ["arch-common/bionic/crtend.S"],
defaults: ["crt_defaults"], defaults: ["crt_defaults"],
bazel_module: { bp2build_available: true },
} }
cc_library_static { cc_library_static {