Commit graph

122 commits

Author SHA1 Message Date
Sasha Smundak
61ebf8df66 Provide access to product_variables.malloc_svelte.cflags inside target.
Test: soong still works.

Change-Id: I359f1e750e5961a21e3eeb9f1f3aa47974d7e99f
2018-08-31 16:59:32 -07:00
Dario Freni
fafe84fc6d Add support for /product-services partition
am: fd05a74e06

Change-Id: Ie9e3487fb3643e7276d8517c1ec87af07240585a
2018-07-20 02:09:08 -07:00
Dario Freni
fd05a74e06 Add support for /product-services partition
This is an adaptation of Icc4f8c16bc389fe20db680849f311d02df1299c3, to
support modules that are installed on the /product-services partition.

Bug: 80741439
Test: m -j both with and without enabling the new partition
Change-Id: I72b335ad38baff5848cd3da7489343f8cf98ff16
2018-07-19 14:04:30 +01:00
John Reck
6b9e67ecc0 Merge "Allow disabling LTO on eng"
am: 7f1c57ee33

Change-Id: I349e5e5856d6991fff465a77c5bd6ad938b2b575
2018-07-11 14:44:57 -07:00
John Reck
1d2b7eea6b Allow disabling LTO on eng
Test: Verified setting never to true in hwui resulted
in a fast incremental build
Bug: 111277863

Change-Id: Ic3da6f3adc2c97f0d5f287402c460907533a5f71
2018-07-11 18:24:49 +00:00
Ari Hausman-Cohen
0a246085e4 Merge "Add Product_is_iot to soong config."
am: ffc924b8f8

Change-Id: I336e22324d632ede1180d0c024fec60528f77cf6
2018-06-28 13:25:18 -07:00
Ari Hausman-Cohen
7805d1dd51 Add Product_is_iot to soong config.
Some code needs to behave differently for Android Things
systems. The Product_is_iot variable property can be used to
determine if a build is for Android Things or not.

Bug: 110494430
Test: aosp_angler builds
Change-Id: I902b438a334786adbd515188ad35e241d82e69fe
2018-06-27 16:53:09 -07:00
Tri Vo
ec3a768767 Merge "Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs" am: 542d60062f
am: 01f63e2954

Change-Id: If6b1ce0b6d30c0d663b1cb644b900e77b435c998
2018-05-22 16:06:57 -07:00
Tri Vo
f544fe3db9 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: I838c76736a3f1bd8759e24739cf82fea33a531b4
2018-05-22 09:23:44 -07:00
Colin Cross
bfd347dc82 Pass platform version name as --version-name for framework-res.apk
framework-res.apk should get the platform version name ("9") as
--version-name, not the SDK version ("28").  It will get copied
to compileSdkVersionCodename in APKs compiled against it.

Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version
Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
Merged-In: I34a601cb2c14f66199066e7d598862108da0b950
(cherry picked from commit b691e24d89)
2018-05-09 15:56:46 -07:00
Colin Cross
37d46e43e7 Pass platform version name as --version-name for framework-res.apk
am: b691e24d89

Change-Id: I3fad46dcbc4f61aa5dbb66b4cc4a8eac1cd70e94
2018-05-09 14:40:27 -07:00
Colin Cross
b691e24d89 Pass platform version name as --version-name for framework-res.apk
framework-res.apk should get the platform version name ("9") as
--version-name, not the SDK version ("28").  It will get copied
to compileSdkVersionCodename in APKs compiled against it.

Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version
Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
2018-05-09 12:26:06 -07:00
Tri Vo
64f343598a Merge "Expose selinux variables to Soong." am: c5934c55c7
am: 368e0ab5a2

Change-Id: I2377ca5f20e8c7c7ffb6ef856f4081b03b66fe85
2018-05-08 19:15:31 -07:00
Tri Vo
35a5143aee Expose selinux variables to Soong.
Bug: 33691272
Test: manual
Change-Id: I4a568fb25a36331afb2ca51c3d8a676c3aba09e1
2018-04-30 11:26:55 -07:00
Colin Cross
3f49fcb62b Merge "Fix aapt2 --min-sdk-version after finalized SDK" am: 59bcf6e631
am: 9d0af2e737

