Commit graph

22361 commits

Author SHA1 Message Date
Justin Yun
4e7e76fe5a 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.

Bug: 146620523
Test: build with PRODUCT_PRODUCT_VNDK_VERSION := current
Change-Id: Icfd94dfc30e77581991799d9e2f408f57da22cea
2020-01-19 23:46:47 +00:00
Vic Yang
90c3aca9bf Don't check VNDK variants when asan is used
Bug: 147911208
Test: Build with SANITIZE_TARGET=address
Change-Id: I161da92d2ed5c59ccf404cf93e04734cc85c2df9
2020-01-17 15:30:44 -08:00
Treehugger Robot
5023711e9d Merge "Always check VNDK variant identicalness" 2020-01-17 18:45:41 +00:00
Yifan Hong
0188eb5d25 Merge changes from topic "build_time_vintf"
* changes:
  Reland "Improve BUILT_ASSEMBLED_*_MANIFEST checks"
  Reland "Add check-vintf-all target."
2020-01-17 18:37:37 +00:00
Treehugger Robot
48b67473c6 Merge "Track addition of internal classes derived from OpenJDK 9+181." 2020-01-17 16:41:48 +00:00
Tobias Thierer
c6cb1c3815 Track addition of internal classes derived from OpenJDK 9+181.
Bug: 147483640
Test: Treehugger

Change-Id: Ib934f0fe4e2aeadcc83bbae3c2efaf45a38081d4
2020-01-17 14:40:22 +00:00
Treehugger Robot
345dad3c36 Merge "Allow codename.fingerprint format for minSdkVersion" 2020-01-17 07:43:31 +00:00
Treehugger Robot
951ae30d56 Merge "Add strict module check to package-modules.mk" 2020-01-17 00:03:07 +00:00
Baligh Uddin
7ce531de8e Allow codename.fingerprint format for minSdkVersion
Use codename.fingerprint format for minSdkVersion if it is unset
in the manifest and
UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

BUG: 130541924
2020-01-16 10:04:55 -08:00
Dan Willemsen
09c11073ac Add strict module check to package-modules.mk
The test lists keep getting out of date. Add a per-caller option so that
once they're clean on all builds we can stop them from regressing.

Test: add my_modules_strict := {true,false,,foo} to user
Change-Id: I3e09a8cbe5a07bbbff042b26cea7041c331dde96
2020-01-15 20:54:13 -08:00
Yifan Hong
2e4f20f540 Merge "device_(manifest|matrix).xml -> vendor_*" 2020-01-16 04:09:08 +00:00
Jeongik Cha
3ff51e5346 Turn on PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE if PRODUCT_SHIPPING_API_LEVEL > 29
Set PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE true if
 1. PRODUCT_SHIPPING_API_LEVEL > 29
 2. OVERRIDE_PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is set

Bug: 147711383
Test: Set PRODUCT_SHIPPING_API_LEVEL higher than 29, m nothing
Change-Id: Ib6aa2fd908b4bc13e3f759a07ece0e60dd3cc12f
2020-01-15 16:48:51 +09: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
Ryan Mitchell
15e6042b29 Do not remove RRO resources
Resource configs should not be deduped when building RROs since it
would be impossible to override some resource configs with the same
value as the default config. Also, aapt2 removes resources that do not
have default configurations. If an overlay attempts to overlay a
non-default configuration without overlaying the default, the resource
will be removed and the value will not be overlaid at all.

Bug: 146227008
Test: m-j
Change-Id: I1465b599cbf7f464d1b5b75a87e7dafa2cf734b0
2020-01-14 17:00:13 -08:00
Yifan Hong
605ea043c8 Reland "Improve BUILT_ASSEMBLED_*_MANIFEST checks"
This reverts commit d00ebcd740.

Reason for revert: reland CL

Test: m check-vintf-all

Change-Id: I6544197048a18745c80a954b9eccf69e7e438e9d
2020-01-14 14:25:31 -08:00
Yifan Hong
bcd46bc540 Reland "Add check-vintf-all target."
This reverts commit 152a783e2b.

Reason for revert: reland CL

Test: m check-vintf-all

Change-Id: I80fc789313edd3a9cc439a0b3a81e524e39b41b1
2020-01-14 14:25:16 -08:00
Yifan Hong
51be69f063 device_(manifest|matrix).xml -> vendor_*
Building device_manifest.xml or device_compatibility_matrix.xml only
builds vendor manifest / matrices, but not all device manifest /
matrices (e.g. vintf_fragments, ODM manifest, etc.). Make the name more
accurate.

Test: m check-vintf-all

Change-Id: Ib017507c421355263d53a9e5b357f169c77da36d
2020-01-14 14:24:51 -08:00
Harry Zhang
02e7851e02 Merge "Revert "Add check-vintf-all target."" 2020-01-14 21:34:51 +00:00
Harry Zhang
19705c6987 Merge "Revert "Improve BUILT_ASSEMBLED_*_MANIFEST checks"" 2020-01-14 21:12:40 +00:00
Harry Zhang
152a783e2b Revert "Add check-vintf-all target."
Revert submission 1202895-build_time_vintf

