Add a utility method that returns a copy of a slice of strings.
This is primarily useful when appending to a string slice to avoid
accidentally reusing the backing array.
Test: util_test.go
Change-Id: I7801fc7ca19e27ddc9f1b1b452788b723c7f619c
strip.sh was including the dependencies of dexpreoptRule instead
of stripRule, resulting in incorrect rebuilds.
Bug: 124529711
Test: m && m
Change-Id: I4b40f7c040442a03918c16a46ecf777f5cc30130
Add a RuleBuilderInstalls type for a slice of RuleBuilderInstalls,
and give it a String() method that returns the list of installs
in the format that is convenient for passing to Make.
Test: rule_builder_test.go
Change-Id: I2e9cd9abf4dfb0ad312d0a6662f1567baf9cd222
This reverts commit 67e8ec1973.
Test: build && atest android.text.cts.EmojiTest#testEmojiGlyphWebView on Cuttlefish
Exempt-From-Owner-Approval: Got +2 from Colin, latest PS is a rebase across conflicts.
Change-Id: I99faf0f2ec698d70c107516bd43756b9ddcb90d0
Make ArchType implement the encoding.TextMarshaller and
encoding.TextUnmarshaller interfaces so that it can be used
as a value in the dexpreopt config structs that are passed
through JSON files.
Test: m checkbuild
Change-Id: Ie4c12443e7ee5fe43f42d5403bcde12d62f617e2
Instead of passing both the module and global dexpreopt image
selection into the dexpreopt package, determine the correct
dexpreopt image in the java package.
Also stop using the boot image "location" as an input, only
track the real path, and then convert it to the "location"
that dex2oat expects when constructing the command line.
Test: m checkbuild
Change-Id: I2be2b5917e09fd57428dab27849c0153fdc75722
dexpreopt doesn't need to know about UseEmbeddedDex, it has
already been taken into account for UncompressedDex.
Test: m checkbuild
Change-Id: I5508aa43bb8bdb06e20cf93bc5171a5e78833983
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
Move dexpreopt.Script to android.RuleBuilder so that the builder
style can be used in more places. Also add tests for it.
Test: rule_builder_test.go
Change-Id: I92a963bd112bf033b08899e930094b908acfcdfd
Add a no_stripping property and pass it to dexpreopt to disable
stripping for a module.
Bug: 122610462
Test: dexpreopt_test.go
Change-Id: I5a4b005633bb8b1ea373e9eeb420aa0999de17ab
If dexpreopt is disabled for a module then classes.dex must not be
stripped.
Bug: 121377197
Test: m WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true
Change-Id: Icfa48804cf02291874ac6623c9b9297821ac8ce6
It is useful to have the exact dex2oat invocation used to generate
artifacts for some tests. This adds the --write-invocation-to= flag to
the build to save this information.
Test: m droid
Bug: 119332327
Change-Id: Id7664cf6d05bbb1c580f94584cdeb96084d5799c
If dexpreopt is disabled inside dexpreopt_gen there won't be any installed files and the install directory won't be created, causing soong_zip to fail. Create the directory ahead of time.
Test: treehugger
Change-Id: Icf17d0bcd617eeeafdcd50ab56359fa8d6612822
Port the dexpreopt logic from Make to the dexpreopt package in Soong,
and use it to dexpreopt Soong modules. The same package is also
compiled into the dexpreopt_gen binary to generate dexpreopt scripts
for Make modules.
This relands Ib67e2febf9ed921f06e8a86b9ec945c80dff35eb and
I462182638bd57b1367b5bfb0718e975c11ae66f7, along with multiple fixes
to depsfile generation in dexpreopt_gen that caused .odex files for
modules in defined make to be missing dependencies on boot.art, and
a fix to not dexpreopt and strip tests.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Test: OUT_DIR=$PWD/out m
Test: NINJA_ARGS="-t deps out/target/product/sailfish/obj/APPS/Contacts_intermediates/dexpreopt.zip" m
Change-Id: I6bb2c971cee65d2338839753aa0d84939f335b1b
Port the dexpreopt logic from Make to the dexpreopt package in Soong,
and use it to dexpreopt Soong modules. The same package is also
compiled into the dexpreopt_gen binary to generate dexpreopt scripts
for Make modules.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: Ib67e2febf9ed921f06e8a86b9ec945c80dff35eb