Change-Id: I9d43e2d829aac6273be319968c9afb37b8331570
2018-04-18 15:35:23 -07:00
Colin Cross
e20c1b1904 Fix aapt2 --min-sdk-version after finalized SDK
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.

Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
Merged-In: I622eaf92f8a940f79007c2a579536da325700b06
(cherry picked from commit d09b0b653b)
2018-04-18 12:48:02 -07:00
Colin Cross
d09b0b653b Fix aapt2 --min-sdk-version after finalized SDK
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.

Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
2018-04-18 12:39:25 -07:00
Dan Willemsen
8328367c44 Add VendorConfig for board-level Soong plugin configuration
This allows Soong (Go) plugins to get custom configurations set in the
current product's BoardConfig.mk.

I'll have some more comprehensive documentation later, but the general
concept is that you'd have one namespace per plugin, defined in the
BoardConfig.mk (though they would work in the product.mk files too):

  SOONG_CONFIG_NAMESPACES += myPlugin

Within that namespace you can set key-value pairs:

  SOONG_CONFIG_myPlugin := key1 key2 ...
  ...
  SOONG_CONFIG_myPlugin_key1 := value
  ...
  SOONG_CONFIG_myPlugin_key2 := true

Then in your plugin, you can ask for your namespace:

  vars := ctx.Config().VendorConfig("myPlugin")

And then use them:

  str := vars.String("key1")
  if vars.Bool("key2") { ... }
  if vars.IsSet("key3") { ... }

Warning: It's not a good idea to fail on missing inputs, since an
android tree may contain plugins from multiple owners, and we may
configure your modules (but not build/install them) even if they're not
meant for the currently configured product.

Bug: 76168832
Test: define some variables, use them
Test: m blueprint_tools
Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
Merged-In: I4c38f5a4344022c6f332de279d9bbef24502e741
(cherry picked from commit 0fe7866897)
2018-04-17 10:34:23 -07:00
Dan Willemsen
d57ed550fd Make Config.ProductVariables private
All access to these should be going through the methods on Config /
DeviceConfig.

Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
Merged-In: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
(cherry picked from commit 45133ac184)
2018-04-17 10:34:23 -07:00
Chih-Hung Hsieh
505b2c69ac Add USE_CLANG_LLD and use_clang_lld. am: 02b4da53a7
am: 98fda157fb

Change-Id: I3fc25e6332ae02dc4736e1f77b6de52822968d80
2018-04-13 12:44:15 -07:00
Chih-Hung Hsieh
02b4da53a7 Add USE_CLANG_LLD and use_clang_lld.
* USE_CLANG_LLD is unedefined in current builds.
* When USE_CLANG_LLD is defined to 'true' or '1',
  use clang's lld instead of ld or ld.gold.
* When lld is enabled:
  * ld-only flags are not passed to 'lld'.
  * location_packer is disabled.
  * Use new lld's --pack-dyn-relocs=android.
* When lld does not work:
  * In Android.mk files use LOCAL_USE_CLANG_LLD := false.
  * In Android.bp files use use_clang_lld: false.
* Only arm, arm64, x86, and x86_64_devices have LLD flags;
  all other hosts and targets do not call lld yet.

Bug: 73768157
Test: make checkbuild and boot
Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
2018-04-12 14:37:35 -07:00
Dan Willemsen
32af22e2ef Add VendorConfig for board-level Soong plugin configuration am: 0fe7866897
am: 954230537d

Change-Id: I606059a27cdec3172ce38ffef2eaa5eca399f60d
2018-04-10 18:58:26 -07:00
Dan Willemsen
1fb615df28 Make Config.ProductVariables private am: 45133ac184
am: 1a837ac9fa

Change-Id: I73f7889bce4a6fe506d34623a68e337b5e290cb9
2018-04-10 18:58:20 -07:00
Dan Willemsen
0fe7866897 Add VendorConfig for board-level Soong plugin configuration
This allows Soong (Go) plugins to get custom configurations set in the
current product's BoardConfig.mk.

