summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apex/Android.bp15
-rw-r--r--benchmarks/Android.bp16
-rw-r--r--benchmarks/linker_relocation/Android.bp4
-rw-r--r--benchmarks/linker_relocation/gen/Android.bp4
-rw-r--r--benchmarks/spawn/Android.bp4
-rw-r--r--libc/Android.bp20
-rw-r--r--libc/async_safe/Android.bp9
-rw-r--r--libc/malloc_debug/Android.bp10
-rw-r--r--libc/malloc_hooks/Android.bp9
-rw-r--r--libc/system_properties/Android.bp10
-rw-r--r--libc/tools/Android.bp10
-rw-r--r--libdl/Android.bp15
-rw-r--r--libfdtrack/Android.bp15
-rw-r--r--libm/Android.bp18
-rw-r--r--linker/Android.bp15
-rw-r--r--tests/Android.bp16
-rw-r--r--tests/headers/Android.bp4
-rw-r--r--tests/headers/posix/Android.bp4
-rw-r--r--tests/libs/Android.bp4
-rw-r--r--tests/libs/Android.build.dlext_testzip.mk7
-rw-r--r--tests/make_fortify_compile_test.mk3
-rw-r--r--tools/Android.bp15
-rw-r--r--tools/versioner/Android.bp4
-rw-r--r--tools/versioner/src/Android.bp4
24 files changed, 234 insertions, 1 deletions
diff --git a/apex/Android.bp b/apex/Android.bp
index e0a87534c..90a14b245 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -3,6 +3,21 @@
// In Q this contained Bionic, ART and Libcore.
// It keeps the name /apex/com.android.runtime for app compat reasons.
+package {
+ default_applicable_licenses: ["bionic_apex_license"],
+}
+
+license {
+ name: "bionic_apex_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
android_app_certificate {
name: "com.android.runtime.certificate",
certificate: "com.android.runtime",
diff --git a/benchmarks/Android.bp b/benchmarks/Android.bp
index 61084a1f7..5dfc38f5c 100644
--- a/benchmarks/Android.bp
+++ b/benchmarks/Android.bp
@@ -14,6 +14,22 @@
// limitations under the License.
//
+package {
+ default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
+license {
+ name: "bionic_benchmarks_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
cc_defaults {
name: "bionic-benchmarks-defaults",
cflags: [
diff --git a/benchmarks/linker_relocation/Android.bp b/benchmarks/linker_relocation/Android.bp
index f8ef9e046..b41d0933e 100644
--- a/benchmarks/linker_relocation/Android.bp
+++ b/benchmarks/linker_relocation/Android.bp
@@ -24,6 +24,10 @@
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
+package {
+ default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
cc_library_headers {
name: "linker_reloc_bench_headers",
defaults: ["bionic_spawn_benchmark_targets"],
diff --git a/benchmarks/linker_relocation/gen/Android.bp b/benchmarks/linker_relocation/gen/Android.bp
index e535e5396..c8f0b4a00 100644
--- a/benchmarks/linker_relocation/gen/Android.bp
+++ b/benchmarks/linker_relocation/gen/Android.bp
@@ -1,4 +1,8 @@
// AUTO-GENERATED BY gen_bench.py -- do not edit
+package {
+ default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
cc_defaults {
name: "linker_reloc_bench_all_libs",
runtime_libs: [
diff --git a/benchmarks/spawn/Android.bp b/benchmarks/spawn/Android.bp
index 689e7c924..89d22e3f7 100644
--- a/benchmarks/spawn/Android.bp
+++ b/benchmarks/spawn/Android.bp
@@ -26,6 +26,10 @@
// SUCH DAMAGE.
//
+package {
+ default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
cc_defaults {
name: "bionic_spawn_benchmark_targets",
host_supported: true,
diff --git a/libc/Android.bp b/libc/Android.bp
index 4d44bf3fc..736c14767 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1,5 +1,25 @@
// Define the common source files for all the libc instances
// =========================================================
+package {
+ default_applicable_licenses: ["bionic_libc_license"],
+}
+
+license {
+ name: "bionic_libc_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-ISC",
+ "SPDX-license-identifier-MIT",
+ "legacy_notice",
+ "legacy_unencumbered",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
libc_common_src_files = [
"async_safe/async_safe_log.cpp",
"bionic/ether_aton.c",
diff --git a/libc/async_safe/Android.bp b/libc/async_safe/Android.bp
index 222d9f6d1..aed28d0f9 100644
--- a/libc/async_safe/Android.bp
+++ b/libc/async_safe/Android.bp
@@ -1,6 +1,15 @@
// ========================================================
// libasync_safe.a
// ========================================================
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "bionic_libc_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["bionic_libc_license"],
+}
+
cc_library_static {
defaults: ["libc_defaults"],
srcs: [
diff --git a/libc/malloc_debug/Android.bp b/libc/malloc_debug/Android.bp
index 760039b9c..3b3a22ee7 100644
--- a/libc/malloc_debug/Android.bp
+++ b/libc/malloc_debug/Android.bp
@@ -2,6 +2,16 @@
// libc_malloc_debug_backtrace.a
// ==============================================================
// Used by libmemunreachable
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "bionic_libc_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["bionic_libc_license"],
+}
+
cc_library_static {
name: "libc_malloc_debug_backtrace",
vendor_available: true,
diff --git a/libc/malloc_hooks/Android.bp b/libc/malloc_hooks/Android.bp
index 487f3fb24..01394da6e 100644
--- a/libc/malloc_hooks/Android.bp
+++ b/libc/malloc_hooks/Android.bp
@@ -1,6 +1,15 @@
// ==============================================================
// libc_malloc_hooks.so
// ==============================================================
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "bionic_libc_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["bionic_libc_license"],
+}
+
cc_library {
name: "libc_malloc_hooks",
diff --git a/libc/system_properties/Android.bp b/libc/system_properties/Android.bp
index 384616941..361fc7925 100644
--- a/libc/system_properties/Android.bp
+++ b/libc/system_properties/Android.bp
@@ -1,3 +1,13 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "bionic_libc_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["bionic_libc_license"],
+}
+
cc_library_static {
name: "libsystemproperties",
defaults: ["libc_defaults"],
diff --git a/libc/tools/Android.bp b/libc/tools/Android.bp
index bf515ca31..0b0b24004 100644
--- a/libc/tools/Android.bp
+++ b/libc/tools/Android.bp
@@ -1,3 +1,13 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "bionic_libc_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ // legacy_unencumbered
+ default_applicable_licenses: ["bionic_libc_license"],
+}
+
filegroup {
name: "bionic-gensyscalls",
srcs: ["gensyscalls.py"]
diff --git a/libdl/Android.bp b/libdl/Android.bp
index 5c9fc9ca0..300467199 100644
--- a/libdl/Android.bp
+++ b/libdl/Android.bp
@@ -1,6 +1,21 @@
//
// libdl
//
+package {
+ default_applicable_licenses: ["bionic_libdl_license"],
+}
+
+license {
+ name: "bionic_libdl_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
cc_library_static {
name: "libdl_static",
defaults: ["linux_bionic_supported"],
diff --git a/libfdtrack/Android.bp b/libfdtrack/Android.bp
index a907d9ae0..fb28623ef 100644
--- a/libfdtrack/Android.bp
+++ b/libfdtrack/Android.bp
@@ -1,3 +1,18 @@
+package {
+ default_applicable_licenses: ["bionic_libfdtrack_license"],
+}
+
+license {
+ name: "bionic_libfdtrack_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
cc_library_shared {
name: "libfdtrack",
srcs: ["fdtrack.cpp"],
diff --git a/libm/Android.bp b/libm/Android.bp
index 723d126dc..10f794ad0 100644
--- a/libm/Android.bp
+++ b/libm/Android.bp
@@ -1,6 +1,24 @@
//
// libm.so and libm.a for target.
//
+package {
+ default_applicable_licenses: ["bionic_libm_license"],
+}
+
+license {
+ name: "bionic_libm_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-MIT",
+ "legacy_unencumbered",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
cc_library {
name: "libm",
defaults: ["linux_bionic_supported"],
diff --git a/linker/Android.bp b/linker/Android.bp
index 8b2d84254..dd376da86 100644
--- a/linker/Android.bp
+++ b/linker/Android.bp
@@ -9,6 +9,21 @@
// embedded as the entry point, and the linker is embedded as ELF sections in
// each binary. There's a linker script that sets all of that up (generated by
// extract_linker), and defines the extern symbols used in this file.
+package {
+ default_applicable_licenses: ["bionic_linker_license"],
+}
+
+license {
+ name: "bionic_linker_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
cc_object {
name: "linker_wrapper",
host_supported: true,
diff --git a/tests/Android.bp b/tests/Android.bp
index 58400187c..9b7e6f5b0 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -14,6 +14,22 @@
// limitations under the License.
//
+package {
+ default_applicable_licenses: ["bionic_tests_license"],
+}
+
+license {
+ name: "bionic_tests_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
cc_defaults {
name: "bionic_tests_defaults",
host_supported: true,
diff --git a/tests/headers/Android.bp b/tests/headers/Android.bp
index b44c29601..76e41ca8d 100644
--- a/tests/headers/Android.bp
+++ b/tests/headers/Android.bp
@@ -1 +1,5 @@
+package {
+ default_applicable_licenses: ["bionic_tests_license"],
+}
+
subdirs = ["*"]
diff --git a/tests/headers/posix/Android.bp b/tests/headers/posix/Android.bp
index 8f3a2f29b..0809cdbae 100644
--- a/tests/headers/posix/Android.bp
+++ b/tests/headers/posix/Android.bp
@@ -14,6 +14,10 @@
// limitations under the License.
//
+package {
+ default_applicable_licenses: ["bionic_tests_license"],
+}
+
cc_library_static {
name: "libbionic_tests_headers_posix",
srcs: ["*.c"],
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index ba1c1989b..fabcd048e 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -14,6 +14,10 @@
// limitations under the License.
//
+package {
+ default_applicable_licenses: ["bionic_tests_license"],
+}
+
cc_defaults {
name: "bionic_testlib_defaults",
host_supported: true,
diff --git a/tests/libs/Android.build.dlext_testzip.mk b/tests/libs/Android.build.dlext_testzip.mk
index 8775c2958..66ed343d9 100644
--- a/tests/libs/Android.build.dlext_testzip.mk
+++ b/tests/libs/Android.build.dlext_testzip.mk
@@ -24,6 +24,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := NATIVE_TESTS
LOCAL_MODULE := libdlext_test_zip_zipaligned
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_MODULE_SUFFIX := .zip
LOCAL_MODULE_PATH := $($(bionic_2nd_arch_prefix)TARGET_OUT_DATA_NATIVE_TESTS)/bionic-loader-test-libs/libdlext_test_zip
LOCAL_2ND_ARCH_VAR_PREFIX := $(bionic_2nd_arch_prefix)
@@ -49,6 +52,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := NATIVE_TESTS
LOCAL_MODULE := libdlext_test_runpath_zip_zipaligned
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_MODULE_SUFFIX := .zip
LOCAL_MODULE_PATH := $($(bionic_2nd_arch_prefix)TARGET_OUT_DATA_NATIVE_TESTS)/bionic-loader-test-libs/libdlext_test_runpath_zip
LOCAL_2ND_ARCH_VAR_PREFIX := $(bionic_2nd_arch_prefix)
@@ -94,4 +100,3 @@ $(LOCAL_BUILT_MODULE) : $(lib_d) $(lib_a) $(lib_b) $(lib_c) $(lib_x) $(lib_y) $(
$(hide) touch $(dir $@)/zipdir/empty_file.txt
$(hide) (cd $(dir $@)/zipdir && zip -qrD0 ../$(notdir $@).unaligned .)
$(hide) $(BIONIC_TESTS_ZIPALIGN) 4096 $@.unaligned $@
-
diff --git a/tests/make_fortify_compile_test.mk b/tests/make_fortify_compile_test.mk
index c36dfddc2..ec0ba45a0 100644
--- a/tests/make_fortify_compile_test.mk
+++ b/tests/make_fortify_compile_test.mk
@@ -9,6 +9,9 @@ LOCAL_CXX := $(LOCAL_PATH)/touch-obj-on-success \
LOCAL_CLANG := true
LOCAL_MODULE := bionic-compile-time-tests$(FORTIFY_LEVEL)-clang++
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
LOCAL_TIDY := false
LOCAL_CPPFLAGS := -Wall -Wno-error
LOCAL_CPPFLAGS += -fno-color-diagnostics -ferror-limit=10000 -Xclang -verify
diff --git a/tools/Android.bp b/tools/Android.bp
index dfeea19a6..5a54fe451 100644
--- a/tools/Android.bp
+++ b/tools/Android.bp
@@ -1,3 +1,18 @@
+package {
+ default_applicable_licenses: ["bionic_tools_license"],
+}
+
+license {
+ name: "bionic_tools_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
subdirs = ["*"]
filegroup {
diff --git a/tools/versioner/Android.bp b/tools/versioner/Android.bp
index 061709a91..cc4dbfa55 100644
--- a/tools/versioner/Android.bp
+++ b/tools/versioner/Android.bp
@@ -1,3 +1,7 @@
+package {
+ default_applicable_licenses: ["bionic_tools_license"],
+}
+
subdirs = [
"src",
]
diff --git a/tools/versioner/src/Android.bp b/tools/versioner/src/Android.bp
index a78ab5dd4..0173c414c 100644
--- a/tools/versioner/src/Android.bp
+++ b/tools/versioner/src/Android.bp
@@ -1,3 +1,7 @@
+package {
+ default_applicable_licenses: ["bionic_tools_license"],
+}
+
cc_binary_host {
name: "versioner",