Commit Graph

41911 Commits

Author SHA1 Message Date
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 500fccebf7 Merge "Inject minSdkVersion from the build system" 2018-06-15 22:53:52 +00:00
Treehugger Robot 7f0ac95d21 Merge "Set proper CPU variant for aosp_arm" 2018-06-15 20:19:10 +00:00
Isaac Chen e44b0d96b9 Set proper CPU variant for aosp_arm
System image of aosp_arm products is the new GSI in Pi.
Its arch variants need to be the same as the legacy GSI built
with aosp_arm_ab so it can pass related CTS/VTS tests.

Bug: 80401108
Test: $ lunch aosp_arm-userdebug; m -j; emulator # booted OK
      $ lunch aosp_arm-userdebug; m -j cts

Change-Id: I29fffca3e02a2251913a327b54640fc622e77a8d
Merged-Id: I29fffca3e02a2251913a327b54640fc622e77a8d
(cherry picked from commit b2e58893c3)
2018-06-15 18:40:42 +00:00
Colin Cross 5d80834b32 Merge "Add LOCAL_DONT_MERGE_MANIFESTS" 2018-06-15 18:23:44 +00:00
Treehugger Robot c11f2ff4d5 Merge "Move merged AndroidManifest.xml file to manifest subdirectory" 2018-06-15 18:19:12 +00:00
Tom Cherry b6b2d49e23 Merge "Always create /vendor/etc/{passwd,group}" 2018-06-15 17:04:16 +00:00
Treehugger Robot b6a2565382 Merge "Move pid, stacks from envsetup.sh to dedicated scripts." 2018-06-15 15:43:37 +00:00
Anton Hansson 984e93a450 Merge "Move a few packages from core_minimal.mk to base.mk." 2018-06-15 09:08:33 +00:00
Anton Hansson 9d2c04e39c Merge "Add support enforcing all path requirements." 2018-06-15 09:08:10 +00:00
Colin Cross 8b4c72dc1c Merge "Dist installed-files*.json" 2018-06-15 05:01:54 +00:00
Treehugger Robot 1ce8617482 Merge "Remove com.android.location.provider.xml" 2018-06-15 03:41:18 +00:00
Treehugger Robot 4f22abd334 Merge "Fix stacks for Java processes." 2018-06-15 00:31:07 +00:00
Josh Gao 896a546663 Move pid, stacks from envsetup.sh to dedicated scripts.
Make it so that these can be used in other scripts by moving them from
functions defined in envsetup.sh to standalone scripts.

Test: stacks zygote64
Change-Id: Id8e5ce5b4da80e57f4226eb34edaf82b87393834
2018-06-14 16:36:56 -07:00
Josh Gao ab1e09a6b0 Fix stacks for Java processes.
Fix stacks for the change in ANR trace location by using `debuggerd -j`
instead of manually fetching the traces file.

Also, dump zygote/zygote64 as native processes, since they don't
respond to SIGQUIT.

Test: stacks zygote
Test: stacks adbd
Test: stacks com.android.settings
Change-Id: I015458bdc2dd45624940204d42614365aacf8304
2018-06-14 15:35:53 -07:00
Colin Cross 23dded0ffd Dist installed-files*.json
installed-files*.json provides hashes of each file, which will allow
a quick comparison of what has changed between builds.

Test: m checkbuild
Change-Id: I87f6c1fa89aaa83c7bcc7cbefb799e9e26d7bfa5
2018-06-14 14:51:20 -07:00
Colin Cross fae93680fa Inject minSdkVersion from the build system
Add a script that can inject a <uses-sdk minSdkVersion=""> into
AndroidManifest.xml files.  This will help with merging
LOCAL_STATIC_ANDROID_LIBRARIES, because ManifestMerger treats
a missing minSdkVersion as minSdkVersion=1 and throws errors
if libraries use a larger minSdkVersion.  It will also help
with cases where an app has a manifest that specifies an old
minSdkVersion, but the build system is compiling the app in
a way that is not compatibile with old devices, for example
using a newer dex format.

Bug: 110167203
Test: m java
Change-Id: Ia60d462e8af9e93c57d75f423207fa8d221b1347
2018-06-14 14:38:54 -07:00
Colin Cross 1d46e8abb4 Add LOCAL_DONT_MERGE_MANIFESTS
Some modules have manifests that ManifestMerger doesn't like, and
don't need manifest merging.  Skip manifest merger if
LOCAL_DONT_MERGE_MANIFESTS is set.