I'll have some more comprehensive documentation later, but the general
concept is that you'd have one namespace per plugin, defined in the
BoardConfig.mk (though they would work in the product.mk files too):

  SOONG_CONFIG_NAMESPACES += myPlugin

Within that namespace you can set key-value pairs:

  SOONG_CONFIG_myPlugin := key1 key2 ...
  ...
  SOONG_CONFIG_myPlugin_key1 := value
  ...
  SOONG_CONFIG_myPlugin_key2 := true

Then in your plugin, you can ask for your namespace:

  vars := ctx.Config().VendorConfig("myPlugin")

And then use them:

  str := vars.String("key1")
  if vars.Bool("key2") { ... }
  if vars.IsSet("key3") { ... }

Warning: It's not a good idea to fail on missing inputs, since an
android tree may contain plugins from multiple owners, and we may
configure your modules (but not build/install them) even if they're not
meant for the currently configured product.

Bug: 76168832
Test: define some variables, use them
Test: m blueprint_tools
Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
2018-04-11 01:45:37 +00:00
Dan Willemsen
45133ac184 Make Config.ProductVariables private
All access to these should be going through the methods on Config /
DeviceConfig.

Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
2018-04-11 01:45:29 +00:00
Rajeev Kumar
6f80dfd857 Merge "Add product_variables.Use_lmkd_stats_log." into pi-dev
am: f65a99cee1

Change-Id: I235eb051a60b01039f4ee2b3dcb41802fa81b797
2018-03-26 23:33:53 +00:00
Rajeev Kumar
423e2db0f9 Add product_variables.Use_lmkd_stats_log.
Bug: 74443701
Test: Tested manually
Merged-In: I512d1a4b5e796b459a7ecdd3649ffd147bcf4cbf
Change-Id: I512d1a4b5e796b459a7ecdd3649ffd147bcf4cbf
(cherry picked from commit 1e6056a380)
2018-03-23 19:47:10 +00:00
Dan Willemsen
04f97ce059 Remove obsolete Brillo variable am: a052599bb6
am: 567eda6a7d

Change-Id: I69edc621c71a4a5dc80595392b8914e1cca07e52
2018-03-12 22:04:12 +00:00
Dan Willemsen
a052599bb6 Remove obsolete Brillo variable
Test: none
Change-Id: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
2018-03-10 15:29:03 -08:00
Nan Zhang
bfef411697 Droiddoc Support in Soong am: 581fd21e91 am: 2ea76706b3
am: a400bb400c

Change-Id: I5c317052e5b1cba68e04720db75cb07cdd7ca0f7
2018-02-22 23:25:14 +00:00
Nan Zhang
581fd21e91 Droiddoc Support in Soong
Support Droiddoc to Soong based on core/droiddoc.mk. The non-std doclet
based droiddoc compilation output is a "real" stubs.jar instead of a
directory of java files and a timestamp file.

The std doclet based javadoc compilation output is a "empty" stubs.jar
instead of a timestamp file.

The stubs.jar will be exported to
out/target/common/obj/JAVA_LIBRARIES/$(LOCAL_MODULE)_intermediates/classes.jar
and out/target/common/docs/$(LOCAL_MODULE)-stubs.jar

A $(LOCAL_MODULE).zip file will be generated also, and is exported to
out/target/common/docs/$(LOCAL_MODULE)-docs.zip if property: installable is not set
to false.

Bug: b/70351683
Test: unittest + convert libcore docs Android.mk to Soong manually.

Change-Id: I1cffddd138a5d9d445f86a3d4a3fd4de88a2bc0f
(cherry picked from commit 78188ec622cb1ee24171455867fc58ffab91562e)
2018-02-22 11:14:13 -08:00
Pirama Arumuga Nainar
beb1452783 Search for PGO profiles in PGO_ADDITIONAL_PROFILE_DIRS am: 49540800f0 am: 8f7ea0ebdd
am: 0ee536259f

