Commit graph

755 commits

Author SHA1 Message Date
Bob Badour
42f00c7b61 Test suite notices using dependencies.
Switch from combine-notice-files to html-notice-rule and
text-notice-rule.

Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m cts reportmissinglicenses
Change-Id: I59d78553f15f0fd6be87228c933693b63e2ebf04
2022-03-23 11:18:39 -07:00
yangbill
e6b498bf2d Add data_bins to data_dependencies in module-info
This change exports the list of test_data_bins as data dependencies
that are required by modules when running the test.

Bug: 215234071
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ie5c1ef70055618a5fa0ba1bcfbcba8054743d41a
2022-02-17 05:17:03 +00:00
yangbill
fa5026c4d8 Export runtime dependencies in module-info
This change exports the list of dependencies that are required by
modules at runtime. Note that only the host case is currently
handled.

Bug: 215243373
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I05199c54da311e59c7ea87595397ee4eecfab6a3
2022-02-10 08:07:13 +00:00
yangbill
10adf32047 Add missing LOCAL_ROTATION_MIN_SDK_VERSION
This definition missing will cause merge conflict which is already in
main branch.

Bug: 215243373
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ifc103268aad9d6769822ff1eae4db1cc59aee57e
Merged-In: I3b5e9bb3985c2ae83381499a44b339a7b1deb05c
2022-02-10 08:05:06 +00:00
Colin Cross
71d9919322 Revert^2 "Reuse license metadata files from Soong"
81b167693f

Change-Id: Iff45cffb1f2b9d01cec70d96e34f46d35bb37842
2021-12-10 23:05:02 +00:00
Colin Cross
81b167693f Revert "Reuse license metadata files from Soong"
Revert "Escape Host*Variable contents"

Revert submission 1899703

Reason for revert: b/210158272
Reverted Changes:
I142c19284:Reuse license metadata files from Soong
Ife89b8f23:Add dependency license annotations
I8e7410837:Build license metadata files in Soong

Change-Id: Id9d66c01453aebe8a52eaa6628e9933a990d4c2f
2021-12-10 23:03:08 +00:00
Colin Cross
4f8dd6fe45 Reuse license metadata files from Soong
Copy the license metadata files from Soong if they've already
been built.

Bug: 207445310
Test: m checkbuild
Change-Id: I142c192843e94b018079809bd596ff81136b2de3
2021-12-03 22:47:11 +00:00
Bob Badour
879cfa867d Add macros for non-module license metadata and deps
Gets rid of .meta_module files and instead defers emitting rules until
after all the non-module targets have been processed. Allows direct
dependency on .meta_lic files, which in turn depend on license text
files.

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m reportmissinglicenses

Change-Id: I2c467feac6e13a9366ff66f924889f1dbd48c3f1
2021-11-03 00:52:25 +00:00
Colin Cross
23ee375a4a Support generating install rules in Soong
Support moving some install rules into Soong by allowing Soong to
provide a Makefile containing install rules, and by skipping parts
of base_rules.mk when Soong already created an install rule.

The install rules are exported as a Makefile instead of directly
in Soong's build.ninja file so that base_rules.mk can add dependencies
from the `required` property that are hard to resolve in Soong.

Bug: 204136549
Test: m checkbuild
Change-Id: Ife2964d76469b385e90c0c5f6adf21bd2b5e8bf6
2021-10-29 15:43:39 -07:00
Colin Cross
f4017412e2 Support per-testcase directories in all test suites
There are cases where two modules try to install the same test data
into CTS, which results in collisions when CTS puts the data for all
tests in the same directory.  Add a flag that allows enabling a
per-testcase directory for an individual test for all test suites.

Bug: 193168159
Test: cts-tradefed run commandAndExit CtsBionicTestCases
Change-Id: I4bfaaedfe0e6b8df9c75125b3e2762a4f0d5b395
2021-09-24 16:58:03 -07:00
Yuntao Xu
32a085c041 add LOCAL_DISABLE_TEST_CONFIG logic
Disable the generation of .config file when the variable
LOCAL_DISABLE_TEST_CONFIG is true.