Reason for revert: Build breakage at b/147648187
Reverted Changes:
I9791abc44: Improve BUILT_ASSEMBLED_*_MANIFEST checks
I6ee79910d: Add check-vintf-all target.

Change-Id: I6d9fd1747eaea492a3ebfe98c13ea4a5a2d22a33
2020-01-14 18:40:23 +00:00
Harry Zhang
d00ebcd740 Revert "Improve BUILT_ASSEMBLED_*_MANIFEST checks"
Revert submission 1202895-build_time_vintf

Reason for revert: Build breakage at b/147648187
Reverted Changes:
I9791abc44: Improve BUILT_ASSEMBLED_*_MANIFEST checks
I6ee79910d: Add check-vintf-all target.

Change-Id: If580207415d6ca54eb5fc653efc54d07b086f804
2020-01-14 18:40:23 +00:00
Yifan Hong
997661002a Merge changes from topic "build_time_vintf"
* changes:
  Improve BUILT_ASSEMBLED_*_MANIFEST checks
  Add check-vintf-all target.
2020-01-14 01:29:47 +00:00
Ulyana Trafimovich
d99a1faccc Merge "Use boot image extension in the JIT-zygote experiment." 2020-01-13 10:38:01 +00:00
Jiyong Park
7434764cce Merge "Correctly gather boot jars from APEXes" 2020-01-13 01:16:16 +00:00
Yifan Hong
8bdfe365d6 Improve BUILT_ASSEMBLED_*_MANIFEST checks
They are moved into check-vintf-all, which is more
accurate and do not require building full OS images.

Also move kernel check code down to check_vintf_compatible. There
is no assembled manifest to put kernel configs now, but they are still
required for build time OTA VINTF checks.

Test: builds
Test: change a vintf_fragment file to cause a conflict with main manifest file
(add health@2.0 to boot@1.1.xml), and check_vintf_vendor_log fails

Change-Id: I9791abc440a40e1537b4387eb67575ff2e22df08
2020-01-11 19:06:18 +00:00
Treehugger Robot
56772d7213 Merge "Disallow unnamed package on the bootclasspath." 2020-01-11 16:42:21 +00:00
Tobias Thierer
af482ea053 Disallow unnamed package on the bootclasspath.
There are currently no classes on the bootclasspath that live in the
unnamed package (empty package name). This CL explicitly forbids it.
This has the side effect of guarding against some classes of bugs,
for example R8 has functionality to generate some helper classes in
the unnamed package that should not be on the to bootclasspath
because they would hide corresponding classes in Applications.

Strictly speaking I believe that the "not package_name or " part
of the condition in the touched script is not needed because
LoadWhitelist() already skips empty lines and doesn't add "^$" to
the whitelist regex, but relying on this seems very fragile. If
there ever is a need to have classes in the bootclasspath's
unnamed package in future then we can always change this again.

Bug: 147480264
Test: Treehugger

Change-Id: Ic310dd0779dde133b3a5c3039ea5b70d31331a9b
2020-01-11 16:07:13 +00:00
Justin Yun
66c7af81f3 Define PRODUCT_PRODUCT_VNDK_VERSION automatically
PRODUCT_PRODUCT_VNDK_VERSION will be automatically set to true for
the devices with PRODUCT_SHIPPING_API_LEVEL newer than 29.

Bug: 146621746
Test: build with PRODUCT_SHIPPING_API_LEVEL set to 30
Change-Id: I78cd81d1d61e9089b163169bc495df8a880463da
2020-01-11 12:44:08 +00:00
Yifan Hong
850f8b5d77 Add check-vintf-all target.
Add target that checks VINTF compatibility of the current build
(in $PRODUCT_OUT) properly. The target:

- Doesn't require a full build
- Won't run for system-only AOSP targets

A verbose log is printed if `m check-vintf-compatible` is executed,
but it won't show up if `m` is executed.

(After this patch, adding product / system_ext matrices is as simple
as defining a vintf_compatibility_matrix in Soong, and VINTF
compatibility is properly checked.)

Test: m check-vintf-all
Test: delete */etc/vintf and m check-vintf-all
Test: m
Test: m check-vintf-all on device with vendor/odm and ODM SKU-specific
      manifests

Test: change manifest.xml to be incompatible and m check-vintf-all fails

Bug: 140280874
Bug: 140360109

