Commit Graph

42111 Commits

Author SHA1 Message Date
Dan Willemsen 62db0f0945 Deprecate implicit make rules
Test: mm
Test: view docs in gitiles
Change-Id: I1ced4b4218c733b5b5b771d626b20eb6fb22f0df
2018-06-20 16:52:10 -07:00
Colin Cross 375d9618f6 Merge "Merge LOCAL_STATIC_ANDROID_LIBRARIES manifests" 2018-06-20 23:24:52 +00:00
Tao Bao 8acf3c302b Merge "releasetools: Skip signing APKs with given prefixes." 2018-06-20 23:23:33 +00:00
Yifan Hong 560890b29f Merge "Revert "Verify init scripts for correctness during build"" 2018-06-20 22:56:39 +00:00
Tom Cherry d15e50022f Revert "Verify init scripts for correctness during build"
This reverts commit 03303f97be.

Reason for revert: Mac build

Change-Id: Iadd76491307534fde81d3d917876c603a0658fb9
2018-06-20 22:45:14 +00:00
Treehugger Robot 562a82f521 Merge "emulator sdk_phone_x86/_64: Add EmulatorSmokeTests" 2018-06-20 22:11:53 +00:00
Allen Hair 906da1b5df Distribute XML formatted API files as part of the coverage build.
Bug: 110485176
Test: m -j32 droid dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true tests
Change-Id: I151afde05de832cab06421ffe0829f07e60aceb8
2018-06-20 14:59:57 -07:00
Tao Bao 93c2a01268 releasetools: Skip signing APKs with given prefixes.
We may pack prebuilts that end with ".apk" into target_files zip, via
PRODUCT_COPY_FILES. META/apkcerts.txt won't contain the cert info for
such files, and we want to keep them as is while signing, despite of the
".apk" extension.

This CL adds "--skip_apks_with_path_prefix" option to
sign_target_files_apks.py. APKs with matching prefixes will be copied
verbatim into the signed images. The prefix should match the entry names
in the target_files (e.g. "SYSTEM_OTHER/preloads/"). The option may be
repeated to specify multiple prefixes.

Note that although we may skip signing an APK file with "-e ApkName=".
This would skip *all* the APK files with the matching basename.
"--skip_apks_with_path_prefix" allows matching the exact prefix.

For example:
$ ./build/make/tools/releasetools/sign_target_files_apks.py     \
    --skip_apks_with_path_prefix SYSTEM_OTHER/preloads/         \
    --skip_apks_with_path_prefix PRODUCT/prebuilts/PrebuiltApp1 \
    --skip_apks_with_path_prefix VENDOR/app/PrebuiltApp2.apk    \
    target_files.zip                                            \
    signed-target_files.zip

Bug: 110201128
Test: Run the command above and check the logs.
Test: `python -m unittest test_sign_target_files_apks`
Change-Id: I7bd80b360917cef137cf1e7e8cfa796968831f47
2018-06-20 13:49:57 -07:00
Yifan Hong 2b6939e7e9 emulator sdk_phone_x86/_64: Add EmulatorSmokeTests
Fixes the build.

Test: make -j110 PRODUCT-sdk_x86-sdk showcommands dist \
   DIST_DIR=out/dist/git_master-without-vendor-linux-sdk_x86-sdk sdk_repo

Test: make -j110 PRODUCT-sdk_x86_64-sdk showcommands dist \
    DIST_DIR=out/dist/git_master-without-vendor-linux-sdk_x86_64-sdk sdk_repo

Change-Id: I67da40fc88b67cde0f8f959c13aa68dc0271da2a
Merged-In: I63bc56ba69d313515ec3a1c73206f9a125a697ab
2018-06-20 13:33:00 -07:00
Makoto Onuki 0816dc15cc Merge "Envsetup: Add way to skip installing completions" 2018-06-20 17:32:50 +00:00
Anton Hansson 8bc96c162c Merge "Delete core_tiny.mk" 2018-06-20 17:15:53 +00:00
Anton Hansson ef2972781c Merge changes Ie56e22be,I1353aa24,I7b0b4d0e,I63bc56ba
* changes:
  Remove core.mk.
  Remove sdk_base.mk.
  emulator: add host tools to sdk_phone_x86/64
  emulator: base sdk_phone_x86/64 images on aosp