Bug: 188927912
Test: rum 'm module-name' (`android_test_helper_app` type module)
Test: TreeHugger
Change-Id: I64372b4ba84fcf1af937abdee345ceb1d3c2f6c5
2021-05-27 10:19:48 -07:00
Liz Kammer
5b6f5a7bcc Add LOCAL_FULL_VINTF_FRAGMENTS to handle full path
Soong supports references to other modules for vintf_fragments property,
so full paths need to be passed from Soong to make rather than module
local paths.

Test: m droid
Bug: 184567830
Change-Id: Ia7f1cf977de8aeb08d41624277ff6231198222e5
2021-04-16 16:40:59 -04:00
Liz Kammer
5f2d88bee8 Merge "Add LOCAL_FULL_INIT_RC to handle init_rc full path" 2021-04-12 19:05:27 +00:00
Liz Kammer
382be36c43 Add LOCAL_FULL_INIT_RC to handle init_rc full path
Soong supports references to other modules for init_rc property, so full
paths need to be passed from Soong to make rather than module local
paths.

Test: m droid dist
Bug: 184567830
Change-Id: Ib1873a3418830f5cbf32e26f55d3ad0ab0d9c9c5
2021-04-08 11:33:46 -04:00
Stephen Hines
d49aa55cf1 Remove all unused, legacy FDO build rules
There are no current users of this feature. All remaining references are
legacy scripts that aren't actually in-use today.

https://source.corp.google.com/search?q=BUILD_FDO_INSTRUMENT%20-file:build%2F
https://source.corp.google.com/search?q=LOCAL_FDO&ct=os&sq=package:%5Eandroid$

Test: build
Change-Id: I86ff6531a0868fb8e30741f0d04de1739fba4586
2021-04-05 17:13:00 -07:00
Ulya Trafimovich
558cb6c5ac Merge <uses-library> dependency configs into dexpreopt.config files.
Since Make does not visit modules in topological order of their
<uses-library> dependencies, information from dependencies to the
dexpreopted module has to be passed via dexpreopt.config files. A build
rule for a dexpreopt.config file depends on dexpreopt.config files for
<uses-library> dependencies, and dex_preopt_config_merger.py script
extracts the necessary information from dependency configs and patches
the module's config.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Id0b71170a4d2ab1d33059de0e9ad9d7e61f2345e
2021-01-28 14:59:14 +00:00
Ulya Trafimovich
514d809b20 Add LOCAL_PROVIDES_USES_LIBRARY and use it in module dexpreopt config.
The new variable stores the name of the <uses-library>, if for some
reason it is different than the name of the module for that library
(normally they are the same, but sometimes differ). If the variable is
undefined or defined to an empty string, the name of the <uses-library>
is considered to be the same as the name of its module. It is recorded
in a module's dexpreopt.config file as "ProvidesUsesLibrary" field.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Iac1be0fac79a944e4c26867cc58e274b76709da8
2021-01-22 12:09:30 +00:00
Bob Badour
21bd34fe09 Revert^2 "Add variables for notice deps, license kinds etc."
dcfb9c5ef5

Change-Id: I6a60f55ab0e7013061a695cb1b7c5ffde29577dd
2021-01-06 20:46:49 -08:00
Jerome Gaillard
dcfb9c5ef5 Revert "Add variables for notice deps, license kinds etc."
Revert "Export soong license data to make."

Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I1f672e6e8ec48f0141bb4b6cc4eb2efed1eeef6b
2021-01-06 19:00:05 +00:00
Bob Badour
6421674a39 Add variables for notice deps, license kinds etc.
Change-Id: Ib8e538bd09044a5791083b362d807cd9293833d5
2021-01-05 08:42:48 -08:00
Dan Shi
15d3f8f697 Clear LOCAL_IS_UNIT_TEST
Bug: 172006742
Test: none
Change-Id: I15c4f5b97bea9e3562766a3fbd3a8058ce042bd4
2020-11-18 15:37:01 -08:00
Anton Hansson
351a317cd5 Remove apidiff task and droiddoc jdiff support
Nothing uses these anymore.

Bug: 158465496
Test: m
Change-Id: Iaef4f7ca7e5d21b1850d7491247f13782c9bb23a
2020-10-08 19:06:21 +01:00
Jooyung Han
b27c2e8af9 Use file_contexts for flattened apexes
Because flattened apexes are installed in /<partition>/apex, associated
file_contexts file should be modified to accommodate path changes and
also merged into target-wide file_contexts.bin file.

