Commit Graph

17181 Commits

Author SHA1 Message Date
Sasha Smundak facb360e49 Build kzip for Go files in build/blueprint directory.
Bug: 137798757
Test: manual
Change-Id: If953425c80c60a64ebd6d50dddbac858ef091275
2020-01-16 11:02:17 -08:00
Treehugger Robot 1be2d48005 Merge "Save compilation units in protobuf format." 2020-01-16 18:55:26 +00:00
Treehugger Robot 9c121cd7f3 Merge "Include the hashtree in Q-launched modules." 2020-01-16 12:27:47 +00:00
Anton Hansson eec79ebe03 Default apex_available to //apex_available:platform
This means everything that goes into apexes need to be
explicitly labeled to be available for apex.

Whitelist the current offenders. This list should be
trimmed down.

Bug: 147364041
Test: m
Test: multiproduct_kati -only-soong
Exempt-From-Owner-Approval: cherry-pick from internal
Change-Id: I837299c6a15d46f8a5ba544b613776b1cc27d7b8
Merged-In: I837299c6a15d46f8a5ba544b613776b1cc27d7b8
(cherry picked from commit 93488cbb10d4882845abb732f8e53714f0982031)
2020-01-16 09:14:03 +00:00
Treehugger Robot 8122cf6d09 Merge "List of installed files for each APEX is dist'ed" 2020-01-16 06:38:11 +00:00
Treehugger Robot a35294889f Merge changes I0668ff5a,Iff2d7063,I6f8b1e2d,I126db49d,Ic6582260
* changes:
  Exclude source->prebuilt deps from visibility enforcement
  Dedup package build components registration
  Support registering hard coded pre arch mutators
  Added java_system_modules_import
  Document java_system_modules
2020-01-16 02:09:36 +00:00
Treehugger Robot 0b3a5781a9 Merge "Add basic test for java_system_modules" 2020-01-16 02:03:44 +00:00
Treehugger Robot bb363086c7 Merge "AIDEGen:fix module_bp_cc_deps.json content error." 2020-01-16 00:20:40 +00:00
Jaewoong Jung 275eb69d0a Merge "Keep signatures of presigned prebuilt test apps." 2020-01-15 23:17:02 +00:00
Sasha Smundak 6c2d4f91f8 Save compilation units in protobuf format.
Bug: 146224091
Test: manual
Change-Id: I7a856bab13f54c78efa0061421c3fcb9341bc6e7
2020-01-15 12:40:03 -08:00
Matthew Maurer 5f5809a098 Merge changes I828b3e6b,I5d85ea8b
* changes:
  rust: Do not pass -C prefer-dynamic for cdylib
  rust: Include Soong module name as metadata
2020-01-15 20:28:25 +00:00
Treehugger Robot 0b031cf181 Merge "Disallow system m4" 2020-01-15 19:38:22 +00:00
Matthew Maurer 46c46ccafd rust: Do not pass -C prefer-dynamic for cdylib
cdylib targets cannot currently dynamically link to Rust crates, so this
flag was not actually doing anything, and in conjunction with -C lto
which we *do* want on for this target, causes a hard error on
rustc-1.40.0.

Bug: 147438124
Test: Build a rust_library module, this implicitly tries to build cdylib
Change-Id: I828b3e6bae7c58f4081db3e73009b443a382a296
2020-01-15 08:37:46 -08:00
Matthew Maurer 22cef966e1 rust: Include Soong module name as metadata
If we want to build a component which uses two versions of a crate in
the dependency graph (for example, libc in std and libc from
external/crates), Rust requires at least one of them have a metadata
field to differentiate them.

Since Soong module names should be distinct for a given target, they
should serve as metadata.

Bug: 147397356
Test: Build a rust library with "rlibs: ["liblibc"]" in the blueprint
Change-Id: I5d85ea8b3197972c09de301c9523efaff08adf81
2020-01-15 08:37:42 -08:00
Jaewoong Jung 7c5bd835d0 Keep signatures of presigned prebuilt test apps.
Skip the JNI uncompress step for presigned prebuilt test apps. They
don't need it, and they can invalidate the signature. Also, fix the
install partition of prebuilt test apps.