Change-Id: I6ee79910d745d29cfc9b05b1435e26f91b7c10f7
2020-01-10 13:17:56 -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
Ulya Trafimovich
bd98b55100 Use boot image extension in the JIT-zygote experiment.
Test: temporarily enable JIT-zygote configuration, build, boot the
  device and ensure that the JIT-zygote specific boot image
  apex-framework.art is mapped in the zygote address space:

  1. enable Jit zygote in the product device config (in my case
    device/google/muskie/aosp_walleye.mk):

    +# System server should not contain compiled code.
    +PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := verify
    +
    +# Use the apex image for preopting.
    +DEXPREOPT_USE_APEX_IMAGE := true
    +
    +# Have the runtime pick up the apex image.
    +PRODUCT_PROPERTY_OVERRIDES += \
    +    dalvik.vm.boot-image=/apex/com.android.art/javalib/apex.art:/system/framework/apex-framework.art

  2. lunch aosp_walleye-userdebug \
    && m \
    && adb reboot bootloader \
    && fastboot flashall -w

  3. adb shell cat /proc/`adb shell ps | grep zygote64 | awk {'print $2'}`/maps | grep apex-framework.art
  6fe44000-7025c000 rw-p 00000000 fc:02 1179718                            /data/dalvik-cache/arm64/apex@com.android.art@javalib@apex-framework.art
  70571000-70696000 rw-p 0072d000 fc:02 1179718                            /data/dalvik-cache/arm64/apex@com.android.art@javalib@apex-framework.art
  75a339f000-75a33ac000 r--p 00852000 fc:02 1179718                        /data/dalvik-cache/arm64/apex@com.android.art@javalib@apex-framework.art

Change-Id: I6818fde087ec562057631003265bc1ec0e91688c
2020-01-10 15:29:42 +00:00
Jiyong Park
ee75813162 Correctly gather boot jars from APEXes
Jars in APEXes have Make module names <jar_name>.<apex_name>. e.g.
updatable-apex.com.android.media. Previously, we have used <jar_name>
which actually meant the platform variant of the jar. This is not only
incorrect, but also is causing problem as the platform variant is no
longer available when the jar is configured to be available only for the
corresponding APEX (via the apex_available property).

Fixing the problem by correctly using <jar_name>.<apex_name> scheme.

Bug: N/A
Test: m

Change-Id: I6e255ce88c9bd80120b29197fb2637a64010f531
Merged-In: I6e255ce88c9bd80120b29197fb2637a64010f531
2020-01-10 15:15:47 +00:00
Dan Willemsen
38dc09d39a Use our prebuilt M4 for flex and bison
And ensure we've got all the proper dependencies.

Bug: 117561006
Test: treehugger
Change-Id: Ia9690b2c0d73a48744c8e33fe83196d02b1e904d
2020-01-08 22:31:12 -08:00
Treehugger Robot
3801c82e33 Merge "jacoco-report-classes-all.jar includes jar from other partitions" 2020-01-09 00:45:11 +00:00
Xin Li
2cfd952682 Merge "DO NOT MERGE - Merge January 2020 Security Release into master" 2020-01-08 17:39:17 +00:00
Martin Stjernholm
2e31874c7a Merge "Remove generation of the dexpreopt tool paths from make." 2020-01-08 10:40:28 +00:00
Jiyong Park
bee946e8eb jacoco-report-classes-all.jar includes jar from other partitions
jacoco-report-classes-all.jar now depends on all installed files
including apks in /apex. Previously, it depended only on files under
system.img and as a result jacoco for other partitions were missing.

Bug: 147296855
Test: m

Change-Id: I755de1205ebc43c197af36a13cca5f4b49e275e8
2020-01-08 14:41:45 +09:00
Dan Willemsen
13f8dc992e Merge "Use symlinks in the build graph for jni libs"
am: 7d44f2d01d

Change-Id: I43f3bcce4569a72beaf4772008afda1bf3aebf90
2020-01-07 06:47:56 -08:00
Treehugger Robot
7d44f2d01d Merge "Use symlinks in the build graph for jni libs" 2020-01-07 14:42:51 +00:00
Martin Stjernholm
46f6017064 Merge "Remove DEX2OAT_DEPENDENCY which is the same as DEX2OAT."
am: 8da546b295

Change-Id: I93776b805dc23b4c5496f255e1e228b544017ac3
2020-01-07 05:02:13 -08:00
Martin Stjernholm
1e5581749d Remove generation of the dexpreopt tool paths from make.
They are now created from Soong, and therefore put in a separate config file
out/soong/dexpreopt_soong.config.

Test: m
Bug: 145934348
Change-Id: I27e710f09c37e64e8975b8e763d13434e5de71b3
2020-01-07 13:00:38 +00:00
Martin Stjernholm
8da546b295 Merge "Remove DEX2OAT_DEPENDENCY which is the same as DEX2OAT." 2020-01-07 12:37:07 +00:00
Ulyana Trafimovich
bedd2a57f9 Merge "Respect JIT-zygote config when generating boot image location."
am: 5268bfa61e

Change-Id: I4cf43302005c80d543f24a45520fd0f7d3a9c14b
2020-01-07 03:01:03 -08:00
Ulyana Trafimovich
5268bfa61e Merge "Respect JIT-zygote config when generating boot image location." 2020-01-07 10:48:45 +00:00
Martin Stjernholm
388a71f092 Remove DEX2OAT_DEPENDENCY which is the same as DEX2OAT.
Small cleanup to simplify the move of it into Soong.

