aboutsummaryrefslogtreecommitdiffstats
path: root/dexpreopt/dexpreopt_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix Rel() after ReplaceExtension or InSameDirColin Cross2019-02-271-3/+3
| | | | | | | | Copying p.rel doesn't work, as rel needs to match the end of the value in path. Apply the same transformation to p.rel as p.path. Test: paths_test.go Change-Id: I42d676c6c4fc18d9852c1a73f25e5a791d7553d0
* Make RuleBuilder methods take PathsColin Cross2019-02-201-118/+55
| | | | | | | | | | | | | | There are no more Make paths being used in Soong now that dexpreopting and hiddenapi are in Soong. Use the Path types in the inputs to RuleBuilder, and fix all users of RuleBuilder. This reapplies I886f803d9a3419a43b2cae412537645f94c5dfbf with fixes to disable preopt for Soong-only builds when the global dexpreopt.config doesn't exist. Test: all soong tests Test: m checkbuild Change-Id: I4dae9ecd5de22f062f9478ec8f0747f099cf8190
* Revert "Make RuleBuilder methods take Paths"Colin Cross2019-02-211-55/+118
| | | | | | | | This reverts commit acdd6940719125104dfd2f692990c99682f95f05. Reason for revert: broke ndk build Change-Id: I5655e48c15eb8f5f0267afdd853fbc25765b8623
* Make RuleBuilder methods take PathsColin Cross2019-02-201-118/+55
| | | | | | | | | | There are no more Make paths being used in Soong now that dexpreopting and hiddenapi are in Soong. Use the Path types in the inputs to RuleBuilder, and fix all users of RuleBuilder. Test: all soong tests Test: m checkbuild Change-Id: I886f803d9a3419a43b2cae412537645f94c5dfbf
* Set a dedicated variable for the runtime apex libs.Nicolas Geoffray2019-02-201-1/+1
| | | | | | Bug: 124789867 Test: build with coverage, the boot classpath has jacoco.jar in /system/framework, not the apex Change-Id: Iaa0762b5a674282be95710d0e1fb166a58ec893b
* Move dexpreopting of boot jars into SoongColin Cross2019-02-151-23/+33
| | | | | | | | Implement the dexpreopting of boot jars in singleton rules in Soong. Test: m checkbuild Change-Id: Ic02ce941fa5e238b839b3eb4c06a3e10c62d98ff
* Add RuleBuilder.Installs().String()Colin Cross2019-02-131-3/+3
| | | | | | | | | 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
* Revert "Revert "Never strip and store dex files uncompressed when they are ↵Nicolas Geoffray2019-02-131-0/+17
| | | | | | | | | | | preopted on system."" This reverts commit 67e8ec1973700bbdbc4cd68b3493d56d270ca377. 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
* Use ArchType in dexpreopt configColin Cross2019-02-121-1/+1
| | | | | | | | | | 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
* Move dexpreopt image selection out of dexpreopt packageColin Cross2019-02-111-27/+23
| | | | | | | | | | | | | 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
* Remove unused dexpreopt UseEmbeddedDexColin Cross2019-02-081-1/+0
| | | | | | | | dexpreopt doesn't need to know about UseEmbeddedDex, it has already been taken into account for UncompressedDex. Test: m checkbuild Change-Id: I5508aa43bb8bdb06e20cf93bc5171a5e78833983
* Move dexpreopt.Script to android.RuleBuilderColin Cross2019-02-051-3/+4
| | | | | | | | 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
* Rename preferCodeIntegrity to useEmbeddedDexVictor Hsieh2019-01-291-1/+1
| | | | | | Test: build and run testing app Bug: 112037137 Change-Id: Ia82c2c3ba7eb32117a4be078ac31ee2ba510f9eb
* Allow modules to disable stripping when dexpreoptingColin Cross2019-01-101-40/+54
| | | | | | | | | 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
* manifest_fixer: rename to --prefer-code-integrityVictor Hsieh2019-01-031-1/+1
| | | | | | | | During code review, the name change was suggested. Test: local CTS passed Bug: 112037137 Change-Id: I7eb25210afb45c7477b0d606574048a15c9c721d
* Dexpreopt soong modules inside soongColin Cross2018-12-151-0/+208
| | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Dexpreopt soong modules inside soong"Colin Cross2018-12-141-208/+0
| | | | | | | This reverts commit 29ff88741e710b05743dcf347484c31311e81cda. Test: none Bug: 119412419
* Dexpreopt soong modules inside soongColin Cross2018-12-131-0/+208
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