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
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
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
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
dexpreopt doesn't need to know about UseEmbeddedDex, it has
already been taken into account for UncompressedDex.
Test: m checkbuild
Change-Id: I5508aa43bb8bdb06e20cf93bc5171a5e78833983
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
Specifying [] for resource_dirs or asset_dirs will prevent using
the default "res" or "assets" directories.
Test: TestResourceDirs
Bug: 124035856
Change-Id: I96e38ac1319260db43950299a8b1774da68ea85e
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
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
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
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
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
Check java_library modules against ModulesLoadedByPrivilegedModules
to determine whether to uncompress the dex files in them.
Test: m checkbuild
Change-Id: I77ee456d55bec65c8b4c82e9bd38f344212e6140
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
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
94427265d1 broke the flattened APEX
by not updating moduleNames
Test: TARGET_FLATTEN_APEX=true m
Files are under /system/apex
Change-Id: I14b1a6f8b2244d35e1accdf9888cfef65f4b0a03
Apparently this isn't autogenerated based on the list of ndk_library
modules?
Fixes: 124019854
Test: try to use libsync from a cc_library with sdk_version: "current"
Change-Id: I5016e1b7d77ed9255bf4b185c168efe8d0b73d12
Otherwise the code after this assumes that the "to" library is an NDK
library and panics when it isn't.
Bug: 124019854
Test: trigger error, no longer see panic
Change-Id: I88d10e8d882285e24b4f42d0cf85c2d658348617
Move the rules that build hiddenapi-stubs-flags.txt,
hiddenapi-flags.csv and hiddenapi-greylist.csv into Soong.
Bug: 123645297
Test: m checkbuild
Test: m UNSAFE_DISABLE_HIDDEN_API_FLAGS=true
Change-Id: I90bf58710f6153ee8565994f799d3ec5699bc7fa
Add a method to be used when Config.AllowMissingDependencies() is true
to produce an error rule when the rule is missing dependencies.
Test: m checkbuild
Change-Id: If370fbb2734237a84a100b99b5238c7a2256c405
* changes:
Export RRO resource dirs from static android_library dependencies
Add a static lib to TestEnforceRRO
Move TestEnforceRRO test cases into test function
When an APEX is non-installable, the make rules for the APEX files in
the APEX are not emitted as they will never get installed.
androidMkForType() is refactored so that make rules for the APEX files
are created in a separate function androidMkForFiles().
Test: m checkbuild tests
Bug: 123290268
Change-Id: Ibe8817d1e9c6312fb5c6f986dced8aa3e823664a
The stubs libraries are buildtime-only artifacts. Since they are not
used at runtime, no need to emit symbol files for them
Test: m
Change-Id: I54410e9289b4bf61e23581386b56ade8fba18dfa
RRO dirs from static android_library dependencies should be
included in the final module.
Bug: 123510624
Test: TestEnforceRRO
Change-Id: I28c45e139b187894a4ebc43d573eab5ea1be9861
Add a static lib dependency to TestEnforceRRO in preparation
for capturing static dependencies in rroDirs.
Bug: 123510624
Test: TestEnforceRRO
Change-Id: I9754ebf02866e8b3e4ad0c55ff099e546f8e2bc2
The test cases will need to reference buildDir, which is not
yet set at global variable initialization time.
Bug: 123510624
Test: TestEnforceRRO
Change-Id: I0dda0184dfab496c820e11ed76b7594a60d5d587
* changes:
Prepare for a type-safe OnceKey
Add Temporary and DeleteTemporaryFiles to RuleBuilder
Improve RuleBuilder documentation and methods
Allow RuleBuilder to be used with SingletonContext
Move dexpreopt.Script to android.RuleBuilder
Add an opaque OnceKey type and use it for all calls to Once in
build/soong. A future patch will convert the arguments to
Once* to OnceKey once users outside build/soong have been updated.
Test: onceper_test.go
Change-Id: Ifcb338e6e603e804e507203c9508d30ffb2df966
An empty file will be emitted for parcel declarations. Now sources may
inclue parcel definitions.
Bug: 70046217
Test: manual
Change-Id: I8087416ae7806399c3514d18faeadb858f07bf88
Build rules for both flattened and non-flattend APEXes are created
regardless of TARGET_FLATTEN_APEX. The selection is made in AndroidMk.
This allows other module to reference an APEX via :module syntax
irrespective of TARGET_FLATTEN_APEX.
Bug: 123780484
Test: TARGET_FLATTEN_APEX=true m out/soong/.intermediates/art/build/apex/art-check-debug-apex-gen/gen/art-check-debug-apex-gen.dummy
with aosp/891696 applied
Change-Id: Ia49415ec3d18cfc5081461be76900c73ea803dca
And add a helper script that can help parse the output from
build_test.bash
Test: check for BUILD_BROKEN_ENG_DEBUG_TAGS in soong.log
Test: go run ../build/soong/scripts/build_broken_logs.go *
Change-Id: Idd0fc8b59770dcdbe44eeba262558708a9497f96
Temporary marks an output path as a temporary file that is not
necessary after the rule completes, removing it from the result of
Outputs. DeleteTemporaryFiles adds a command to the command line
that deletes all files that have been marked with Temporary.
Test: rule_builder_test.go
Change-Id: Ie509ed800992962747fb287858e148e975eee54a
Add a few convenience methods, document all the methods and add
examples that would show up in the godoc if we were to actually
generate it.
Test: rule_builder_test.go
Change-Id: I270fed605ffec34e6f5b36fde0dc9ca52694b741