Test: presubmits
Bug: 145934348
Change-Id: Ib4a0b69279f63d53405509b2d1529d9e60d46858
2020-01-07 00:00:29 +00:00
Daniel Mentz
e91b131bf6 Merge "Add unpack_bootimg to otatools to modify boot.img"
am: eb28123fef

Change-Id: Id475852d32699e3e263be46614a99962d42f773e
2020-01-06 10:53:03 -08:00
Dan Willemsen
b195e7ab04 Use symlinks in the build graph for jni libs
Now that ninja uses lstat and can support installing arbitrary symlinks,
switch jni lib symlinks from LOCAL_POST_INSTALL_CMDS to real rules.

Bug: 128577186
Test: List of files under PRODUCT_OUT is the same before/after this change
Test: out/target/product/generic/.installable_files now includes the symlinks
Test: m installclean; m NfcNci -> symlinks installed with correct dest
Test: m NfcNci; m NfcNci -> ninja: no work to do
Change-Id: I078dca53ab3d93f74c36fa66d5577e6e3e0640d6
2020-01-06 10:25:56 -08:00
Ulya Trafimovich
d1c9bfe87a Respect JIT-zygote config when generating boot image location.
Earlier CL Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826 introduced
Soong-generated Make variable 'DEXPREOPT_IMAGE_LOCATIONS'. That CL was
erroneous in that it did not take JIT-zygote config into account and
generated identical location for "boot" and "apex" boot images.

This caused build breakages, because in case of JIT-zygote config the
two variables 'DexPreoptImages' and 'DexPreoptImageLocations' in the
module's dexpreopt.config were out of sync: 'DexPreoptImages' was
for the "apex" image, and 'DexPreoptImageLocations' was for the "boot"
image.

CL I9a91fc48e54d7d43abec2cb2b5a11e3581db380b introduced a workaround
for this problem: incorrect 'DexPreoptImageLocations' from the module
dexpreopt.config was ignored, and instead boot image location was
manually reconstructed from 'DexPreoptImages'. This workaround would
not work when we start using boot image extension and location will
become more complex.

This CL fixes the way 'DexPreoptImageLocations' is generated by
spliting the 'DEXPREOPT_IMAGE_LOCATIONS' variable in two variables
depending on the boot image flavour "boot" of "apex". This is
aligned with the way other similar variables are generated.

Test: aosp_walleye-userdebug boots.
Test: walleye_jitzygote-userdebug builds
  (on git_rvc-release branch with this CL cherry-picked).

Change-Id: I449c968909635dd8cc431323fccbc7fce440fea5
2020-01-06 15:58:52 +00:00
Daniel Mentz
30652b3380 Add unpack_bootimg to otatools to modify boot.img
unpack_bootimg in conjunction with mkbootimg can be used to re-create
boot.img with a different kernel image and ramdisk.

Change-Id: I9615facc9335885989772a0dd7f08217e2143a45
2020-01-04 15:25:42 -08:00
Dan Willemsen
8e080ccefe Merge "Export list of "installable" files to soong_ui"
am: 99202ec0a6

Change-Id: I252f4748396572d4b6c0f26148dc51b0c01b2f9e
2020-01-03 21:19:55 -08:00
Treehugger Robot
99202ec0a6 Merge "Export list of "installable" files to soong_ui" 2020-01-04 05:16:24 +00:00
Dan Willemsen
dec6e8e056 Export list of "installable" files to soong_ui
These are a (partial) list of files that we'd install with a default
build. The idea is that if something is removed from this list, soong_ui
can remove it from the installed location before running ninja.

It's okay if there are things missing from this list, it's not intended
to be a 100% solution replacing installclean / CleanSpec.mk, just
something that handles 80% of the cases without user involvement.

In particular, if something is removed from PRODUCT_PACKAGES, we'll
remove it from disk, but not necessarily rebuild the image files. That's
the same as most use cases of CleanSpec.mk today, and often some other
change will trigger the necessary images to be rebuilt.

We should be able to fix that by changing all of the image creation
rules to depend on the (partial) list of files they care about, or by
fixing ninja to rebuild things when their list of dependencies change.
(Other tools run into this same problem)

The list of test files is also included so that we can remove obsolete
tests from their "installed" locations within test suites and the
testcases folders.

Test: remove a module from PRODUCT_PACKAGES, see the print and file removed
Test: change the name of a cts test, see the old one removed from cts
Change-Id: I67f270a6713369099ca523aaf991ee3beb815c0a
2020-01-03 19:19:11 -08:00
Dan Willemsen
a9bfb4faba Merge "Add BUILD_BROKEN_NINJA_USES_ENV_VARS"
am: f29df793c9

Change-Id: Iae9ee9bbb18a153000e37204236e653465aba018
2020-01-03 18:04:04 -08:00
Treehugger Robot
f29df793c9 Merge "Add BUILD_BROKEN_NINJA_USES_ENV_VARS" 2020-01-04 01:32:40 +00:00
Colin Cross
253f31621e Merge "Add Soong android_app and android_test modules to javac-check"
am: 6e54952b44