2018-06-20 17:12:04 +00:00
Tom Cherry 8075746865 Merge "Verify init scripts for correctness during build" 2018-06-20 17:06:11 +00:00
Treehugger Robot 6ae08c1416 Merge "aosp_x86_arm builds have overriding commands" 2018-06-20 16:53:56 +00:00
Treehugger Robot d7c3dd8a0d Merge "Fix UML build" 2018-06-20 16:53:02 +00:00
Tao Bao 2ba547a1c7 Merge "releasetools: Factor out the check for (compressed) APK file." 2018-06-20 16:11:04 +00:00
Anton Hansson a7b36449eb Delete core_tiny.mk
There are no descendants of this mk in AOSP. Move the content that was
shared with core_minimal.mk to base.mk (ContactsProvider and
DefaultContainerService)

Bug: 80410283
Test: diff product variables with multiproduct_kati
Change-Id: I95431b3db789e9c347bb37109a3ac7f627025f96
Merged-In: I95431b3db789e9c347bb37109a3ac7f627025f96
2018-06-20 15:09:41 +01:00
Anton Hansson 19fc0e3c2b Remove core.mk.
It only has one mk inheriting it now, so it's redundant. Push its
packages into the single child (generic_no_telephony.mk).

Bug: 80410283
Test: diff product variables with multiproduct_kati
Change-Id: Ie56e22be7f43558fdd259c808e5a6a937bd12ea6
Merged-In: Ie56e22be7f43558fdd259c808e5a6a937bd12ea6
(cherry picked from commit 57000e3c79)
2018-06-20 14:42:30 +01:00
Anton Hansson 52b38791b7 Remove sdk_base.mk.
Not used anymore, and it's in pretty bad shape, so delete it.

Bug: 80410283
Test: N/A.
Change-Id: I1353aa24024ece38857be6b489d36b0a612355cb
Merged-In: I1353aa24024ece38857be6b489d36b0a612355cb
(cherry picked from commit f65e806618)
2018-06-20 14:42:02 +01:00
bohu 68606832c0 emulator: add host tools to sdk_phone_x86/64
Fix sdk_x86-sdk build breakage that requires host tools.

BUG: 109716817
Test: make -j110 PRODUCT-sdk_x86-sdk showcommands dist DIST_DIR=git_master-without-vendor-linux-sdk_x86-sdk/4821124 sdk_repo
Change-Id: I7b0b4d0e3b2c79bad305bc11a5c1d04eb1f2bdd1
Merged-In: I7b0b4d0e3b2c79bad305bc11a5c1d04eb1f2bdd1
(cherry picked from commit 62d494b3fd)
2018-06-20 14:34:50 +01:00
bohu 1829eb172e emulator: base sdk_phone_x86/64 images on aosp
BUG: 79941736

this cl only impacts emulator images

Test: lunch sdk_phone_x86; m; emulator boots
Change-Id: I63bc56ba69d313515ec3a1c73206f9a125a697ab
Merged-In: I63bc56ba69d313515ec3a1c73206f9a125a697ab
(cherry picked from commit c5e25e9b84)
2018-06-20 14:11:32 +01:00
Dan Willemsen 5250840358 aosp_x86_arm builds have overriding commands
This product has warnings about overriding build commands, which means
that there are multiple instructions on how to build a file, and we've
just picked one of them. Which one we pick is usually stable, but it can
change.

Bug: 77611511
Test: turn default to false, aosp_x86_arm still uses a warning
Change-Id: Id821c04e3dd6a1f69ea748827c3570a751b4e1dd
2018-06-19 23:25:16 -07:00
Dan Willemsen 406418d055 Fix UML build
If there aren't any boot dex files, we can't generate a boot image
profile.

Test: lunch uml-eng; m
Test: diff build-aosp_arm.ninja
Change-Id: I09cc1ef37379d9d353958c8aa75731f3d29df759
2018-06-19 23:03:34 -07:00
Treehugger Robot dabf1a0c5a Merge "Export SDK library names" 2018-06-20 05:40:09 +00:00
Bo Hu 9379de6756 Merge "Revert "Revert "emulator: base sdk_phone_armv7/64 on aosp""" 2018-06-20 05:04:22 +00:00
bohu 19481ce902 Revert "Revert "emulator: base sdk_phone_armv7/64 on aosp""
This reverts commit c82af2f6a9.

Change-Id: I62ce24e5b58b15b0c9026ebfea23860ec2f9bfae
2018-06-19 21:32:05 -07:00
Jiyong Park 1cf8ee619b Export SDK library names
A java module exports SDK library names that it is using directly or
indirectly via its dependencies. Manifest fixer uses the SDK lib names
to automatically add <uses-library> tags for the apk.