Fixes: 143472191
Test: app_test.go
Test: Converted CtsShimPrivUpgradePrebuilt to bp and checked the
final output apk signature.

Change-Id: Ied7d3576b5db4de40a9ca9e388336229d07212f5
2020-01-15 14:33:32 +00:00
Paul Duffin 78ac5b962e Exclude source->prebuilt deps from visibility enforcement
When both prebuilt and source versions of a module are present in the
build an implicit dependency is added from source -> prebuilt. This
change excludes that dependency from visibility enforcement as it
provides no value and would otherwise require an sdk snapshot to
rewrite the visibility of the generated prebuilt modules which would
be complicated.

The rewriting would include:
* Detecting //visibility:public and just passing that straight through.
* Detecting //visibility:private and replacing that with the location
  of the source.
* Otherwise, adding the location of the source to the visibility
  property.

This adds a general mechanism to allow any dependency to be excluded
from visibility enforcement by simply using a tag that implements
the ExcludeFromVisibilityEnforcementTag interface.

Bug: 142940300
Test: m nothing
Change-Id: I0668ff5aa798152d17faf3aac1bb8eff8d6350c3
2020-01-15 11:17:57 +00:00
Paul Duffin a7b9f42587 Add basic test for java_system_modules
Bug: 142940300
Test: m nothing
Change-Id: I8855df0832f93e40d31e457191590458c274bb5c
2020-01-15 11:17:57 +00:00
Paul Duffin c132742c96 Dedup package build components registration
Bug: 146540677
Test: m nothing
Change-Id: Iff2d7063b7f06313e9068c61a5627229463c98dd
2020-01-15 11:17:57 +00:00
Paul Duffin a80ef84652 Support registering hard coded pre arch mutators
Some pre arch mutators are hard coded into mutator.go and so could not
share code for registering those mutators between tests and runtime.
This change adds a new HardCodedPreArchMutators(RegisterMutatorFunc)
method to RegistrationContext which allows hard coded mutators to be
registered alongside other build components during init() and testing.

The method is treated as a noop on the InitRegistrationContext and
behaves just like the PreArchMutators(RegisterMutatorFunc) method on
the TestingContext.

Bug: 146540677
Test: m nothing
Change-Id: I6f8b1e2d54d9dc4e86f951ced61d1ee7b0fe4b2e
2020-01-15 11:17:57 +00:00
Paul Duffin 90169baf0e Added java_system_modules_import
A prebuilt version of java_system_modules. It does not import the
generated system module, it generates the system module from imported
java libraries in the same way that java_system_modules does. It just
acts as a prebuilt, i.e. can have the same base name as another module
type and the one to use is selected at runtime.

Bug: 142940300
Test: m nothing
Change-Id: I126db49d18294fcd6e2b7ad0237f83e9c2fdef7a
2020-01-15 11:17:57 +00:00
Paul Duffin cded5ecfc3 Document java_system_modules
Bug: 142940300
Test: m nothing
Change-Id: Ic658226088615dbeeef15f17dbb095a968e0742d
2020-01-15 11:17:57 +00:00
Treehugger Robot 814bebb8ea Merge "Reland^2 "m <apex_name>-deps-info prints the internal/external deps of the APEX"" 2020-01-15 06:12:45 +00:00
bralee adba3c0a0a AIDEGen:fix module_bp_cc_deps.json content error.
Bug: 147324044
Test: 1. export SOONG_COLLECT_CC_DEPS=1 SOONG_GEN_CMAKEFILES=1;m nothing
         module_bp_cc_deps.json will be generated.
	 In module_bp_cc_deps.json,
	 "libui": {
             ...
             "system_include_flags": {
                 "header_search_path": [
                     "system/core/include",
                     "system/media/audio/include",
                     "hardware/libhardware/include",
                     "hardware/libhardware_legacy/include",
                     "hardware/ril/include",
                     "frameworks/native/include",
                     "frameworks/native/opengl/include",
                     "frameworks/av/include",
                     "libnativehelper/include_jni"
                 ]
                 "system_search_path": [
                     "bionic/libc/include",
                     "bionic/libc/kernel/uapi",
                     "bionic/libc/kernel/uapi/asm-x86",
                     "bionic/libc/kernel/android/scsi",
                     "bionic/libc/kernel/android/uapi"
                 ]
             },
             ...
         },