Change-Id: I6b767ab0b947054ce3264ce0cf478c4d0403bb38
2018-02-13 21:15:24 +00:00
Pirama Arumuga Nainar
49540800f0 Search for PGO profiles in PGO_ADDITIONAL_PROFILE_DIRS
This variable can be set in BoardConfig.mk to specify a list of
additional paths that contain PGO profiles.  These directories are
searched after the predefined paths in soong/cc/pgo.go while finding
PGO profiles.

Test: Set this variable in a BoardConfig and verify that such profiles
are found and that these paths are searched after the predefined paths
in soong/cc/pgo.go.

Change-Id: I0bb9523de614d0f23aba8d51c887d8fc8f41c993
2018-02-13 09:41:13 -08:00
Jaekyun Seok
e3e265939f Use product instead of oem for Product specific module am: 5cfbfbb67a am: 2b6236308b
am: be16d5e84f

Change-Id: I6ee908710e7d7b7fe9d3ce7e6c43287e3e8c0835
2018-01-25 04:17:04 +00:00
Jaekyun Seok
5cfbfbb67a Use product instead of oem for Product specific module
Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.
Change-Id: Icc4f8c16bc389fe20db680849f311d02df1299c3
2018-01-25 07:50:35 +09:00
Jiyong Park
596229feb4 Merge "Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS" am: d89f6621ae am: ee33e88111
am: a64cc46798

Change-Id: Ic3ea155a5f5dda891d59da2b9921f3cd5af96ddc
2018-01-23 19:00:09 +00:00
Ivan Lozano
8704d606cb Merge "Revert "Support enabling overflow sanitization by path."" am: e021b0405d am: a8388ac9e6
am: 0370b8c419

Change-Id: I04330526423727b61697734c3cf160e93a6ccfc4
2018-01-20 04:05:46 +00:00
Ivan Lozano
b7d0f52337 Revert "Support enabling overflow sanitization by path."
This reverts commit 17df3c1b76.

Change-Id: Id5dab777da591c24113c3048b8606547a661afdd
2018-01-20 01:44:38 +00:00
Ivan Lozano
bb20d98bb7 Merge "Support enabling overflow sanitization by path." am: c1fecc2dfa am: a613b55860
am: cbc5232329

Change-Id: I99e120a4e5442bf2715ffce7f2ac69c60085140b
2018-01-19 16:07:51 +00:00
Jiyong Park
1a5d7b1539 Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS
PLATFORM_SYSTEMSDK_VERSIONS is the list of System SDK versions that the
platform is supporting. Contrary to the public SDK where platform
essentially supports all previous SDK versions, platform support only a
few recent System SDK versions, since some of old System APIs are
gradually deprecated, removed from the following SDKs and then finally
deleted from the platform. This will be part of the framework manifest.

The list can be specified by setting PLATFORM_SYSTEMSDK_MIN_VERSION. If
it is set to an old version number, then System SDKs from the version
to the current version (PLATFORM_SDK_VERSION) are considered to be
supported by the platform. If PLATFORM_SYSTEMSDK_MIN_VERSION is not set,
only the latest System SDK version is supported.

Next, BOARD_SYSTEMSDK_VERSIONS is the list of System SDK versions that
the device is using. This is put to the device compatibility matrix
device is using. The device and the platform is considered as compatible
only BOARD_SYSTEMSDK_VERSIONS in the device compatibility matrix are
in the PLATFORM_SYSTEMSDK_VERSIONS in the framework manifest.