Bug: 78447299
Test: m checkbuild
Change-Id: If1a58253c62e0194a6acfd79930b9bb10978abe5
2018-06-14 14:38:54 -07:00
Colin Cross e1b4f302e5 Move merged AndroidManifest.xml file to manifest subdirectory
Some modules generate their own custom AndroidManifest.xml file
to $(intermediates.COMMON)/AndroidManifest.xml file.  Move the
build system's location to
$(intermediates.COMMON)/manifest/AndroidManifest.xml.

This location will also be used later for finding manifest files
from LOCAL_STATIC_ANDROID_LIBRARIES dependencies.

Bug: 78447299
Test: m checkbuild
Change-Id: I345f079bdd191451333b38d882418f2f7150b1e9
Merged-In: I345f079bdd191451333b38d882418f2f7150b1e9
(cherry picked from commit 00a6348e7dfa4fafc308ab92d8e7d06dcfcd01ba)
2018-06-14 14:38:54 -07:00
Tom Cherry 53940fd2ba Always create /vendor/etc/{passwd,group}
Previously we only created these if the device set
TARGET_FS_CONFIG_GEN, however there are now other targets that want to
depend on these.  Instead of having those targets conditionally depend
on them, we always create them, defaulting to blank contents (by
reading /dev/null for TARGET_FS_CONFIG_GEN).

Test: builds succeed
Change-Id: Ie95286f5a800d891022eb66cd6fefcc967000c2e
2018-06-14 13:29:32 -07:00
Treehugger Robot 6021800c45 Merge "Use implicit output for prebuilt aar manifests" 2018-06-14 19:48:37 +00:00
Anton Hansson be371e1656 Move a few packages from core_minimal.mk to base.mk.
All the products that inherit from base.mk add these packages, so moving
them up the hierarchy eliminates some duplication.

    DownloadProvider
    idmap
    libneuralnetworks
    mdnsd
    MediaProvider

Bug: 80410283
Test: diff all product variables with multiproduct_kati
Change-Id: I133a385b3bc64261d73f616c416f7a905675c09d
Merged-In: I133a385b3bc64261d73f616c416f7a905675c09d
2018-06-14 16:39:17 +01:00
Anton Hansson 427d855728 Add support enforcing all path requirements.
Setting PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS to be non-empty will
verify that when an inherited product file makes an path requirement
claim, no files other than the ones it produces are allowed inside its
paths. This allows more rigorous control of what goes where, and
specifically stops accidental inclusion of modules in the wrong places
(which is very easy to do otherwise).

In order to enable iterative improvements to current offenders, support
for a whitelist is also added (via the new
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST property). Verification is
done that this variable corresponds to exactly the list of current
offenders.

Example use:
  PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
  PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := system/priv-app/Dialer/Dialer.apk

Bug: 80410283
Test: In a downstream CL specifying the above.
Change-Id: I58047db08bde34da21759cfc55f398892b1c809a
2018-06-14 11:35:05 +01:00
Anton Hansson 2b0ea222c1 Merge "Add a new macro for products to make artifact path requirements." 2018-06-14 10:32:43 +00:00
Anton Hansson df832133ad Merge "Extract the product to file mapping logic to a macro." 2018-06-14 10:10:42 +00:00
Anton Hansson f93d674ac3 Merge "Dedupe packages in mk's that inherit core_minimal.mk" 2018-06-14 07:57:52 +00:00
Treehugger Robot 6eb060785b Merge "fs_config_generator: use vendor shell for vendor AID" 2018-06-14 03:28:32 +00:00
Sundong Ahn 8970f61d99 Remove com.android.location.provider.xml
The com.android.location.provider.xml is removed from the
PRODUCT_PACKAGES, because xml files will be generated and installed by
soong.

Bug:77577799
Test: make -j
Change-Id: Idfbc6b09ca4337795277df8b98c73f6fd5865aff
2018-06-14 11:15:20 +09:00
Treehugger Robot ea01e649d7 Merge "mma in dirs w/o Android.(mk|bp) in ancestor dir" 2018-06-14 00:58:52 +00:00
Treehugger Robot 2371a7d60e Merge "Support shared library in recovery mode" 2018-06-13 23:14:29 +00:00
Steven Moreland 3b99ecfbab mma in dirs w/o Android.(mk|bp) in ancestor dir
Many Android.bp files are now no longer needed (since they
are all scanned and subdirs are deprecated), so there are many
places in a tree where they aren't hit.