Change-Id: Iabc638ca451f568b2a4c09327f8f3c220f6fc154
2020-01-15 13:38:48 +08:00
Inseob Kim a46c2b1994 Merge "Allow sdk and core modules to use sysprop_library" 2020-01-15 00:32:00 +00:00
Dario Freni e354690448 Include the hashtree in Q-launched modules.
For post-Q modules, we can avoid building the hashtree also in the
unbundled build case, since the device will regenerate the hashtree
locally. This CL simplifies the logic so that the build rules apply
regardless of the build being bundled or unbundled -- after all, bundled
build are only really valid for development purposes.

Fix: 147600151
Test: unit test;
m com.android.conscrypt and manual inspection of apexer invocation
(option no_hashtree not present)
m com.android.neuralnetworks and manual inspection of apexer invocation
(option no_hashtree present)

Change-Id: Ib4cc6149d3beac5df7e23a65a3b7ee6b0d68e395
2020-01-14 23:59:02 +00:00
Anton Hansson ee76fba905 Merge "Make android_test_helper_app support apex_available" 2020-01-14 12:59:17 +00:00
Jiyong Park 83dc74b770 Reland^2 "m <apex_name>-deps-info prints the internal/external deps of the APEX"
This reverts commit 7cb4d378e7.

Test: m
Test: ALLOW_MISSING_DEPENDENCIES=true DIST_DIR=out/dist ./art/tools/dist_linux_bionic.sh -j80 com.android.art.host
(in the master-art-host branch)

Change-Id: I9beca73aafdf42f03bfa19cf1634b2641dac417b
2020-01-14 18:40:56 +09:00
Jiyong Park a7503367cf Merge "Revert "Reland "m <apex_name>-deps-info prints the internal/external deps of the APEX"""" 2020-01-14 08:58:17 +00:00
Jiyong Park 7cb4d378e7 Revert "Reland "m <apex_name>-deps-info prints the internal/external deps of the APEX"""
This reverts commit 956305c61c.

Reason for revert: broke master-art-host branch
Exempt-From-Owner-Approval: reverting a bad change

Change-Id: Id7faed4ee85328c7c65847a3543ea9e67a3d50b3
2020-01-14 08:58:02 +00:00
Inseob Kim c52395135f Allow sdk and core modules to use sysprop_library
This allows javaSdk and javaCore modules to link against Public stub of
Platform owned sysprop_library.

Bug: 141246285
Test: m nothing
Change-Id: Ie11c43cc72ddd0ee13e4163955775c13eb9dbe92
2020-01-14 15:58:59 +09:00
Jiyong Park 3a1602e7f2 List of installed files for each APEX is dist'ed
For each APEX, <apexname>-installed-files.txt is dist'ed to show the
list of files and their sizes that are included in the APEX.

Bug: 147605944
Test: m dist and examine the txt files

