Commit Graph

10367 Commits

Author SHA1 Message Date
Treehugger Robot eebdf43337 Merge "Static variant of a stubs lib is correctly tracked" 2019-02-09 04:56:07 +00:00
Mikhail Naganov 15aed6fdd4 Merge "Docs: update path to soong_build.html"
am: 2851b8dad5

Change-Id: I58bd3e30cbd87c0e981e3d47448d9a791ba72157
2019-02-08 20:30:57 -08:00
Treehugger Robot 2851b8dad5 Merge "Docs: update path to soong_build.html" 2019-02-09 04:24:27 +00:00
Jiyong Park 235e67c281 Add prefer_sanitize.* properties to apex
It is used to configure an apex to prefere specific sanitizer variants
if available. For example, if a lib is with sanitize: {cfi: true} then
an APEX with prefer_sanitize: {cfi: true} will use the sanitized variant
of the lib.

Bug: 124128094
Test: m on marlin
extractor libraries are found under /system/apex/com.android.media

Change-Id: I858778eef78c5791cdeb497c7c11688cb128b5fe
2019-02-09 12:07:08 +09:00
Colin Cross d33cdc21bb Merge "Make manifest and APK agree on uncompressed native libs"
am: 53d312637f

Change-Id: If4edb02e8b531d08029f5412eb1bd5759d80dd52
2019-02-08 18:37:42 -08:00
Treehugger Robot 53d312637f Merge "Make manifest and APK agree on uncompressed native libs" 2019-02-09 02:25:32 +00:00
Mikhail Naganov 33b67a24e6 Improve error messages about paths
am: ab1f518fb0

Change-Id: I4e33bfcf1e6def55e3a1ada546d804f728afebb9
2019-02-08 16:46:04 -08:00
Mikhail Naganov e0d0a453d2 Docs: update path to soong_build.html
On the recent versions, the module types help
is generated into $OUT_DIR/soong/docs/soong_build.html

Test: make && ls -l out/soong/docs/soong_build.html
Change-Id: Ib7522a417fd5467f19d7393672a592d349f276f4
2019-02-08 16:41:40 -08:00
Mikhail Naganov ab1f518fb0 Improve error messages about paths
Quote the path parameter in the message to distinguish it
from the text. This makes messages more understandable.

Before: source path include does not exist
After:  source path "include" does not exist

Test: build Android
Change-Id: I99dbbce3cf090682a230d05bf120549a2cc7af3c
2019-02-08 13:32:08 -08:00
Jaewoong Jung 9b3e4cc3af Merge "Add Android.mk lines for package name overriding."
am: ea66057a50

Change-Id: Ib321d7fbf6a1494a78f7c6763d21b14294c54a39
2019-02-08 13:17:16 -08:00
Jaewoong Jung ea66057a50 Merge "Add Android.mk lines for package name overriding." 2019-02-08 21:00:27 +00:00
Jiyong Park 11e6e5c76c Merge "Handle the case when a symbol is annotated with "# apex vndk""
am: 3415780021

Change-Id: I2567afe4afab0f9a71d87f3cafffb21f35fdf0a0
2019-02-08 10:57:34 -08:00
Treehugger Robot 3415780021 Merge "Handle the case when a symbol is annotated with "# apex vndk"" 2019-02-08 18:46:44 +00:00
Alex Light 59a80fa75e Merge "Add support for test_apex"
am: 39af6de6c1

Change-Id: I048c0b6d5148a5ec6a28e4ac90cc886388625ce5
2019-02-08 07:46:34 -08:00
Alex Light 39af6de6c1 Merge "Add support for test_apex" 2019-02-08 15:38:24 +00:00
Colin Cross 46abdad46a Add support for use_embedded_dex in Soong
When use_embedded_dex is set, store the dex uncompressed in the
APK and set the android:useEmbeddedDex="true" attribute in the
manifest.