The SDK library names are exported via exported-sdk-libs file in make.
From Soong, they are exported via LOCAL_EXPORT_SDK_LIBRARIES flag.

Bug: 77575606
Test: m -j

Change-Id: I4e7a9bdc5bf845af85168abf55f8063900bacc72
2018-06-20 11:50:06 +09:00
Bo Hu 6291a4a258 Merge "Revert "emulator: base sdk_phone_armv7/64 on aosp"" 2018-06-19 22:25:31 +00:00
Bo Hu c82af2f6a9 Revert "emulator: base sdk_phone_armv7/64 on aosp"
This reverts commit b12abf0310.

Reason for revert: broke sdk build

Change-Id: Ib04df196806488245259f797eb9f52e61f337715
2018-06-19 22:19:47 +00:00
Tao Bao 11f955c506 releasetools: Factor out the check for (compressed) APK file.
Test: Run sign_target_files.py to sign a target_files.zip.
Test: `python -m unittest test_sign_target_files_apks`
Change-Id: Ie795d1bce7bae6af427832283e3d10bfecad80c5
2018-06-19 14:50:23 -07:00
Bo Hu 5ce1e519ea Merge "emulator: base sdk_phone_armv7/64 on aosp" 2018-06-19 20:39:26 +00:00
Dan Willemsen 949404a65b Merge changes I101ced40,If9a4bed2
* changes:
  Fix PHONY uses found by --warn_real_to_phony
  Fix vndk packaging to stop depending on phony targets
2018-06-19 20:35:57 +00:00
Vishwath Mohan ab0c76c869 Merge "Add Scudo support for Make" 2018-06-19 19:09:56 +00:00
bohu b12abf0310 emulator: base sdk_phone_armv7/64 on aosp
Switch to GSI images for arm/arm64 sdk images.

BUG: 79941736

This cl does not impact real device images

Test: make -j110 PRODUCT-sdk_phone_armv7-sdk showcommands dist \
DIST_DIR=git_master-without-vendor-linux-sdk_x86-sdk sdk_repo

Change-Id: Ia50be068cc5e5307cdf7ee3a8e11014ed8019992
Merged-In: Ia50be068cc5e5307cdf7ee3a8e11014ed8019992
2018-06-19 11:51:31 -07:00
Colin Cross aac18a02d9 Merge "Revert "Revert "Inject minSdkVersion from the build system""" 2018-06-19 18:14:39 +00:00
Kostya Kortchinsky 2cfa99722b Add Scudo support for Make
Scudo is a hardened usermode allocator that is part of LLVM's compiler-rt
project (home of the Sanitizers). clang allows for -fsanitize=scudo as a
possible command line option to link the shared Scudo library to a binary.

This patch add Scudo as a potential sanitize option. Scudo is not compatible
with ASan and TSan and will be disabled if either is enabled.

Test: aosp compiled with m -j
Test: local experiment with LOCAL_SANITIZE := scudo to ensure that a test
target (mediaserver) could be linked with scudo.

Change-Id: I462843b9d5512fba2c4a3ac1a0c356ca90bce4e5
2018-06-19 09:46:35 -07:00
Dan Willemsen 14e1026372 Fix PHONY uses found by --warn_real_to_phony
Switch a use of `ndk` to the timestamp file that `ndk` depends on
itself.

Mark more module-specific rules as PHONY.

Test: diff build-aosp_arm.ninja (stripping _kati_always_build_)
Test: Turn on --warn_real_to_phony for Kati, see fewer warnings
Change-Id: I101ced4067780e38d18820f5d916596429087e49
2018-06-19 09:26:58 -07:00
Dan Willemsen 649311868c Fix vndk packaging to stop depending on phony targets
These had been depending on the phony target for the library
(liblz4.vendor), not the actual built file and notice file.

Since we hadn't been saving the NOTICE file, and were only assuming the
installed notice file path. save that away for use during packaging.

Test: m vndk; diff out/target/product/generic/android-vndk-aosp_arm.zip
Test: m vndk; diff out/target/product/generic_arm64/android-vndk-aosp_arm64.zip
Change-Id: If9a4bed27030b7bd464cd3987739df94d32a0037
2018-06-19 09:26:58 -07:00
Anton Hansson f16031cfec Merge "Remove embedded.mk" 2018-06-19 12:44:59 +00:00
Anton Hansson 32e70da517 Remove embedded.mk
The common mk files form a long chain of generic sounding names that
don't make much sense. For instance, embedded, base, core_minimal, core
and core_base all inherit each other, but there's no logical ordering
of these names.