Change-Id: I565479523e51280fc88d5fbf8ea3f48ac0ae9fee
2020-01-14 15:20:57 +09:00
Treehugger Robot 17c51a4ff6 Merge "Reland "m <apex_name>-deps-info prints the internal/external deps of the APEX""" 2020-01-14 02:40:42 +00:00
Treehugger Robot 0ed107d542 Merge "Prevent overridden APEX from being installed even when flattened" 2020-01-14 00:57:31 +00:00
Lokesh Gidra 47b461782b Merge "Revert "use symlink for bundled APEX"" 2020-01-14 00:08:15 +00:00
Lokesh Gidra 31c65d4fe4 Revert "use symlink for bundled APEX"
This reverts commit 58ab941c6c.

Reason for revert: art-com_android_runtime_host-linux_bionic and art-linux-bionic-zipapex builds failing (https://android-build.googleplex.com/builds/submitted/6131062/art-com_android_runtime_host-linux_bionic/latest/view/logs/build.log)

Bug: 144533348
Change-Id: I040af6887aea205a5d72a416fc8e6533dcfa08dd
2020-01-14 00:06:41 +00:00
Elliott Hughes 5ce6dfbd36 Merge "Switch to toybox gzip." 2020-01-13 17:21:02 +00:00
Treehugger Robot 40ef4b926d Merge "use symlink for bundled APEX" 2020-01-13 16:05:45 +00:00
Ulyana Trafimovich 4d9c97bd77 Merge "Use boot image extension in the JIT-zygote experiment." 2020-01-13 10:38:01 +00:00
Ulyana Trafimovich 289bd28f17 Merge "Do not add jacocoagent to framework libraries in static coverage builds." 2020-01-13 10:25:16 +00:00
Yo Chiang 72d009e1ec Merge "Don't dexpreopt APEX variant modules" 2020-01-13 03:15:50 +00:00
Treehugger Robot eecf99ce66 Merge "A test cc module is installable even if it's not available for platform" 2020-01-13 00:31:58 +00:00
Jiyong Park 0abc1b484d Prevent overridden APEX from being installed even when flattened
Previously, both overridden APEX and overriding APEX were installed
together when TARGET_FLATTEN_APEX is set to true. This was because the
Make modules for flattened APEXes are phony where
LOCAL_OVERRIDES_MODULES isn't respected.

Fixing the problem by letting apex_manifest.pb for the overriding APEX
to override all modules for the overridden APEXes.

Bug: 147384966
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m dump-files | grep
mediaprovider shows

:   out/target/product/coral/system/apex/com.google.android.mediaprovider/apex_manifest.pb
:   out/target/product/coral/system/apex/com.google.android.mediaprovider/apex_pubkey
:   out/target/product/coral/system/apex/com.google.android.mediaprovider/javalib/framework-mediaprovider.jar
:   out/target/product/coral/system/apex/com.google.android.mediaprovider/lib64/libfuse.so
:   out/target/product/coral/system/apex/com.google.android.mediaprovider/priv-app/MediaProvider/MediaProviderGoogle.apk

only

Change-Id: I6dc3fc7aaee0474cbad9fadbfce765be4b751328
2020-01-12 23:31:56 +09:00
Treehugger Robot ae7cddd5ad Merge "Sandbox soong_build by changing to root directory" 2020-01-11 06:00:21 +00:00
Colin Cross 988414c2cf Sandbox soong_build by changing to root directory
This relands I12a0f907753fefd1997ab8b4ea2ac331234093cf along with
a fix to blueprint for absolute paths.

Store the current working directory and then change to the root
directory so that all file accesses must go through helpers in
the android package that properly track dependencies.

Change-Id: I24ac485677aa102eec1a2521d16820da6ee1ae77
Fixes: 146437378
Test: m checkbuild
Test: m OUT_DIR=/tmp/out nothing
2020-01-11 01:11:46 +00:00
Treehugger Robot 5fa3a1f743 Merge "Rename OverridableModuleBase.properties." 2020-01-10 23:59:34 +00:00
Colin Cross e734832d25 Merge "Revert "Sandbox soong_build by changing to root directory"" 2020-01-10 22:00:59 +00:00
Jaewoong Jung b64dd002b3 Rename OverridableModuleBase.properties.
The generic name causes confusion, even to the IDE.

Test: TreeHugger
Change-Id: I0cb4959ab41b4732e7ee7a5d1d818ef771674023
2020-01-10 13:26:00 -08:00
Colin Cross 47e4f9e1e8 Revert "Sandbox soong_build by changing to root directory"
This reverts commit 05c25ccb4a.

Reason for revert: broke absolute OUT_DIR
Bug: 146437378

Change-Id: I523ed79d40e1c1ef040212ba794a7a084abea75d
2020-01-10 18:51:04 +00:00
Colin Cross e35e961aa9 Merge "Sandbox soong_build by changing to root directory" 2020-01-10 17:35:22 +00:00
Treehugger Robot 2827ccc126 Merge "Add FLAG_compare to whitelisted environment variables" 2020-01-10 16:49:22 +00:00