Commit graph

116 commits

Author SHA1 Message Date
Jiyong Park
185d41e84d Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
It is a list of <module_name>:<manifest_name> pairs. When the module
name of an APK or an APEX matches with <module_name>, then its app
manifest name is overridden to <manifest_name>.

<module_name> and <manifest_name> can be patterns as in
com.android.%:com.mycompany.android.%.release

Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for
1) an APK in Android.mk
2) an APK in ANdroid.bp
3) an APEX
and check that manifest names are modified as specified

Change-Id: Ic09e059ea7b7ea99a50a1cf423a25aa587ef4466
2019-01-09 21:08:10 +09:00
Colin Cross
8e0ff1c370 Add a flag to allow unbundled builds to build SDKs from source
Mainline modules are tightly coupled to the platform, and should
build against the current SDK from source and not prebuilts. Add
a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a
TARGET_BUILD_APPS build should build the current SDK instead of
using the prebuilts.

Bug: 121194841
Bug: 121231426
Test: no change to out/build-aosp_sailfish.ninja
Test: forrest unbundled build
Test: forrest master apps build
Test: forrest mainline modules build
Change-Id: I9ebc08745409a817d831817cb282aba1de6d81bb
2018-12-18 22:43:16 -08:00
Colin Cross
6db5b0ea9a Move dexpreopting to Soong
Move the dexpreopting logic into Soong.  Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module.  Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.

This relands I59b20c931ee3e5a8d35eb30da4148691c5095502,
I39d580999947ee54cfefe875b57a028be5333bd7,
Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and
Ica006a007d112c232311435aaac0c0e476232b67, with a minor
update to match the changes made to dexpreopt_gen arguments
and a fix to correctly keep dexpreopt disabled on mac builds.

Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
      only expected changes to dexpreopt outputs on system_other
      (.vdex files for privileged Soong modules no longer incorrectly
      contain .dex contents).
Change-Id: I25163e91886cea6941afa25cdb529ed053278dcb
2018-12-17 13:46:17 -08:00
Colin Cross
b8901d7fb8 Revert "Move dexpreopting to Soong"
This reverts commit e736c58043.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Colin Cross
e736c58043 Move dexpreopting to Soong
Move the dexpreopting logic into Soong.  Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module.  Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.

Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
      only expected changes to dexpreopt outputs on system_other
      (.vdex files for privileged Soong modules no longer incorrectly
      contain .dex contents).
Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502
2018-12-12 17:21:22 -08:00
Anton Hansson
b91e0c5ab1 Remove USE_HWC2 plumbing and settings
Last use removed in Ibefde5feaeaec8fb68cbc6ea1c019bf8b5e608bb

Test: make
Change-Id: I0567347379b1d030ed2f8dba7babc1f22be5dac4
2018-11-29 10:08:07 +00:00
Ivan Lozano
fda9a6f38e Add support for AArch64 XOM binaries.
Adds build system support for generating AArch64 binaries with
execute-only memory layouts via a new LOCAL_XOM property. Also adds
support for an ENABLE_XOM build flag for global builds.

Bug: 77958880
Test: make -j ENABLE_XOM=true
Change-Id: I6af9e3615d0a9fdff802eae50e6ad94311ec8046
2018-11-21 09:05:08 -08:00
Jiyong Park
5217eed7a3 Add TARGET_FLATTEN_APEX
TARGET_FLATTEN_APEX, when set to true, flattens APEXes that are on
/system. Flattening an APEX means files in it are not packaged as a mini
file system image, but exist in the /system partition as individual
files. This option is for devices where kernel does not support loopback
devices or the maximum number of loopback devices is too small (though
the threshold is TBD as of now).

Bug: 118485880
Test: TARGET_FLATTEN_APEX=true m apex.test; tree
out/target/product/.../system/apex/apex.test shows list of files in it.

Test; m apex.test, then a file out/target/product/.../system/apex/apex
.test.apex exists.

Change-Id: Ie13cb062c1387d55689692ba2b123e606ada8aa4
2018-11-14 07:53:23 +09:00
Colin Cross
ee8b10230c Factor out json from soong_config.mk
Factor out the json functions from soong_config.mk, and extend them
to support maps.

Bug: 119412419
Test: no change to soong.variables
Change-Id: Ieea08fdd2aa202f60945103e3ca82538f098a942
2018-11-12 11:15:12 -08:00
Colin Cross
3aa2f8f69b Pass privileged dexpreopt module configuration to Soong
Pass DONT_UNCOMPRESS_PRIV_APPS_DEXS, PRODUCT_LOADED_BY_PRIVILEGED_MODULES,
DEX_PREOPT_DEFAULT, and WITH_DEXPREOPT to Soong so it can determine when
to store uncompressed dex files in APKs and when to strip them.