The common mks will be split based on destination partition, which will
create many new files. Merging some of the common ones before this split
keeps the total number of mks under control.

There are only 2 products inheriting this mk excluding base.mk (which
has over 300 descendants). The other levels in the hierarchy all have
multiple device categories rooted at them (e.g. wearables from base.mk,
tvs and cars from core_minimal.mk), but embedded.mk has not which
makes it a compelling target to remove.

Bug: 80410283
Test: diff products variables with multiproduct_kati
Change-Id: I35c05973dfefefb7a31686476215386b8b89a557
Merged-In: I35c05973dfefefb7a31686476215386b8b89a557
Merged-In: I2e25032645c87f084f911e14fade16bc802ff457
2018-06-19 10:40:01 +00:00
Treehugger Robot 2a07d562ac Merge "Build System: fix autogen_test_config problem" 2018-06-19 01:09:17 +00:00
Sundong Ahn a059c71348 Support java sdk libraries
Sdk addon has been allowed for libraries built with Android.mk. But some
of the libraries included in the Sdk addon should be built with
java_sdk_library. module-stubs-files function is modified for supporting
java_sdk_library modules.

Bug:77577799
Test: make -j
Change-Id: If289e5aa5b5016901ff9b69da8fc7f7d8138a456
2018-06-19 10:02:25 +09:00
Dan Willemsen eb0a09acf3 Merge "Restrict / from module names" 2018-06-18 22:44:44 +00:00
Makoto Onuki da97106284 Envsetup: Add way to skip installing completions
Skip installing completion if ENVSETUP_NO_COMPLETIONS is set to 1.

Test: Following command with debug log added:
$ ENVSETUP_NO_COMPLETION=adb:fastboot:bit . build/envsetup.sh -> no completion installed
$ ENVSETUP_NO_COMPLETION=adb . build/envsetup.sh -> adb completion isn't installed
$ ENVSETUP_NO_COMPLETION=a . build/envsetup.sh -> all completions installed
$ ENVSETUP_NO_COMPLETION=fastboot . build/envsetup.sh -> fastboot completion isn't installed

Change-Id: I9f907585a1d2413f55ffcb6c7c01e49d1b55a3e0
2018-06-18 15:35:40 -07:00
Colin Cross 2d61e47f88 Revert "Revert "Inject minSdkVersion from the build system""
This reverts commit 4cd1a75d17.

PackageParser no longer treats minSdkVersion=Q as targetSdkVersion=Q
when targetSdkVersion is set to a number.

Bug: 110167203
Bug: 110353795
Change-Id: Ib44743e4c49e59cd29a57af1bf885090e380b1b6
2018-06-18 20:18:37 +00:00
Colin Cross 71c0434af2 Merge "Revert "Inject minSdkVersion from the build system"" 2018-06-18 18:35:41 +00:00
Colin Cross 4cd1a75d17 Revert "Inject minSdkVersion from the build system"
This reverts commit fae93680fa.

Bug: 110167203
Bug: 110353795
Change-Id: I14c71aec5a54ef055fc8d2b3560754c81f3d68ba
2018-06-18 18:35:00 +00:00
Dan Willemsen ac92659e0f Restrict / from module names
Since this is a directory separator, it causes a good deal of
strangeness in the build whenever we include a module name in a path.

It becomes particularly problematic if used together with ".."

Test: build_test on downstream branches
Change-Id: I344eca0db3346cd6ffabff767c34159c85ebc051
2018-06-16 14:15:50 -07:00
Colin Cross 16f1dbc43c Merge LOCAL_STATIC_ANDROID_LIBRARIES manifests
Pass LOCAL_STATIC_ANDROID_LIBRARIES to ManifestMerger, and copy
manifests for prebuilts AARs and static android libraries to
$(intermediates.COMMON)/manifest/AndroidManifest.xml.

Bug: 78447299
Test: m java
Change-Id: I02ac29d3445fcd591101ff0ce215e60dd0997224
Merged-In: I02ac29d3445fcd591101ff0ce215e60dd0997224
Merged-In: Ib20aa4849978283f1da1ce601b28199fc0183e05
2018-06-16 07:55:41 -07:00
Colin Cross 500fccebf7 Merge "Inject minSdkVersion from the build system" 2018-06-15 22:53:52 +00:00