Change-Id: I5ca7e4bd210a66aaeb305ab7ab326683ef89ea0b
2020-01-03 11:23:43 -08:00
Dan Willemsen
2607625f8b Add BUILD_BROKEN_NINJA_USES_ENV_VARS
See the Changes.md and the paired soong change for more information.

Test: Add BUILD_BROKEN_NINJA_USES_ENV_VARS := OLDPWD
      ALLOW_NINJA_ENV=false m nothing; check out/soong.log
Change-Id: I2167eac52166b513318bc48feb71c9d0b80e5fd4
2020-01-02 20:09:25 -08:00
Xin Li
68446d2662 DO NOT MERGE - Merge QQ1A.200105.003 into stage-aosp-master
Merged-In: I7e4e99e0da7387b13c94059b7ab1beb98ac47591
Change-Id: I2b18bf376c9d5ce988be10cabdf328f53a78ecab
2020-01-02 23:03:40 +00:00
Colin Cross
8e28a17bfe Add Soong android_app and android_test modules to javac-check
android_app and android_test modules were not built as part of
javac-check, which resulted in not running them in the Error Prone
build.

Fixes: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I278d7ee0cdc3f49aa8fa4d4f13309e29d700f2ba
2019-12-30 22:08:07 -08:00
Dan Willemsen
13cb165b91 Stop removing valid copy headers
My change to clean up obsolete copy headers would remove valid ones if
thhe LOCAL_COPY_HEADERS_TO path wasn't cleaned. I'm seeing this most
with values that just end in '/', so we end up with a '//' in the path,
which isn't textually equivalent, and we remove it.

Test: No longer seeing constant removals on internal products
Test: Set LOCAL_COPY_HEADERS_TO := ..
Test: Set LOCAL_COPY_HEADERS_TO := ../foo
Test: Set LOCAL_COPY_HEADERS_TO := /foo
Change-Id: Idbeeb207a2bb2a8da766473dbded877cec7c9cc1
2019-12-26 16:52:34 -08:00
Justin Yun
04e5a40f2c Define ro.product.vndk.version
Use ro.product.vndk.version to show the VNDK version that the product
partition is using.
When PRODUCT_PRODUCT_VNDK_VERSION is set, add ro.product.vndk.version
in /product/build.prop.
If PRODUCT_PRODUCT_VNDK_VERSION is "current", ro.product.vndk.version
will have the VNDK version in PLATFORM_VNDK_VERSION. Otherwise, it
will have the value defined in PRODUCT_PRODUCT_VNDK_VERSION.

Bug: 144534640
Test: Check if /product/build.prop has "ro.product.vndk.version"
Change-Id: If5e7e3a6c155de45f88f68700f16175656896afe
2019-12-24 07:20:43 +00:00
Daniel Mentz
5a8feb5422 Only dist recovery_ramdisk if BOARD_USES_RECOVERY_AS_BOOT
Bug: 146798070
Change-Id: I9e9d313b8ca097b4930fc2c99800772c6bdcbb9e
2019-12-23 14:08:31 -08:00
Daniel Mentz
4d6017d519 Dist ramdisk-recovery.img and misc_info.txt
Dist ramdisk-recovery.img and misc_info.txt. This is useful for
re-creating boot.img without having to download a huge target_files zip
file.

Change-Id: I2e1c1d547c95ca3433f89c68428c0c98fa4d19cd
2019-12-23 18:35:17 +00:00
Treehugger Robot
982da2812f Merge changes from topic "runtime_apex_available"
* changes:
  apex-libs-absence checks are removed
  Remove bionic libs from APEX_MODULE_LIBS check
  Use apex_available property
2019-12-23 04:50:53 +00:00
Jiyong Park
22195346dd apex-libs-absence checks are removed
The check is implemented in Soong via the apex_available property.
For a module that should be in the APEX named "foo" and shouldn't be in
any other APEX and also in the platform (the non-updatable part), the
property can be set to "foo" (without "//apex_available:platform")
to express the restriction and then Soong will enforce it.

Bug: 128708192
Test: m
Change-Id: Ia1aaaacd685f466447b61deae2849cb0aa83def3
2019-12-23 03:41:59 +00:00
Jiyong Park
be77c453a7 Remove bionic libs from APEX_MODULE_LIBS check
The test was to ensure that bionic libs are not installed to the
non-updatable part of the platform (e.g. system/lib). However, for
bionic libs, we actually have been installing them for bootstrapping.
Specifically, they are installed to /system/lib/bootstrap, not
/system/lib. The test has passed just because it didn't look into
/system/lib/bootstrap. Removing the unnecessary check.

Bug: 128708192
Bug: 133140750
Test: m
Test: m out/target/prduct/$(TARGET_DEVICE)/system/lib/libc.so doesn't
work
Change-Id: I93cbd74972cdd2daea45612136d5133fa49ab76a
2019-12-22 12:25:48 +09:00
Justin Yun
f19d840d13 Define PRODUCT_PRODUCT_VNDK_VERSION
PRODUCT_PRODUCT_VNDK_VERSION sets the VNDK version for product
partition. It may have "current" to use the PLATFORM_VNDK_VERSION.
If PRODUCT_PRODUCT_VNDK_VERSION is set, the native modules in product
partition are enforced to use VNDK's only from the system partition
as BOARD_VNDK_VERSION did to vendor partition.