Also convert DEXPREOPT.$(TARGET_PRODUCT).$(LOCAL_MODULE).CONFIG=disabled
to a DEXPREOPT_DISABLED_MODULES list, and export it to Soong.

Test: m checkbuild
Change-Id: I8652032d4b9f5d2e119e73acdf91b8148563eedd
2018-10-23 22:33:07 -07:00
Dan Willemsen
2eea59973b Remove USE_CLANG_LLD[=false]
Test: treehugger
Change-Id: I6dd632e9501f82b22f3f0c084039808e37b37742
2018-10-21 19:55:40 -07:00
Dan Willemsen
3e8eb377db Stop passing DIST_DIR to Soong
Test: m dist
Change-Id: I812606595703299f5e333d4e62bc1abeaad15c05
2018-10-20 21:37:44 -07:00
Colin Cross
d0f3a3b01a Pass TARGET_PREFER_32_BIT_APPS to Soong
Bug: 80095087
Test: m checkbuild
Change-Id: I1ca8bebb360dd1e8102bb5840709f79cc22be03c
2018-10-01 15:31:54 -07:00
Dario Freni
5f9ddc95a2 Merge "Add support for /product-services partition"
am: 3cf03b775a

Change-Id: I1b0b3628d1b96967e569093b93b12fbc5acd7ad5
2018-07-20 02:09:37 -07:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Ari Hausman-Cohen
eb5fccc98c Merge "Add PRODUCT_IOT support to soong."
am: 0d2436e372

Change-Id: I86fc1b9d5b92c713f93bb0efbfd0a6f556d8e9e4
2018-06-28 13:25:09 -07:00
Ari Hausman-Cohen
271d861ab5 Add PRODUCT_IOT support to soong.
Some code needs to behave differently for Android Things
systems. PRODUCT_IOT tracks Android Things products.
This change exposes this variable into the soong system.

Bug: 110494430
Test: aosp_angler builds
Change-Id: Id9c27e4fe70957f217cfbdc019e8a37532bafac2
2018-06-27 16:52:51 -07:00
Chih-hung Hsieh
378da0f328 Merge "Third try to enable clang lld as default linker."
am: 504656816d

Change-Id: I5a1cf295ec14a0c21d88225fc8ef83b0424fb8ec
2018-06-13 11:32:14 -07:00
Chih-Hung Hsieh
4ad173788e Third try to enable clang lld as default linker.
Note of existing configurations:
  * When lld is used, llvm-strip and llvm-objcopy are also used.
  * darwin host modules do not use lld.
  * lld can be disabled locally with use_clang_lld:false in Android.bp
    or LOCAL_USE_CLANG_LLD:=false in Android.mk.

Bug: 73768157
Test: make checkbuild, boot and run bionic and system/core native tests
Change-Id: I3067ff8021dd6e1598f2447b80aea66a3f7e1677
2018-06-12 10:50:10 -07:00
Tri Vo
b9b2f0860c Merge "Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs" am: 33c3d7c1aa
am: fb1e426c78

Change-Id: I53b950a0e2a8b8a958c379dbd4ca17d509d154b8
2018-05-22 16:06:49 -07:00
Tri Vo
494830879c Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs
After https://android-review.googlesource.com/688488
BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR can now specify multiple
directories.

Bug: n/a
Test: build sepolicy

Change-Id: Id850327c29bc626d3d721935edcb2b7afd2fd283
2018-05-22 09:24:10 -07:00
Treehugger Robot
8f5535fd93 Merge "Pass PLATFORM_VERSION to Soong" 2018-05-10 00:54:13 +00:00
Elliott Hughes
f29014c082 Merge "Revert "Revert "Revert "Set global default to use lld."""" am: 0f8056b254
am: f25dd76703

Change-Id: I8da835d8b13d4e5ec9f93c6b253dbfa997334f12
2018-05-09 17:05:39 -07:00
Elliott Hughes
0f8056b254 Merge "Revert "Revert "Revert "Set global default to use lld."""" 2018-05-09 23:46:16 +00:00
Colin Cross
0fdbb4c910 Pass PLATFORM_VERSION to Soong
Soong needs PLATFORM_VERSION to pass as --version-name when building
framework-res.apk.

Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk  | grep -i version
Change-Id: If47839182a1dd7c7a768b1253dd8b575d777ca7e
Merged-In: If47839182a1dd7c7a768b1253dd8b575d777ca7e
(cherry picked from commit 34aba6cf72)
2018-05-09 23:44:18 +00:00
Colin Cross
39599c9ddf Merge "Pass PLATFORM_VERSION to Soong" into pi-dev
am: 96ec5a58ae

