From e718dd720d7529d9d2ec7b9a4fafa9be36e549e9 Mon Sep 17 00:00:00 2001 From: Liz Kammer Date: Tue, 9 Mar 2021 15:00:06 -0500 Subject: [PATCH] Merge crt cc_objects Currently there is a pattern of `crtbegin_${type}1` and `crtbegin_${type}` modules, where the former has sources and the latter depends on the former. The two modules for a type share many properties, rather than duplicating these, we merge modules, such that each type only has a `crtbegin_${type}` module. Test: Treehugger Change-Id: I7803ea0e97d660f620c334b6bfdfac22cb6e36d7 --- libc/Android.bp | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/libc/Android.bp b/libc/Android.bp index df8871a22..f5f9507e2 100644 --- a/libc/Android.bp +++ b/libc/Android.bp @@ -2112,23 +2112,12 @@ cc_object { } cc_object { - name: "crtbegin_so1", + name: "crtbegin_so", local_include_dirs: ["include"], srcs: ["arch-common/bionic/crtbegin_so.c"], - defaults: ["crt_so_defaults"], - - bazel_module: { - bp2build_available: true, - }, -} - -cc_object { - name: "crtbegin_so", - defaults: ["crt_so_defaults"], objs: [ - "crtbegin_so1", "crtbrand", ], @@ -2146,24 +2135,15 @@ cc_object { } cc_object { - name: "crtbegin_static1", + name: "crtbegin_static", + local_include_dirs: [ "include", "bionic", // crtbegin.c includes bionic/libc_init_common.h ], + srcs: ["arch-common/bionic/crtbegin.c"], - defaults: ["crt_defaults"], - // When using libc.a, we're using the latest library regardless of target API level. - min_sdk_version: "current", - - bazel_module: { bp2build_available: true }, -} - -cc_object { - name: "crtbegin_static", - objs: [ - "crtbegin_static1", "crtbrand", ], defaults: ["crt_defaults"], @@ -2174,22 +2154,14 @@ cc_object { } cc_object { - name: "crtbegin_dynamic1", + name: "crtbegin_dynamic", + local_include_dirs: [ "include", "bionic", // crtbegin.c includes bionic/libc_init_common.h ], srcs: ["arch-common/bionic/crtbegin.c"], - defaults: ["crt_defaults"], - - bazel_module: { bp2build_available: true }, -} - -cc_object { - name: "crtbegin_dynamic", - objs: [ - "crtbegin_dynamic1", "crtbrand", ], target: {