Bug: 144534640
Test: build
Change-Id: I7ea148f0f8b7e44be7810adcacb30702d66831f1
2019-12-21 00:49:09 +00:00
Jiyong Park
be2aed5529 Use apex_available property
Use apex_available property to prevent modules that are only for the
NN apex from being used outside of the APEX.

Bug: 128708192
Bug: 133140750
Test: m
Change-Id: I57fe857d99088ef08e065dd2a3fc5a9389b6eb0f
2019-12-20 13:18:27 +09:00
Jiyong Park
a4226d1942 Use apex_available property
Use apex_available property to prevent modules that are only for the
conscrypt apex from being used outside of the APEX.

Bug: 128708192
Bug: 133140750
Test: m
Change-Id: I08ca6cd8e5e4a254d9dd62695ee3ed317503d874
2019-12-20 13:13:50 +09:00
Treehugger Robot
3977cb4f75 Merge changes from topic "art_apex_available"
* changes:
  Add boringssl_self_test to PRODUCT_PACKAGES
  Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMAR
2019-12-20 01:17:43 +00:00
Logan Chien
fd72df98fd Merge "Enable prebuilt ELF check for all targets" 2019-12-19 15:07:36 +00:00
Jiyong Park
f8b8c647e4 Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMAR
Reason for revert: relanding with fix
Reverted Changes:
Ic4119368c:Revert submission 1191937-art_apex_available
Ia084976bb:Revert submission 1191937-art_apex_available
Iada86226d:Revert submission 1191937-art_apex_available
Ic76735eac:Revert submission 1191937-art_apex_available
I1eb30e355:Revert submission 1191937-art_apex_available
Icaf95d260:Revert submission 1191937-art_apex_available
Ie8bace4be:Revert submission 1191937-art_apex_available
I8961702cf:Revert submission 1191937-art_apex_available
I39316f9ef:Revert submission 1191937-art_apex_available
I522a7e83b:Revert submission 1191937-art_apex_available
I8b9424976:Revert submission 1191937-art_apex_available
I48b998629:Revert submission 1191937-art_apex_available

Change-Id: I8b4eed03c76153e2469f7b3e2e33c6e20e6e0409
2019-12-19 18:16:34 +09:00
Jiyong Park
54aec677da Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMAR
Reason for revert: relanding with fix
Reverted Changes:
Ic4119368c:Revert submission 1191937-art_apex_available
Ia084976bb:Revert submission 1191937-art_apex_available
Iada86226d:Revert submission 1191937-art_apex_available
Ic76735eac:Revert submission 1191937-art_apex_available
I1eb30e355:Revert submission 1191937-art_apex_available
Icaf95d260:Revert submission 1191937-art_apex_available
Ie8bace4be:Revert submission 1191937-art_apex_available
I8961702cf:Revert submission 1191937-art_apex_available
I39316f9ef:Revert submission 1191937-art_apex_available
I522a7e83b:Revert submission 1191937-art_apex_available
I8b9424976:Revert submission 1191937-art_apex_available
I48b998629:Revert submission 1191937-art_apex_available

Change-Id: Ie2314d1f4cb2b92f005dfc77fcfd7ebace88e48f
2019-12-19 12:35:29 +09:00
Joseph Murphy
7378ff158c Merge changes from topic "revert-1191937-art_apex_available-DWXQGTKMAR"
* changes:
  Revert submission 1191937-art_apex_available
  Revert submission 1191937-art_apex_available
2019-12-19 01:20:03 +00:00
Joseph Murphy
92e1a0bea0 Revert submission 1191937-art_apex_available
Original Commit Message:
"""
Rename modules that are APEX-only

The renamed modules are only available for APEXes, but not for the
platform. Use the <module_name>.<apex_name> syntax to correctly install
the APEX variant of the modules.
"""

Reason for revert: Build Cop - Breaks about 15 AOSP targets, with high confidence due to these changes being the only non-robot changes in those builds.

Reverted Changes:
I190ce2d10:Use apex_available property
I990e0a67e:Use apex_available property
I0d1295683:Revert "Avoid duplicated classes for boot dex jars...
I5fb725403:Find the jar libraries in APEX from the correct pa...
I322b1efcc:Rename modules that are APEX-only
Ifa2bd0f8f:Use apex_available property
Iac6533177:Use apex_available property
Ie999602c6:Use apex_available property
I2a3d73397:Use apex_available property
Ic91bcbb9a:Use apex_available property
Ia6c324eed:Use apex_available property
I964d0125c:Use apex_available property

Change-Id: I8961702cfb414ebec55014f57e0be3347b34cea9
2019-12-19 01:06:41 +00:00
Joseph Murphy
9bc1c0032c Revert submission 1191937-art_apex_available
Original Commit Message:
"""
Rename modules that are APEX-only

The renamed modules are only available for APEXes, but not for the
platform. Use the <module_name>.<apex_name> syntax to correctly install
the APEX variant of the modules.
"""