Soong now emits modified file_contexts via LOCAL_FILE_CONTEXTS, and
these files are collected into a temporary file_contexts.modules.tmp
file, which is used as an additional input of file_contexts.bin.

Bug: 166518492
Test: m file_contexts.bin
      check the contents of file_contexts.concat.tmp file
Change-Id: I002a2294af9e06baeaf54bc5a9a5380d23b8a3da
2020-09-23 15:43:58 +00:00
kellyhung
0ba6ec6f49 Add test_mainline_modules option support in mk
Bug: 165425972
Test: Apply aosp/1418212
      atest -b hello_world_test
      Check module-info.json for hello_world_test HelloWorldTests and
HelloWorldHostTest

Change-Id: Ie30a09a54b0ae927ca4d8d1aaba2ac0cdb15233a
2020-09-03 02:37:44 +00:00
Treehugger Robot
67c930a320 Merge "Add extra_test_configs option support in mk" 2020-08-21 16:22:42 +00:00
Dan Shi
0c9a525b98 Add extra_test_configs option support in mk
Bug: 163344047
Test: m -j HelloWorldHostTest hello_world_test HelloWorldTests
Change-Id: Ie63c2a80e01984ac9941d0bad4ad7948e0bb8ac0
2020-08-19 21:22:50 -07:00
Colin Cross
a9b9e6e5ff Merged and dist lists of unused methods from R8
Merge all the proguard_usage.zip files produced by the R8 rules and
dist the result.

Bug: 151857441
Test: m TARGET_BUILD_APPS=DocumentsUI dist
Change-Id: I7e6d73241478016093a203dc7bd86407ab86a4ac
2020-08-17 19:31:22 +00:00
Pirama Arumuga Nainar
1ac5384aaf [config_sanitizers] Fail if LOCAL_SANITIZE_BLACKLIST is used.
All uses of this property have been migrated to
LOCAL_SANITIZE_BLOCKLIST.

Update language to comply with Android’s inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Bug: 162245450

Test: Add the old property to an Android.mk and ensure error is thrown.
Change-Id: I797ff651f03b954b410f76f4d201a962ded717df
2020-08-11 11:00:53 -07:00
Treehugger Robot
bf0c1b7b77 Merge "Update language to comply with inclusive guidance" 2020-07-31 22:50:49 +00:00
Pirama Arumuga Nainar
565583382d [config_sanitizers] Support LOCAL_SANITIZE_BLOCKLIST
It'll replace LOCAL_SANITIZE_BLACKLIST.

Update language to comply with Android’s inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Bug: 162245450

Test: n/a  (no users in AOSP for this property).
Change-Id: Ie31c35af722d05011a528e1170b0c026b50fbf88
2020-07-30 15:31:22 -07:00
Liz Kammer
9dd20038b2 Update language to comply with inclusive guidance
Update android_app_set make files to use INSTALL rather than MASTER for
android_app_sets, this better matches the wording used for apex_set.

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Test: m nothing
Change-Id: I7f37a72914f4b18a839942cc3db98b1c57db921e
2020-07-28 15:59:38 -07:00
Colin Cross
d56abedb02 Merge "Dist lint reports for apps" 2020-07-16 23:06:22 +00:00
Colin Cross
b842952421 Dist lint reports for apps
Dist the transitive lint report for each unbundled app built by Soong
when lint-check is on the command line.

Bug: 153485543
Test: m TARGET_BUILD_APPS=Gallery2 lint-check dist
Change-Id: Icd2b6f884396fa5f743746099301c325ca82a324
2020-07-10 16:41:10 -07:00
Colin Cross
e926cab372 Install symbols for JNI libraries
When building an app in Soong with JNI libraries copy the unstripped
libraries to the symbols directory in directory that matches the
installed path of the APK.

Bug: 159726429
Test: forrest
Change-Id: If8e423c7cdf3afd518761b5ab6bc857321acda46
2020-07-10 13:44:21 -07:00
Jaewoong Jung
704b454ca1 Add LOCAL_APKCERTS_FILE support.
This is used when Soong and Make don't know the full output file list,
and so use a tool to generate a per-module apkcerts.txt file instead.