Change-Id: I2824263efd0abeed92b8381fe43607b938edd5ce
2018-05-09 14:40:23 -07:00
Elliott Hughes
876a36e8ac Revert "Revert "Revert "Set global default to use lld."""
This reverts commit da8febf39c.

Bug: http://b/73768157
Reason for revert: breaks several bionic/debuggerd/libunwind_stack gtests

Change-Id: I161cf85cf352b80644524fd4bb70ff7c75fbc1d0
2018-05-09 20:33:25 +00:00
Colin Cross
34aba6cf72 Pass PLATFORM_VERSION to Soong
Soong needs PLATFORM_VERSION to pass as --version-name when building
framework-res.apk.

Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk  | grep -i version
Change-Id: If47839182a1dd7c7a768b1253dd8b575d777ca7e
2018-05-09 11:10:15 -07:00
Tri Vo
dab6055646 Merge "Expose selinux variables to Soong." am: d744f8cc8e
am: 570ea0cc8a

Change-Id: Id9d04262afcd7f48c1e1ba248a703d7fd2c48bff
2018-05-08 19:15:26 -07:00
Tri Vo
d744f8cc8e Merge "Expose selinux variables to Soong." 2018-05-09 01:57:14 +00:00
Chih-hung Hsieh
02bbb59dc8 Merge "Revert "Revert "Set global default to use lld.""" am: 44f320c29e
am: 3b0208b7ba

Change-Id: I33e9cd9621c1a471ebb58e383c4098fca2f80272
2018-05-08 16:13:02 -07:00
Chih-hung Hsieh
da8febf39c Revert "Revert "Set global default to use lld.""
This reverts commit 44988be862.

Three known build failures with lld are fixed by
(1) adding --no-fatal-warnings to link
(2) disable LLD for some PGO build targets
(3) disable LLD for some art oatdump tests, pending c/681542

Change-Id: Icebf6661509bf4f6051f91dc74eaa07dbc7c1d42
2018-05-08 20:13:41 +00:00
android-build-prod (mdb)
5fe128653f Merge "Revert "Set global default to use lld."" am: ec87c9f56e
am: 27976638b5

Change-Id: I847bccebac49cb293fb5fe05d63315528ff95606
2018-05-08 08:54:56 -07:00
Nicolas Geoffray
44988be862 Revert "Set global default to use lld."
Bug: 73768157

Some errors with HOST_PREFER_32_BIT:
HOST_PREFER_32_BIT=true m -j32 test-art-host-gtest

This reverts commit 962424149d.

Change-Id: I788ec3e39d6989d583d3c7d4706299fe5a7841f2
2018-05-08 12:37:34 +00:00
Chih-hung Hsieh
c9a39c7beb Merge "Set global default to use lld." am: 1defe63536
am: 3df942176b

Change-Id: I212cd5e5843aadbfdcc04cc87f76a4bfe29f5bb0
2018-05-07 15:50:29 -07:00
Chih-Hung Hsieh
962424149d Set global default to use lld.
* Use clang lld by default, unless LOCAL_USE_CLANG_LLD
  or USE_CLANG_LLD is set to false or 0.

Bug: 73768157
Test: make checkbuild and boot
Change-Id: I9b28550a0626c96f6e025b0f20705a2e4a5049d7
2018-05-07 09:27:49 -07:00
Tri Vo
82d1c88717 Expose selinux variables to Soong.
Bug: 33691272
Test: manual
Change-Id: I734b96be16279716208bbc0afb78b8f4555deffb
2018-04-30 11:04:24 -07:00
Colin Cross
7fce53dfcb Merge "Pass PLATFORM_VERSION_CODENAME to Soong" am: 7c84a01daf
am: 733057f12f

Change-Id: Idd0a1b706c992949d9425b016799b133150f836f
2018-04-18 15:35:06 -07:00
Colin Cross
c051048ba7 Pass PLATFORM_VERSION_CODENAME to Soong
Pass PLATFORM_VERSION_CODENAME as Platform_sdk_codename, and
set Platform_sdk_final if PLATFORM_VERSION_CODENAME is REL.

