diff options
author | 2024-10-02 14:22:59 +0100 | |
---|---|---|
committer | 2024-10-02 14:22:59 +0100 | |
commit | 21b18905fc65b0d0811a6c527e53297e05a0f5f3 (patch) | |
tree | b9e497bacafc7d135267eb87721dfc9001d4c0d0 | |
parent | eb1a8bda108fd1577dd713a51b228063369c060c (diff) |
ANDROID: Android.bp: Introduce libfdt_baremetal
Add dedicated library for use in baremetal environments and keep
"libfdt" for userspace targets (e.g. Android or host) so that they don't
have to share the same library configurations (e.g. apex_available or
lto:never) when not necessary.
Test: m
Change-Id: I7beda90227b37a5ad6bc0f76515c4aeddfc17bb7
-rw-r--r-- | libfdt/Android.bp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libfdt/Android.bp b/libfdt/Android.bp index c30bfa5..5ed62df 100644 --- a/libfdt/Android.bp +++ b/libfdt/Android.bp @@ -4,9 +4,8 @@ package { default_applicable_licenses: ["external_dtc_libfdt_license"], } -cc_library { - name: "libfdt", - host_supported: true, +cc_defaults { + name: "libfdt_defaults", defaults: ["dtc_cflags_defaults"], srcs: [ "fdt.c", @@ -22,11 +21,21 @@ cc_library { "acpi.c", ], export_include_dirs: ["."], +} + +cc_library { + name: "libfdt", + host_supported: true, + defaults: ["libfdt_defaults"], apex_available: [ "//apex_available:platform", "com.android.virt", ], +} +cc_library { + name: "libfdt_baremetal", + defaults: ["libfdt_defaults"], // b/336916369: This library gets linked into a rust rlib. Disable LTO // until cross-language lto is supported. lto: { |