Fixes: 160119159
Test: m apkcerts-list
Merged-In: I48183bc8cbf9dcc521f791812734205ed3f28f4c
Change-Id: I48183bc8cbf9dcc521f791812734205ed3f28f4c
2020-07-01 10:01:16 -07:00
Sasha Smundak
b30ff0a65b Implement android_app_set module.
Bug: 152319766
Test: manual and builtin
Change-Id: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
2020-05-14 19:06:28 -07:00
Jiyong Park
403c255b6f Reland "mark platform un-availability""
This reverts commit 6e1fa4452b.

Reason for revert: relanding a reverted changed

Bug: 153073816
Change-Id: I3735866776cf6eb0320c9fb8c6be8ac0c48baa1c
Test: m
2020-05-04 11:12:00 +00:00
Jiyong Park
6e1fa4452b Revert "mark platform un-availability"
This reverts commit f9e67a8980.

Reason for revert: broke some targets

Exempt-From-Owner-Approval: reverting

Change-Id: I10af29b0fcf564dba0c3dbc1951b660b24fc58bb
2020-05-04 10:57:26 +00:00
Jiyong Park
f9e67a8980 mark platform un-availability
A module is marked unavailable for platform when 1) it does not have
"//apex_available:platform" in its apex_available property, or 2)
it depends on another module that is unavailable for platform.

In that case, LOCAL_NOT_AVAILABLE_FOR_PLATFORM is set to true for the
module in the Make world. Later, that flag is used to ensure that there
is no module with the flag is installed to the device.

The reason why this isn't entirely done in Soong is because Soong
doesn't know if a module will be installed to the device or not. To
explain this, let's have an example.

cc_test { name: "mytest", static_libs: ["libfoo"]}
cc_library_static { name: "libfoo", static_libs: ["libbar"]}
cc_library { name: "libbar", apex_available: ["com.android.xxx"]}

Here, libbar is not available for platform, but is used by libfoo which
is available for platform (apex_available defaults to
"//apex_available:platform"). libfoo is again depended on by mytest
which again is available for platform. The use of libbar should be
allowed in the context of test; we don't want to make libbar available
to platform just for the dependency from test because it will allow
non-test uses of the library as well.

Soong by itself can't tell whether libfoo and libbar are used only in the
context of a test. There could be another module depending them, e.g.,

cc_library_shared { name: "mylib", static_libs: ["libfoo"] }

can exist and it might be installed to the device, in which case
we really should trigger an error.

Since Make has the knowledge of what's installed and what's not,
the check should be done there.

Bug: 153073816
Test: m

Change-Id: I14ddf0e5700d0a7bf60e4e41536efbd26ab5ed3d
2020-04-27 08:46:41 +09:00
Dan Willemsen
efee0692d4 Obsolete unused module types
These were deprecated in R, which has now branched, and there aren't any
users on master.

Test: build-aosp_crosshatch.ninja is identical
Test: treehugger
Change-Id: I6286880e45c0facbae56f9a16e8cfcbde12f121c
2020-04-18 21:00:18 -07:00
Dan Willemsen
58634e1482 Remove AUX support
This was deprecated in R, which has now branched, and there aren't any
users on master.

Test: build-aosp_crosshatch.ninja is the same (except for the removal of the empty auxiliary target)
Test: treehugger
Change-Id: I306156ab7f91cd4a2258554b4215766c99cd12d1
2020-04-18 21:00:18 -07:00
Jaewoong Jung
95445e6913 Add signing certificate lineage file support.
Also add multi-cert support to prebuilt apps so that they can benefit
from the new lineage feature.

(This is a cherry-pick change.)

Test: m GoogleServicesFramework w/ modified build rules
Test: m PrebuiltGmsCore w/ modified build rules
Test: apksigner lineage -v --print-certs -in <built_module_path>
Fixes: 152897457
Change-Id: If7d5d4bd308629c8340231520214c76c8a568a65
Merged-In: If7d5d4bd308629c8340231520214c76c8a568a65
2020-04-06 13:42:23 -07:00
Ivan Lozano
3cd1ebeaee Remove execute-only support.
With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.

This allows us to gain the code-size improvements from
"-z noseparate-code".