Reason for revert: Build Cop - Breaks about 15 AOSP targets, with high confidence due to these changes being the only non-robot changes in those builds.

Reverted Changes:
I190ce2d10:Use apex_available property
I990e0a67e:Use apex_available property
I0d1295683:Revert "Avoid duplicated classes for boot dex jars...
I5fb725403:Find the jar libraries in APEX from the correct pa...
I322b1efcc:Rename modules that are APEX-only
Ifa2bd0f8f:Use apex_available property
Iac6533177:Use apex_available property
Ie999602c6:Use apex_available property
I2a3d73397:Use apex_available property
Ic91bcbb9a:Use apex_available property
Ia6c324eed:Use apex_available property
I964d0125c:Use apex_available property

Change-Id: I39316f9ef2b0cd6c0a347f6b51d011748d0681aa
2019-12-19 01:06:36 +00:00
Jiyong Park
e09efa6473 Merge changes from topic "art_apex_available"
* changes:
  Find the jar libraries in APEX from the correct path
  Use apex_available property
2019-12-19 00:21:43 +00:00
Treehugger Robot
0cb1ca1c4c Merge "Raise an error when partition setting is wrong" 2019-12-18 23:56:44 +00:00
android-build-team Robot
64e7944ca9 Version bump to QQ1A.200105.003 [core/build_id.mk]
Change-Id: I69a014b59414010794997c8283bc7945e37b008c
2019-12-17 19:20:46 +00:00
Jeongik Cha
bb688a9fa9 Raise an error when partition setting is wrong
When setting target out path at root(/product, /system_ext), either file
system type or prebuilt image must be set. If not, we'd rather raise an
error.

Without raising an error, the artifacts in these directory are not
included in any image.

And also, extract these logics into function, and check product, odm, system_ext
For now, exempt vendor image because of some targets with prebuilt
vendor image.
Bug: 137169253
Test: set TARGET_COPY_OUT_PRODUCT := product
          BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE :=
	  BOARD_PREBUILT_PRODUCTIMAGE :=
      and then check if it causes an error.
Test: set TARGET_COPY_OUT_PRODUCT := system/product
          BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 or
	  BOARD_PREBUILT_PRODUCTIMAGE := someimage.img
      and then check if it causes an error.

Change-Id: Ibf0f7838111075ba3649e198e5649aa7e8e29d7c
2019-12-17 22:41:56 +09:00
Jiyong Park
439b829b42 Find the jar libraries in APEX from the correct path
JAR libraries in the ART and conscrypt APEXes are no longer built for
the platform. Therefore, the path out/target/common/<name>_intermediates
does not exist. Instead use the path
out/target/common/<libname>.<apexname>_intermediates paths for those
APEX-only jars.

Bug: 128708192
Bug: 133140750
Test: m

Change-Id: I5fb725403ac22198e5ce6d77ca97c5f3392fabfd
2019-12-17 21:16:34 +09:00
Jiyong Park
0d7bd6be90 Use apex_available property
Use apex_available property to prevent modules that are only for the ART
apex from being used outside of the APEX.

Bug: 128708192
Bug: 133140750
Bug: 129006418
Test: m
Test: m libnativeloader doesn't install anything. (because it doesn't
have "//apex_available:platform".
Test: Add "libnativeloader" to shared_libs of "libvndksupport" which is
installed to /system/lib. Then the build fails with following error:

  error: system/core/libvndksupport/Android.bp:3:1: module
  "libvndksupport" variant "android_arm_armv8-a_core_shared": depends on
  //art/libnativeloader:libnativeloader which is not visible to this
  module

Change-Id: I964d0125cfedb454a60c098bf1a1797201d5dd40
2019-12-17 21:16:20 +09:00
Martin Stjernholm
42ae1c8c8f Add libdl_android.so to the system partition absence check.
Test: m
Bug: 144343305
Change-Id: Ie3a9698d4d369a68ce2baffbab448af63ead4410
2019-12-16 21:43:45 +00:00
Nick Desaulniers
5c3bf1b164 Merge "build: make: use -Wl,-z,separate-code w/ -Wl,--execute-only" 2019-12-16 21:13:28 +00:00
Nick Desaulniers
9882f6f7be build: make: use -Wl,-z,separate-code w/ -Wl,--execute-only
Also, prefer
-Wl,--execute-only
rather than
-Wl,-execute-only

Bug: 139945549
Bug: 146144180
Test: m
Change-Id: I4a07978c7a84a0a7e841b9e059305b0f443d0e95
Suggested-by: Ryan Prichard <rprichard@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-12-16 09:55:05 -08:00
Anton Hansson
37a037e05e Verify updatable jars are in PRODUCT_BOOT_JARS
A jar should never be in just the updatable list.