Bug: 78224641
Test: m checkbuild
Change-Id: Ic082ca756d877ba51f45e89aa2ac267781a8d854
Merged-In: Ic082ca756d877ba51f45e89aa2ac267781a8d854
(cherry picked from commit f6d3fff907)
2018-04-18 12:42:46 -07:00
Colin Cross
f6d3fff907 Pass PLATFORM_VERSION_CODENAME to Soong
Pass PLATFORM_VERSION_CODENAME as Platform_sdk_codename, and
set Platform_sdk_final if PLATFORM_VERSION_CODENAME is REL.

Bug: 78224641
Test: m checkbuild
Change-Id: Ic082ca756d877ba51f45e89aa2ac267781a8d854
2018-04-18 12:40:16 -07:00
Chih-hung Hsieh
4991178be2 Merge "Add USE_CLANG_LLD and LOCAL_USE_CLANG_LLD" am: a72e1518e7
am: db18e11b86

Change-Id: I7f8fafc80a9be06fad05f801edad4510be2ed3f8
2018-04-13 12:44:10 -07:00
Chih-Hung Hsieh
32427d6903 Add USE_CLANG_LLD and LOCAL_USE_CLANG_LLD
* Current default is not using lld.
* When USE_CLANG_LLD or LOCAL_USE_CLANG_LLD is true or 1,
  * Use *GLOBAL_LLDFLAGS instead of *GLOBAL_LDFLAGS.
    GLOBAL_LLDFLAGS should call lld and with correct lld flags.
  * set my_pack_module_relocations to false.

Bug: 73768157
Test: make checkbuild
Change-Id: I3e63cf8ae0865d01d2bc1f36e9304f4a5d092cb8
2018-04-12 11:00:06 -07:00
Dan Willemsen
79657520ee Add variables for configuring Soong plugins
See the Soong commit for detailed usage.

Bug: 76168832
Test: define some variables, use them
Change-Id: Ia8af5b6ec1cb3f12cbc1fee582a309eebb340b7c
Merged-In: Ia8af5b6ec1cb3f12cbc1fee582a309eebb340b7c
(cherry picked from commit eaacf5b285)
2018-04-11 15:31:35 -07:00
Dan Willemsen
fb3eeea64a Merge "Add variables for configuring Soong plugins" am: de61b23ffc
am: 3ae1f7af36

Change-Id: I5abe5931423d25a8314914bc81ba2a38a3439a94
2018-04-10 18:58:05 -07:00
Dan Willemsen
eaacf5b285 Add variables for configuring Soong plugins
See the Soong commit for detailed usage.

Bug: 76168832
Test: define some variables, use them
Change-Id: Ia8af5b6ec1cb3f12cbc1fee582a309eebb340b7c
2018-04-10 15:51:53 -07:00
Rajeev Kumar
9d6905a78c Merge "Set Use_lmkd_stats_log if TARGET_LMKD_STATS_LOG is true" into pi-dev
am: 45d11bbedc

Change-Id: I2b70913b441b807bf99dfdcb4f4abaffa3232cd3
2018-03-26 23:33:40 +00:00
Rajeev Kumar
2052eb5e4f Set Use_lmkd_stats_log if TARGET_LMKD_STATS_LOG is true
Bug: 74443701
Test: Tested manually
Merged-In: I409e8b5be05b3cf060069fe0063ea9a60ef6bf27
Change-Id: I409e8b5be05b3cf060069fe0063ea9a60ef6bf27
(cherry picked from commit a331864e72)
2018-03-23 19:45:32 +00:00
Dan Willemsen
043098087d Merge "Remove obsolete BRILLO variable" am: a0c1cc97bd
am: 55a5475ec2

Change-Id: I3cb12da7a6c9a86e9d7d1d9f77481b5cc2030d73
2018-03-12 22:04:05 +00:00
Dan Willemsen
19bd9b99ce Remove obsolete BRILLO variable
Test: none
Change-Id: Ia4474927709ccfa1ff76f5dda1d8aa13ef9d1004
2018-03-10 15:23:12 -08:00
Nan Zhang
08dc62dd09 Merge "Export Make config vars to Soong to support Droiddoc" am: 5d7ec6bdf8 am: 7edfe29e8f
am: b335c4a4f3

Change-Id: I9ebf18cf05571c4d5cf31c41fb5f60114a375480
2018-02-22 23:25:08 +00:00