This still suffers from one bug, given this directory structure:
 A/B/Android.bp
 A/B/C/D/Android.bp
 A/B/C/
 A/B/C/E/Android.bp

if you call 'mma' from 'A/B/C', then it will make
MODULES-IN-A-B.

However, for now, this change makes it so given the following
directory structure:
 A/B/C/D/Android.bp
 A/B/C/
 A/B/C/E/Android.bp

if you call 'mma' from 'A/B/C', then it will make
MODULES-IN-A-B-C as expected (since there are no makefiles in
parent directories). This is the expected behavior in this case
and it is common in directories where Android.bps have been
removed (since they only referenced subdirs) or outside of
git projects.

The reason why this usecase is supported is so that given this:
A/B/C/D/Android.bp
A/B/C/D/include/D/foo.h

You can, from A/B/C/D/include/D/ (for instance) do an mma, and
it will still make the modules defined in A/B/C/D/ which are
presumably related to this.

This change doesn't fix mm or other binaries. In the long term,
either we should just consider mma to make the current directory
(and not look for parent directories for the above 'feature') or
we should move more of the complexity in the build system itself
so that it can intelligently find the first parent directory
which contains a makefile in a subdirectory.

Fixes: 65407300
Test: mma from following dirs
    system/tools/hidl/test/hash_test/bad/hash/1.0 MODULES-IN-system-tools-hidl-test-hash_test
    system/tools/hidl/test/hash_test/             MODULES-IN-system-tools-hidl-test-hash_test
    system/                                       MODULES-IN-system
    hardware/ril/                                 MODULES-IN-hardware-ril

Change-Id: I072d3f382d40cd360ec3d14f8f5b060a4bde9289
2018-06-13 15:34:19 -07:00
Bo Hu 82de42067e Merge "emulator: move sepolicy to goldfish project" 2018-06-13 22:14:32 +00:00
Colin Cross 5c1a27f30f Use implicit output for prebuilt aar manifests
Remove my_full_libs_manifest_deps by making AndroidManifest.xml an
implicit output of the prebuilt aar unzipping rule.

Bug: 78447299
Test: m checkbuild
Change-Id: I26934d16fd646d45bf57c9527dbb191112cb627b
Merged-In: I26934d16fd646d45bf57c9527dbb191112cb627b
(cherry picked from commit 2b5829e1a6)
2018-06-13 12:34:51 -07:00
bohu 4001858313 emulator: move sepolicy to goldfish project
The sepolicies are emulator specific and are installed
under vendor partition, move them to the right location.

BUG: 110030159
Change-Id: I6acc27a3b787a3fafd9373c84492537185b184c5
Merged-In: I6acc27a3b787a3fafd9373c84492537185b184c5
2018-06-13 18:37:16 +00:00
Chih-hung Hsieh 504656816d Merge "Third try to enable clang lld as default linker." 2018-06-13 18:21:03 +00:00
Anton Hansson 837425b0c0 Add a new macro for products to make artifact path requirements.
When a product adds a path requirement, the build system will verify
that all its artifacts are produced inside these paths, and fail
otherwise.

The paths are all relative to PRODUCT_OUT, and the macro also supports
giving a whitelist, for known existing offenders in the hierarchy. The
build will fail if redundant whitelist entries are present.

Example invocation:
_paths := $(TARGET_COPY_OUT_SYSTEM)/
_whitelist := root/init root/init.rc
$(call require-artifacts-in-path $(_paths), $(_whitelist))

Bug: 80410283
Test: Downstream with a new product definition.
Change-Id: I235de681f65254087a42e345af69b2113b682072
2018-06-13 18:48:53 +01:00
Anton Hansson 5efe88df63 Extract the product to file mapping logic to a macro.
This way, the logic can be reused for multiple products during
the same build step. This will be used to track files output
by different subtrees in the product makefile hierarchy.

Bug: 80410283
Test: diff produt_FILES before and after
Change-Id: I6dd1cf586410b9809fdd9d75441128acb07cab08
2018-06-13 18:48:42 +01:00
Treehugger Robot 59c5127bea Merge "Create system.prop for GSI Pi" 2018-06-13 17:48:06 +00:00
Tao Bao 50869f203a Merge "releasetools: Explicitly pass the SHA-1 of source boot image to PatchCheck." 2018-06-13 17:20:36 +00:00
Jiyong Park 53acaeab0a Support shared library in recovery mode
The dyanmic linker and the linker config script for the recovery mode
(*.recovery variants) are added to PRODUCT_PACKAGES.