Test: treehugger
Change-Id: I806eb2d00502f98aa2c40fba3fc644cfddc64ad9
2019-12-16 11:27:18 +00:00
Treehugger Robot
8e3bc2d4ce Merge "Adding missing dependencies for vbmetaimage-nodeps" 2019-12-16 04:47:56 +00:00
Dan Willemsen
6fe297fcc5 Merge "Write list of copy headers" 2019-12-15 00:04:15 +00:00
Dan Willemsen
79a0caff35 Write list of copy headers
So that soong_ui can remove obsolete headers that have been removed.

Test: cat out/target/product/crosshatch/.copied_headers_list
Test: cat out/target/product/generic/.copied_headers_list
Change-Id: I7df8029c1f2ed630d35c357f94e5dfb668e5824f
2019-12-13 19:35:05 -08:00
Treehugger Robot
793147469e Merge "Initialize common_proguard_flags for each module" 2019-12-14 02:52:59 +00:00
Colin Cross
2a40672597 Initialize common_proguard_flags for each module
Id938aa35e87c9c69769a3184dfea06fd02299688 removed the initial
assignment to common_proguard_flags, which both makes it grow as
each module is parsed and also turns it into a lazily evaluated
variable.  That causes the flags passed to R8 to be the flags
computed for the current module multiplied by the number of previously
parsed modules.

Fixes: 146150575
Test: m checkbuild
Change-Id: I87c9625496f482896be6867124f2f12ff662cd57
2019-12-13 16:23:11 -08:00
Treehugger Robot
ed7d5f12e3 Merge "Make AOSP master use AOSP.MASTER as BUILD_ID." 2019-12-13 22:49:08 +00:00
Oliver Nguyen
f0fdf80540 Add CLANG_COVERAGE build flag to soong config.
Bug: 143977934
Test: m CLANG_COVERAGE=true
Change-Id: Ief6302a1724a9e8d5bd1a48ded4eb7d15ddf18de
2019-12-11 14:58:53 -08:00
Jooyung Han
9efe534ef1 Add PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
For GSI targets, this variable is set true, and Soong will install both
"flattened" and "unflattened" APEXes together in /system_ext and /system
respectively.

Bug: 137802149
Test: lunch aosp_arm64-userdebug && m
  resulting apex images under /system/apex
  and flattened apexes under /system/system_ext/apex

Change-Id: Ib72d1b9dbd59727942da39323ee7e60ac6e14882
2019-12-12 02:04:43 +09:00
Xin Li
75f604f581 Make AOSP master use AOSP.MASTER as BUILD_ID.
Bug: 145935472
Change-Id: I8a5443ca59414ceccd4bd75e954793678f64e427
Merged-In: I1d718255fc30b255fc83ac79233ec440074084c4
2019-12-10 16:21:50 -08:00
Bowgo Tsai
6a4eaa57b9 Adding missing dependencies for vbmetaimage-nodeps
Bug: 143513520
Test: `make vbmetaimage-nodeps` then checks the value of
      PRIVATE_AVB_VBMETA_SIGNING_ARGS appears in ./out/verbose.log.gz

Change-Id: I2eac2b2d319a46f3c3ecb56df8c6b56925a4d596
2019-12-10 15:08:24 +08:00
Aurimas Liutikas
743c9c3b6b Move to using full java-lib-files from stubs.
java-lib-header-files (turbine) differ from java-lib-files (actual metalava
output) in how the private constructors are showing up in these jars.

in classes.jar android/telephony/AccessNetworkConstants.class
package android.telephony;

public final class AccessNetworkConstants {
    private AccessNetworkConstants() {
        throw new RuntimeException("Stub!");
    }
}

in classes-header.jar android/telephony/AccessNetworkConstants.class
package android.telephony;

public final class AccessNetworkConstants {
}

As you can see, turbine seems to skip adding the private constructor,
which means that it becomes public.

Bug: 145933077
Test: m out/target/common/obj/api.xml
      out/target/common/obj/api.xml -> no longer has public constructor
      for AccessNetworkConstants

Change-Id: Ie1763783667b41b9892c9c47e6b362d7962caf14
2019-12-09 16:36:15 -08:00
Logan Chien
1429291d9f Enable prebuilt ELF check for all targets
This commit enables prebuilt ELF checks on ALL targets.

If this commit breaks your target, you may triage the breakage by adding
the following setting to your `BoardConfig.mk`:

    BUILD_BROKEN_PREBUILT_ELF_FILES := true

And then fix the problem with the instructions:

    https://source.android.com/devices/architecture/vndk/abi-use-check

Bug: 141176116
Bug: 145925470
Test: for t in ${ALL_TARGETS}; do lunch $t; make check-elf-files; done
Change-Id: I62e0269074afe1d685cb63d5f8953a2acf03f03e
2019-12-09 14:00:25 -08:00
Treehugger Robot
9e0b4ed82a Merge "Improve checks for include dirs outside the source tree" 2019-12-06 21:49:25 +00:00
Ian Kasprzak
c99726bcf0 Merge "Include all system images in -with-license.sh" 2019-12-06 17:10:48 +00:00
Ivan Lozano
deaf3fc74a Merge "Exclude dirs from binder interface whitelisting" 2019-12-06 02:25:10 +00:00