When BOARD_SYSTEMSDK_VERSIONS is set, a Java app or library in vendor or
odm partitions which didn't specify LOCAL_SDK_VERSION  is forced to use
System SDK. Also, the build system does the additional integrity check
to ensure that LOCAL_SDK_VERSION is within BOARD_SYSTEMSDK_VERSIONS or
PLATFORM_SYSTEMSDK_VERSIONS (if BOARD_SYSTEMSDK_VERSIONS isn't set).

Bug: 69088799
Test: m -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m -j
Change-Id: Id38f02b4be86710411be22bc28109e6894f8a483
2018-01-19 15:42:18 +09:00
Ivan Lozano
17df3c1b76 Support enabling overflow sanitization by path.
Handle paths variable provided from Make about where integer overflow
sanitization should be enabled by default, and prepare to enable minimal
runtime diagnostics for integer overflow sanitizers in userdebug/eng builds.

This provides Soong support for on-by-default paths from Make for
integer overflow sanitization.

Bug: 30969751
Bug: 63927620
Test: Include paths passed from Make are being sanitized.
Test: Compilation succeeds with and without diagnostics enabled.
Test: See Make patch for further test notes.

Change-Id: I803a75646cc27ef5b4b5b74b8eb2981c39f8a6a3
2018-01-18 14:16:47 -08:00
Hirokazu Honda
8991335666 [Android.bp] Add cflags, include_dirs, shared_libs ans srcs to ARC++ Product
Test: Compile
Bug: None
Change-Id: I422f2194208ea14e976970de748d6d9238fe9f14
2018-01-17 14:00:33 +09:00
Stephen Hines
51207eb44d Merge "Remove unnecessary DeviceUsesClang." am: 2e020842dc am: 4bf625d7e6
am: 8d7ba61a81

Change-Id: Ibfd4b158180d54607d9b9d7c6de927b071f1d425
2018-01-12 18:49:32 +00:00
Stephen Hines
6ea0f81c3f Remove unnecessary DeviceUsesClang.
This build function is unnecessary now that GCC is completely
unsupported for Android platform builds. It is similar to
USE_CLANG_PLATFORM_BUILD from the build/make side of things.

Bug: http://b/64032869
Test: Builds
Change-Id: Iddf5f91cc997c337c77a644265cb8dc4e5a915b4
2018-01-11 14:29:41 -08:00
Jiyong Park
eb7b1a2490 Merge "Add [soc|device|product]_specific" am: 95fba1a8f8 am: 0fffd6bca4
am: 4500bca56d

Change-Id: I6a3457b18df366aec5767ddb98314872e15be124
2017-12-21 18:35:16 +00:00
Jiyong Park
2db7692a74 Add [soc|device|product]_specific
Added three properties (soc_specific, device_specific, and
product_specific) that shows what a module is specific to.

`soc_specific: true` means that the module is specific to an SoC
(System-On-a-Chip) and thus need to be installed to vendor partition.
This has the same meaning as the old `vendor: true` setting.

`device_specific: true` means that the module is specific to the entire
hardware configuration of a device includeing the SoC and off-chip
peripherals. These modules are installed to odm partition (or /vendor/odm
when odm partition does not exist).

`product_specific: true` means that the module is specific to the
software configuration of a product such as country, network operator,
etc. These modules are installed to oem partition (or /system/oem when
oem partition does not exist). These modules are assumed to be agnostic
to hardware, so this property can't be true when either soc_specific or
device_specific is set to true.

Bug: 68187740
Test: Build. path_tests amended.
Change-Id: I44ff055d87d53b0d2676758c506060de54cbffa0
2017-12-21 12:16:29 +09:00
Steven Moreland
35a468eeaf Merge "Remove sepolicy_split from soong." am: 57603998a6 am: 3fac38f544
am: 9bbc5b65e1

Change-Id: I0413a91f87446112d15e692a8a62230647ae48ea
2017-12-20 21:14:35 +00:00
Steven Moreland
0afa55ae12 Remove sepolicy_split from soong.
No longer needed.

Bug: 62019611
Test: manual
Change-Id: Id485e6db4cc9b5a7cf553e5089fd85b667c7c660
2017-12-19 20:41:21 +00:00
Steven Moreland
ec1c4d57eb Merge "Remove Treble/PRODUCT_FULL_TREBLE from Soong." am: e565435a7b am: 642948940e
am: 74fc159270

Change-Id: I8079e8d1704de5f465a56c7e9d3190ac687cefb8
2017-12-15 20:25:03 +00:00
Steven Moreland
dd0bb0b26c Remove Treble/PRODUCT_FULL_TREBLE from Soong.
This variable is being broken up because it isn't well
defined, and breaking it into smaller components makes
device bringup easier.

Bug: 62019611
Test: nothing uses it
Change-Id: I748958b7276f607f8a711289f3bde163a1a56596
2017-12-15 10:25:48 -08:00