Commit graph

22246 commits

Author SHA1 Message Date
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
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
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
Ian Kasprzak
8f9b3c196c Include all system images in -with-license.sh
Rename artifact to not use -img- which conflicts w/ TF
test filters.

Bug: 125451157
Test: Verified phone flash works with new with-license artifact.
Change-Id: I7dd4eb17a24f1bf36926a83939f69681ff8b26ad
2019-12-05 15:51:24 -08:00
Calin Juravle
64daf2e02a Merge "Add art dexpreopt to boot.zip archive" 2019-12-05 22:11:28 +00:00
Dan Willemsen
0cb422f0e7 Improve checks for include dirs outside the source tree
See the Changes.md addition for more details.

Test: treehugger (build_test on downstream branches)
Change-Id: I6ad6b454a6fccf93772fda26cfc7dd6bbfc07c40
2019-12-05 13:11:04 -08:00
Yifan Hong
dc0b50b2d5 Merge "Mark BOARD_HAL_STATIC_LIBRARIES as obsolete." 2019-12-05 20:11:32 +00:00
Ivan Lozano
b18979aa20 Exclude dirs from binder interface whitelisting
Exclude vendor/ and hardware/ from the manually written binder interface
whitelist.

Bug: 136279235
Test: interfaces in excluded directories are not checked against whitelist.
Change-Id: I71152995466a25e92b6d0b153538ebfc1b252f5b
2019-12-05 12:09:38 -08:00
Treehugger Robot
d97822a5f7 Merge "Remove passing -forceprocessing flag to R8" 2019-12-05 08:56:38 +00:00
Calin Juravle
abdea2183d Add art dexpreopt to boot.zip archive
Test: m out/target/product/generic_arm64/boot.zip
Bug: 144491400
Change-Id: Id5f14efbbdf539f9f61599f2fbbc1a302334bb9a
2019-12-04 16:50:17 -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
Treehugger Robot
e16258ff5d Merge "Merge Android10 QPR1 into AOSP master" 2019-12-03 23:15:06 +00:00
Treehugger Robot
c4fbb3a42d Merge "Add rust_device_test_config_template.xml" 2019-12-03 21:19:12 +00:00