Test: m checkbuild
Change-Id: Iea6e7ed19599830ac72392ef93f9c98957df1cce
2019-02-08 15:25:17 +00:00
Colin Cross e4246abd7f Make manifest and APK agree on uncompressed native libs
Only put uncompressed native libs in an APK if the min_sdk_version
supports it (>= 23, Marshmallow), and set
android:extractNativeLibs="false" in the AndroidManifest.xml so
that the platform won't extract them anyways.

Bug: 117618214
Test: m checkbuild
Change-Id: I760017e48bf3c6b618aabde0982df45995765d48
2019-02-08 15:24:47 +00:00
Jiyong Park 1431765f8d Handle the case when a symbol is annotated with "# apex vndk"
This change fixes a bug that a symbol is omitted for apex (or vndk) when
it is annotated with "# vndk apex" (or "# apex vndk).

Bug: 123349183
Test: python3 test_gen_stub_libs.py

Change-Id: I344d6e70732bae8877cb16bbe881edb79fe90670
2019-02-08 20:36:26 +09:00
Anton Hansson 2fc1d0f1ea Workaround dupe resource directories
am: 129b9ceeb1

Change-Id: I5f685b76f379589f5964fc1c59c2597cfd44d3dc
2019-02-08 00:06:04 -08:00
Anton Hansson 129b9ceeb1 Workaround dupe resource directories
A few apps are co-located with libraries they depend on statically,
and because it's not possible to specify "no resource_dirs", they
both end up depending on the same resources, leading to downstream
problems for RRO generation.

Workaround the problem by de-duping the RRO paths for a single app
for now.

Bug: 124035856
Bug: 123510624
Test: make with enforce_rro == *
Change-Id: I251f123eb4280ed72e1ccd2212cb5f3e746e645d
2019-02-08 07:55:00 +00:00
Colin Cross 98b1442180 Merge "Remove unused dexpreopt UseEmbeddedDex"
am: 6ff48cd048

Change-Id: I3275b61f6f16bcbe7d05c08d72a6f5df7afc8137
2019-02-07 23:30:47 -08:00
Treehugger Robot 6ff48cd048 Merge "Remove unused dexpreopt UseEmbeddedDex" 2019-02-08 07:19:33 +00:00
Colin Cross 8367be9da7 Merge "Make privileged java_library modules use uncompressed dex"
am: 89ba9715ef

Change-Id: I8d6f5a8ada04691c56bc4dfe72157e640ac7ec7c
2019-02-07 18:39:12 -08:00
Colin Cross 73481a4cf6 Merge "Allow disabling implicit resource_dirs and asset_dirs"
am: 3e48a994e8

Change-Id: I36c78ef80aec36666dd8ea755ae298fa02398776
2019-02-07 18:38:41 -08:00
Colin Cross 89ba9715ef Merge "Make privileged java_library modules use uncompressed dex" 2019-02-08 02:29:59 +00:00
Colin Cross 3e48a994e8 Merge "Allow disabling implicit resource_dirs and asset_dirs" 2019-02-08 02:29:35 +00:00
Colin Cross 09a65ab6ca Remove unused dexpreopt UseEmbeddedDex
dexpreopt doesn't need to know about UseEmbeddedDex, it has
already been taken into account for UncompressedDex.

Test: m checkbuild
Change-Id: I5508aa43bb8bdb06e20cf93bc5171a5e78833983
2019-02-08 02:27:59 +00:00
Colin Cross 3def9efe61 Remove the hiddenapi presingleton
am: 697412f058

Change-Id: I96f1dfed133081bd27c7658d196c2a6818ace8fc
2019-02-07 17:45:35 -08:00
Colin Cross e5bc0d6253 Make MakeVarsContext a PathContext
am: 65494b962b

Change-Id: I1a2eab146c5f5327591c44faf224b562aac86610
2019-02-07 17:45:24 -08:00
Alex Light 0851b88eaf Add support for test_apex
Some test and other miscallaneous use-cases need apexs that are
installable but will not affect the installation of other artifacts
onto the device. For this purpose we added a test_apex type. These
test_apex targets create apex files and have all the normal attributes
but are not considered the source of any of their contents for the
device by the rest of the build-system.

Test: build and boot
Test: ALLOW_MISSING_DEPENDENCIES=true \
      DIST_DIR=$ANDROID_BUILD_TOP/out/dist \
      ./art/tools/dist_linux_bionic.sh -j72 showcommands com.android.runtime.host
Bug: 123591866
Bug: 123892969

Change-Id: I7f50be0ac0425cd87868145e18bcee6962d472ef
2019-02-07 16:52:20 -08:00
Colin Cross 0ddae7fddd Allow disabling implicit resource_dirs and asset_dirs
Specifying [] for resource_dirs or asset_dirs will prevent using
the default "res" or "assets" directories.

Test: TestResourceDirs
Bug: 124035856
Change-Id: I96e38ac1319260db43950299a8b1774da68ea85e
2019-02-08 00:24:01 +00:00
Colin Cross 697412f058 Remove the hiddenapi presingleton
The presingleton is no longer necessary now that MakeVarsContext
is a PathContext, just call hiddenAPISingletonPaths directly.

Test: m checkbuild
Test: forrest build of unbundled branch
2019-02-07 22:31:44 +00:00
Colin Cross 65494b962b Make MakeVarsContext a PathContext
Expose all of SingletonContext to makeVarsContext, and then export
the subset of it that is used through MakeVarsContext.SingletonContext,
plus what is necessary for PathContext, directly through
MakeVarsContext.

Test: m checkbuild
Change-Id: Ie00f36e577fe110b6fa03b901da489d8547773c6
2019-02-07 22:31:04 +00:00
Aurimas Liutikas aa6f7adb24 Merge "Update NDK library list"
am: 7cf14099b7

Change-Id: I2963a3359f1e20f67990ba0473340ad70bbcecbe
2019-02-07 12:57:13 -08:00
Aurimas Liutikas 7cf14099b7 Merge "Update NDK library list" 2019-02-07 20:46:46 +00:00
Sasha Smundak 01531b48a0 Provide an option to reduce build's verbosity.
am: c0c9ef9964

Change-Id: I7ae0b4a7b1a1fc20ff4c7e71b9e9c7c4db5728a3
2019-02-07 12:41:26 -08:00
Sasha Smundak c0c9ef9964 Provide an option to reduce build's verbosity.
If ANDROID_QUIET_BUILD environment variable is set to '1', do not show 20
lines of the environment variables. In addition, for the failing step show
only the step name and output, omitting the command proper (the verbose log
as well as error.log still contains it).
If build succeeds, the output of the build itself consists of a single
line:
```
> m androidmk
[100% NN/NN] <last command>
```

When it fails, the output does not contain sometimes very long command
line:
```
> m androidmk
[ 97% NN/MM] test androidmk
FAILED: <step>
--- FAIL: TestEndToEnd (0.01s)
    androidmk_test.go:1025: failed testcase 'prebuilt_etc_TARGET_OUT_ETC'
        input:
        include $(CLEAR_VARS)
        LOCAL_MODULE := etc.test1
        LOCAL_MODULE_CLASS := ETC
        LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/foo/bar
        include $(BUILD_PREBUILT)

        expected:
        prebuilt_etc {
            name: "etc.test1",
            filename: "foo/bar",
        }

        got:
        prebuilt_etc {
            name: "etc.test1",
            filename: "foo/bar",

        }

FAIL
17:50:53 ninja failed with: exit status 1
```
[The related change in build/make/envsetup.sh suppresses timing display
when the same variable is set.]

Change-Id: I4d3c72457de031ff58a324c2fe98f4c1d10f8239
Test: treehugger
2019-02-07 12:21:45 -08:00
Colin Cross a0e1404cf9 Merge "Use a presingleton to create hiddenapi singleton paths early"
am: 17c85f098a

Change-Id: Ib94cff44bb21cd1dead01683b194bc6d8d7e20d6
2019-02-07 12:10:21 -08:00
Treehugger Robot 17c85f098a Merge "Use a presingleton to create hiddenapi singleton paths early" 2019-02-07 20:00:20 +00:00
Jiyong Park 0f2ff3d948 add apex_defaults
am: 30ca9379e6

Change-Id: If4653b44764acaa5a17cd6b5113656bf438b2542
2019-02-07 10:08:25 -08:00
Alex Light bc6203bf8e Don't remove non-installable apex deps from the system install
am: f98087ffce

Change-Id: I122182d62b5d9ed29c12ac7bf08f39815020c6e8
2019-02-07 10:05:53 -08:00
Jiyong Park 30ca9379e6 add apex_defaults
apex_defaults is the default module for apex.

Bug: 124026431
Test: m (apex_test updated)
Change-Id: I09f63046e909e8eeb52ecec6bb07eb51e5490561
2019-02-08 02:55:28 +09:00
Alex Light f98087ffce Don't remove non-installable apex deps from the system install
We were marking any libraries included in any apex (including
non-installable apex's like com.android.runtime.host) as
uninstallable. This could cause phones to become unbootable if these
apex's are modified.

Bug: 123892969
Test: m droid && boot device.
Change-Id: Ief9004bbe7b106ee8f52715ce5bd7bb5accec290
2019-02-07 17:05:45 +00:00
Colin Cross 76e3e1f554 Use a presingleton to create hiddenapi singleton paths early
If no module uses hiddenapi (because it is an unbundled build that
does not build any boot image modules), then the makevars singleton
panics because it will always run before the hiddenapi singleton
(due to package init() function ordering), and the hiddenapi singleton
paths have not been initialized yet.  Add a presingleton to initialize
the paths early.

Bug: 123645297
Test: tapas Launcher3 && m on unbundled branch
Change-Id: I9386ac87848a2181f51140129288df80fff9acfd
2019-02-07 08:57:26 -08:00
Colin Cross 083a2aa52d Make privileged java_library modules use uncompressed dex
Check java_library modules against ModulesLoadedByPrivilegedModules
to determine whether to uncompress the dex files in them.

Test: m checkbuild
Change-Id: I77ee456d55bec65c8b4c82e9bd38f344212e6140
2019-02-07 08:56:02 -08:00
Jaewoong Jung 4b44fcd772 Make PrebuiltEtcHostFactory public.
Bug: 122332220
Test: prebuilt_etc_test.go + manual builds
Change-Id: Ia2f882f0d18f3f06f396b2bf3f3052d27c6ab96d
2019-02-07 08:28:03 -08:00
Jiyong Park 5168ece030 Merge "Fix: TARGET_FLATTEN_APEX=true does not install any files to /system/apex"
am: 6e8fe6feb1

Change-Id: Ide50087142c82d5582fc95b7e683631e6eda9229
2019-02-07 08:21:26 -08:00
Jiyong Park 6e8fe6feb1 Merge "Fix: TARGET_FLATTEN_APEX=true does not install any files to /system/apex" 2019-02-07 16:08:24 +00:00
Jiyong Park e4bb986106 Static variant of a stubs lib is correctly tracked
cc.Module.staticVariant is used to track the corresponding static
variant of a shared variant. This change fixes a problem that the
staticVariant field is not correctly set when the lib is with stubs:
{...}. This was happening because the staticVariant was set by adding
dependency from shared variant to static variant to reuse object files.
However, for a lib with stubs, the dependency was not created because it
does not make sense to share object files for stubs lib where source
code is auto-generated.

Fixing the issue by adding dependency to the static variant with a
different dependency tag whose only purpose is to set staticVariant
field.

Bug: 122885634
Test: m (cc_test amended)
Change-Id: I7f97cbb4c4a28bf9a93839d3b91ee140835aa6af
2019-02-08 00:47:46 +09:00
Jaewoong Jung 9109d72785 Add Android.mk lines for package name overriding.
This ensures the overriding/overridden packages are processed as intended
when producing the final system image.

Bug: 122957760
Test: Manual tests with Browser2, BrowserGoogle, and Chrome
Change-Id: Ica05e53601b27c73de7f5c3bfcb9000103a11db6
2019-02-07 07:15:45 -08:00