2021-02-04 03:08:28 +01:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
}
|
|
|
|
|
2020-06-01 19:45:49 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-cc",
|
|
|
|
pkgPath: "android/soong/cc",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
"blueprint-pathtools",
|
|
|
|
"soong",
|
2023-04-28 17:21:25 +02:00
|
|
|
"soong-aidl-library",
|
2020-06-01 19:45:49 +02:00
|
|
|
"soong-android",
|
2021-03-25 10:06:03 +01:00
|
|
|
"soong-bazel",
|
2020-06-01 19:45:49 +02:00
|
|
|
"soong-cc-config",
|
|
|
|
"soong-etc",
|
2021-07-22 21:05:08 +02:00
|
|
|
"soong-fuzz",
|
2020-06-01 19:45:49 +02:00
|
|
|
"soong-genrule",
|
2022-04-27 03:30:34 +02:00
|
|
|
"soong-multitree",
|
2021-07-07 05:42:39 +02:00
|
|
|
"soong-snapshot",
|
2023-09-29 17:22:52 +02:00
|
|
|
"soong-sysprop-bp2build",
|
2020-06-01 19:45:49 +02:00
|
|
|
"soong-tradefed",
|
|
|
|
],
|
|
|
|
srcs: [
|
2021-12-09 11:06:29 +01:00
|
|
|
"afdo.go",
|
2023-03-10 04:07:19 +01:00
|
|
|
"fdo_profile.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"androidmk.go",
|
Replace stringly-typed API levels.
Handling of API levels within Soong is currently fairly difficult
since it isn't always clear based on context what kind of API level a
given string represents, how much canonicalizing and error checking
the code receiving the string are expected to do, or how those errors
should be treated.
The API level struct does not export its raw data, so as to keep its
"constructor" private to the android package, and to prevent misuse of
the `number` field, which is only an implementation detail for preview
API levels. API levels can be parsed with either
`android.ApiLevelFromUser`, which returns any errors to the caller, or
`android.ApiLevelOrPanic`, which is used in the case where the input
is trusted and any errors in parsing should panic. Even within the
`android` package, these APIs should be preferred over direct
construction.
For cases where there are context specific parsing requirements, such
as handling the "minimum" alias in the cc module,
`nativeApiLevelFromUser` and `nativeApiLevelOrPanic` should be used
instead.
Test: treehugger
Bug: http://b/154667674
Change-Id: Id52921fda32cb437fb1775ac2183299dedc0cf20
2020-07-06 23:49:35 +02:00
|
|
|
"api_level.go",
|
Add os/target configurable selects for label list attributes.
This CL is pretty large, so I recommend starting with reading the newly
added tests for the expected behavior.
This change works in conjunction with the linked CLs in the Gerrit topic.
Those CLs add support for new platform() definitions for OS targets
specified in Soong's arch.go, which are configurable through
Android.bp's `target {}` property. It works similary to previous CLs
adding support for the `arch {}` property.
These configurable props are keyed by the OS: android, linux_bionic,
windows, and so on. They map to `select` statements in label list
attributes, which this CL enables for cc_library_headers' header_libs
and export_header_lib_headers props.
This enables //bionic/libc:libc_headers to be generated correctly, from:
cc_library_headers {
name: "libc_headers",
target: {
android: {
header_libs: ["libc_headers_arch"],
export_header_lib_headers: ["libc_headers_arch"],
},
linux_bionic: {
header_libs: ["libc_headers_arch"],
export_header_lib_headers: ["libc_headers_arch"],
},
},
// omitted props
}
to:
cc_library_headers(
name = "libc_headers",
deps = [] + select({
"//build/bazel/platforms/os:android": [
":libc_headers_arch",
],
"//build/bazel/platforms/os:linux_bionic": [
":libc_headers_arch",
],
"//conditions:default": [],
}),
)
Test: TH
Test: Verify generated //bionic/libc:libc_headers
Fixes: 183597786
Change-Id: I01016cc2cc9a71449f02300d747f01decebf3f6e
2021-03-24 07:18:33 +01:00
|
|
|
"bp2build.go",
|
2021-12-09 11:06:29 +01:00
|
|
|
"builder.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"cc.go",
|
|
|
|
"ccdeps.go",
|
|
|
|
"check.go",
|
|
|
|
"coverage.go",
|
|
|
|
"gen.go",
|
2023-07-19 01:58:16 +02:00
|
|
|
"generated_cc_library.go",
|
2020-08-04 02:24:04 +02:00
|
|
|
"image.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"linkable.go",
|
|
|
|
"lto.go",
|
|
|
|
"makevars.go",
|
2023-07-18 23:01:11 +02:00
|
|
|
"orderfile.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"pgo.go",
|
|
|
|
"prebuilt.go",
|
|
|
|
"proto.go",
|
|
|
|
"rs.go",
|
|
|
|
"sanitize.go",
|
|
|
|
"sabi.go",
|
|
|
|
"sdk.go",
|
2020-12-02 05:14:28 +01:00
|
|
|
"snapshot_prebuilt.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"snapshot_utils.go",
|
|
|
|
"stl.go",
|
|
|
|
"strip.go",
|
|
|
|
"tidy.go",
|
|
|
|
"util.go",
|
|
|
|
"vendor_snapshot.go",
|
|
|
|
"vndk.go",
|
|
|
|
"vndk_prebuilt.go",
|
|
|
|
|
|
|
|
"cmakelists.go",
|
|
|
|
"compdb.go",
|
|
|
|
"compiler.go",
|
|
|
|
"installer.go",
|
|
|
|
"linker.go",
|
|
|
|
|
|
|
|
"binary.go",
|
|
|
|
"binary_sdk_member.go",
|
|
|
|
"fuzz.go",
|
2021-09-06 11:28:34 +02:00
|
|
|
"image_sdk_traits.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"library.go",
|
|
|
|
"library_headers.go",
|
|
|
|
"library_sdk_member.go",
|
2022-04-27 03:30:34 +02:00
|
|
|
"library_stub.go",
|
2019-11-19 20:44:10 +01:00
|
|
|
"native_bridge_sdk_trait.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"object.go",
|
|
|
|
"test.go",
|
|
|
|
|
2020-07-30 23:32:55 +02:00
|
|
|
"ndk_abi.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"ndk_headers.go",
|
|
|
|
"ndk_library.go",
|
2020-07-30 23:32:55 +02:00
|
|
|
"ndk_prebuilt.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"ndk_sysroot.go",
|
|
|
|
|
|
|
|
"llndk_library.go",
|
|
|
|
|
|
|
|
"kernel_headers.go",
|
|
|
|
|
|
|
|
"genrule.go",
|
|
|
|
|
|
|
|
"vendor_public_library.go",
|
|
|
|
|
|
|
|
"testing.go",
|
2020-11-16 02:48:44 +01:00
|
|
|
|
|
|
|
"stub_library.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
],
|
|
|
|
testSrcs: [
|
2022-01-26 10:36:26 +01:00
|
|
|
"afdo_test.go",
|
2022-05-10 00:11:19 +02:00
|
|
|
"binary_test.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"cc_test.go",
|
|
|
|
"compiler_test.go",
|
|
|
|
"gen_test.go",
|
|
|
|
"genrule_test.go",
|
|
|
|
"library_headers_test.go",
|
2022-04-27 03:30:34 +02:00
|
|
|
"library_stub_test.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"library_test.go",
|
2022-09-16 18:39:27 +02:00
|
|
|
"lto_test.go",
|
2022-08-19 01:26:00 +02:00
|
|
|
"ndk_test.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"object_test.go",
|
2023-07-18 23:01:11 +02:00
|
|
|
"orderfile_test.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"prebuilt_test.go",
|
|
|
|
"proto_test.go",
|
2021-05-13 02:27:32 +02:00
|
|
|
"sanitize_test.go",
|
2022-08-19 01:26:00 +02:00
|
|
|
"sdk_test.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
"test_data_test.go",
|
2022-04-21 00:48:41 +02:00
|
|
|
"tidy_test.go",
|
2021-04-23 23:04:33 +02:00
|
|
|
"vendor_public_library_test.go",
|
2021-01-09 01:40:12 +01:00
|
|
|
"vendor_snapshot_test.go",
|
2020-06-01 19:45:49 +02:00
|
|
|
],
|
|
|
|
pluginFor: ["soong_build"],
|
|
|
|
}
|