Also this removes the mountpoint /system_root from the recovery image as the
recovery image is self-contained and the real system image is mounted at
/mnt/system which is created automatically at runtime.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: Ice6c75b0b81bb9be696aaff3e095d87f19278995
2018-06-14 02:03:57 +09:00
Yi Kong cfbe8cf3bb Merge "Fix CLANG_EXTERNAL_CFLAGS logic" 2018-06-13 02:10:12 +00:00
Treehugger Robot 0f494a025b Merge "Restrict characters in module names" 2018-06-12 23:30:47 +00:00
Yi Kong 0047dbed14 Fix CLANG_EXTERNAL_CFLAGS logic
Should be neq instead of eq.

Test: build-full.ninja is now correct
Change-Id: I26c0aa84d9b54a8b19f19124978ac1d49bae7448
2018-06-12 15:49:12 -07:00
Tao Bao 6d8ec5803b releasetools: Explicitly pass the SHA-1 of source boot image to PatchCheck.
Although the SHA-1 of the source boot image has been encoded in the
filename, the updater code currently doesn't extract that and would fail
to find a matching backup from /cache. This could lead to corrupt
install, if it's interrupted while patching the boot image.

Bug: 80630342
Test: Generate an non-A/B incremental package. Verify the script.
Change-Id: Ie2b1a90836c3ccb4758e1a2d9b69a88de94ae0c7
2018-06-12 15:04:08 -07:00
Dan Willemsen bbe6a022a3 Restrict characters in module names
See the Changes.md documentation for more information.

Test: build_test on downstream branches
Change-Id: I1524b1dbfd44a7feac3b9a212f37986f870bd837
2018-06-12 13:48:49 -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
Anton Hansson 5c1dc143cd Dedupe packages in mk's that inherit core_minimal.mk
The following packages are moved up one level, into core_minimal.mk
as all its descendants in master share them:
    ContactsProvider
    DefaultContainerService
    libaudiopreprocessing
    libfilterpack_imageproc
    libgabi++
    libstagefright_soft_aacdec
    libstagefright_soft_aacenc
    libstagefright_soft_amrdec
    libstagefright_soft_amrnbenc
    libstagefright_soft_amrwbenc
    libstagefright_soft_avcdec
    libstagefright_soft_avcenc
    libstagefright_soft_flacdec
    libstagefright_soft_flacenc
    libstagefright_soft_g711dec
    libstagefright_soft_gsmdec
    libstagefright_soft_hevcdec
    libstagefright_soft_mp3dec
    libstagefright_soft_mpeg2dec
    libstagefright_soft_mpeg4dec
    libstagefright_soft_mpeg4enc
    libstagefright_soft_opusdec
    libstagefright_soft_rawdec
    libstagefright_soft_vorbisdec
    libstagefright_soft_vpxdec
    libstagefright_soft_vpxenc
    mdnsd
    requestsync

Bug: 80410283
Test: diffed output of multiproduct_kati with aosp/703385 patched
Change-Id: Ic38f7aea3e865dbd9f170925214e3dea5233e61e
Merged-In: Ic38f7aea3e865dbd9f170925214e3dea5233e61e
2018-06-12 15:25:06 +01:00
Treehugger Robot acbfc3fb94 Merge "Support new hostapd build target without HIDL" 2018-06-12 12:49:49 +00:00
Bo Hu 41e2fd3dd8 Merge "emulator: update aosp sepolicies" 2018-06-12 12:49:43 +00:00
SzuWei Lin 326ad779c1 Create system.prop for GSI Pi
Properties for GSI Pi are not exactly the same as those for legacy GSI.
Create a new gsi_system.prop for GSI Pi to avoid reusing legacy
treble_system.prop used by legacy GSI (aosp_$arch_a(b) products).

Bug: 78605339
Test: build and observe the system/build.prop
Change-Id: I435e33558e244009af9a91a97580fd56591ff6f3
Merged-In: I435e33558e244009af9a91a97580fd56591ff6f3
(cherry picked from commit 3fc49fede8)
2018-06-12 18:03:31 +08:00