Bug: 147300048
Test: Compiled binaries no longer marked XOM by default.

Change-Id: I08a054e903b202f513d3b3381afd606bb87cf257
2020-02-13 14:20:28 -05:00
Justin Yun
2bfe0a1a25 Restore "Linktype check for native:product"
Similar to native:vendor, native:product can use VNDK libs but not
vndk_private.
It is activated when PRODUCT_PRODUCT_VNDK_VERSION is set.

This restores the reverted commit
4e7e76fe5a (aosp/1197274).
The problem of the original CL was assuming no modules have both
LOCAL_PRODUCT_MODULE and LOCAL_USE_VNDK in the old implementations.
But many vendor modules in the targets without setting
PRODUCT_PRODUCT_VNDK_VERSION in old branches had both flags that
caused link failures.
To make it no-op without PRODUCT_PRODUCT_VNDK_VERSION, I defined
LOCAL_USE_VNDK_PRODUCT that is set to true if
PRODUCT_PRODUCT_VNDK_VERSION is defined and LOCAL_PRODUCT_MODULE is
true.

Bug: 146620523
Test: build with PRODUCT_PRODUCT_VNDK_VERSION := current
Change-Id: I344c7dc1c47f08706c101e486ff07c3f10aff8ac
2020-01-22 00:16:25 +00:00
Peter Collingbourne
b1d7545e1b Merge "Update make build system for dynamic unwinder." 2020-01-21 21:28:44 +00:00
Vic Yang
4873e65c8d Always check VNDK variant identicalness
Previously, we only check VNDK core and vendor variants are identical
when a VNDK library is not declared to have different variants AND the
target has TARGET_VNDK_USE_CORE_VARIANT set.  Therefore, it is fairly
easily to break a TARGET_VNDK_USE_CORE_VARIANT target as it needs to be
tested explicitly.

This change uses the new LOCAL_CHECK_SAME_VNDK_VARIANTS and expands the
check to run regardless of TARGET_VNDK_USE_CORE_VARIANT.  Also adds
support for VNDK-in-product.

Bug: 145157349
Test: Build success for targets with and without
      TARGET_VNDK_USE_CORE_VARIANT.
Test: With the corresponding change in build/make, remove libbinder
      from build/soong/cc/config/vndk.go and check build fails even
      when TARGET_VNDK_USE_CORE_VARIANT is not set.

Change-Id: Iec708b971072e6580f77a03e243b30b89b3b054d
2020-01-14 20:05:49 -08:00
Peter Collingbourne
86cdf9c2f4 Update make build system for dynamic unwinder.
Change the unwinder linking logic to match soong.

Bug: 144430859
Change-Id: I739980e479d14707b7a3afd6e9d2c817c9b43f81
2020-01-10 11:09:52 -08:00
Yifan Hong
88adfc6349 Mark BOARD_HAL_STATIC_LIBRARIES as obsolete.
No device in our tree use this obsolete thing now.
OEM devices with libhealthd should define health HAL
2.1 instead.

Test: builds
Fixes: 127677771
Change-Id: I1861452a3f7fc97ee20615c8f9f25422f9f507e2
2019-12-04 14:50:59 -08:00
Mitch Phillips
3adbcb31ea Make backend for shared library fuzzing.
Additional context (for Googlers): go/android-fuzzing-shared

This patch adds the Make support for automatically installing sanitized
dependent shared libraries. 'make $module' will find all the shared
library dependencies in soong, and create the rules to install them. We
simply need to add the <install sanitized shared library> rule that's
made by Soong as a dependency of the module's phony.

We also now change 'm fuzz' to not just build the fuzz packages, but to
build all fuzz targets into the respective
$ANDROID_PRODUCT_OUT/data/fuzz and $ANDROID_HOST_OUT/fuzz directories.

Bug: N/A
Test: Build fuzz target with shared libs, note the contents of
$ANDROID_PRODUCT_OUT/data/fuzz/lib and out/soong/fuzz-target-*.zip now
has shared libraries.

Change-Id: I74def02fee663ef788ee25ec0d5106faf474c2a6
2019-11-07 15:39:34 -08:00
Nicolas Geoffray
8567331a4f Merge "Remove support for stripping dex." 2019-10-22 09:48:06 +00:00