Commit graph

1444 commits

Author SHA1 Message Date
Anton Hansson
db064f1f1a Merge "Put DEVICE/PRODUCT overlays in different partitions" am: 94fa0e75cb am: fd946975d0
am: 691c979b62

Change-Id: I1e9c9b79b931229ed3142d1921d784a6bad7baed
2019-03-25 02:46:53 -07:00
Anton Hansson
cb8276fa93 Put DEVICE/PRODUCT overlays in different partitions
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.

Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
2019-03-22 13:25:20 +00:00
Vic Yang
5c38a6234d Merge changes from topic "vndk-no-vendor-variant" am: 30dda1da5e am: 38f68f7a2a
am: 1485ea8707

Change-Id: Ia7eaea708743f9f42f6fe605cb0edba7db36db4d
2019-03-20 21:58:12 -07:00
Vic Yang
a2872a3578 Add module-target-built-files function am: 1b83413b5a am: 00e6eb93c9
am: 9b235bbcd5

Change-Id: Ib4f82e58c3c1f74e196b53854bb5ceb3bb6b3dab
2019-03-20 21:57:17 -07:00
Vic Yang
51512c558c Add support for no-vendor-variant VNDK
When TARGET_VNDK_USE_CORE_VARIANT is set to true, the vendor variant of
VNDK libraries are by default not installed.  Instead, the core variant
will be used by vendor binaries at runtime.

To ensure the core variant of VNDK libraries are installed, we also add
a flag LOCAL_VNDK_DEPEND_ON_CORE_VARIANT to indicate that the vendor
variant module depends on the core variant module.  This flag should be
set by Soong for all VNDK libraries without the vendor variant
installed.  When the flag is set, the vendor variant binary is also
compared against the core variant binary to ensure they are
functionally identical.

As we are merging the two variants for some libraries, we need a new
link type to denote a module is usable as both native:vndk and
native:platform.  We add native:platform_vndk for this.

Bug: 119423884
Test: With the corresponding Soong change, build with
      TARGET_VNDK_USE_CORE_VARIANT set to true.
Test: Add a dummy VNDK library and a dummy vendor binary that depends
      on it.  Build with no-vendor-variant VNDK and check the core
      variant is installed.
Test: Add conditional compilation based on __ANDROID_VNDK__ in the
      dummy VNDK library and check build fails.

Change-Id: I40000f2728e8193212113c1ee950e9d697f2d40d
2019-03-20 10:23:04 -07:00
Vic Yang
1b83413b5a Add module-target-built-files function
This is similar to module-built-files, except that it only returns
files built for the target, not the host.

Bug: 119423884
Test: Build with the no-vendor-variant VNDK change that uses this
      function.

Change-Id: I2a3d99003b05999eae01c0b90bb62b5263d65592
2019-03-20 10:22:21 -07:00
Anton Hansson
0a766e9afa Merge "Refactor generate_enforce_rro" am: bec4aa868a am: f5c74dd470
am: 5784c16fc4

Change-Id: I3d12f8a0f50429e8f54631bedec7e6caf667fb61
2019-03-20 09:23:38 -07:00
Anton Hansson
bec4aa868a Merge "Refactor generate_enforce_rro" 2019-03-20 15:18:19 +00:00
Anton Hansson
08231e1786 Refactor generate_enforce_rro
A few tweaks to make it easier to extend to generating RROs in
multiple partitions:
- deduce the module name inside generate_enforce_rro
- dedup rule definition
- tweak framework-res check to use source module name instead

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I2f0d6270b21f5427c372c04a5c6e7fb712e72a9a
2019-03-18 14:21:09 +00:00
Nelson Li
ed516e293d Merge "Revert "Revert "Build System: Solve dependency problem for test""" am: 795721ac2a am: 3c4c86943c
am: fd71578493

Change-Id: I369b55cbd93ff3dd679fdbc67cb05c712ca3ed5f
2019-03-13 21:43:13 -07:00
Nelson Li
1f8357fe7d Revert "Revert "Build System: Solve dependency problem for test""
This reverts commit 6fe7f194b9.

Reason for revert: Fixed all build break.

Change-Id: I0a4842df1225399752515a4cd7a7c14173a5bf7b
2019-03-14 01:05:36 +00:00
Nelson Li
f5a4af9e91 Merge "Revert "Build System: Solve dependency problem for test"" am: 8924400a8a am: abc1617463
am: 87a4a179e1

Change-Id: I9e4095865afd148d7e7aec163d0430dd2e497d3d
2019-03-11 15:32:57 -07:00
Nelson Li
6fe7f194b9 Revert "Build System: Solve dependency problem for test"
This reverts commit 224e103308.

Reason for revert: Build Breakage in git_pi-dev-plus-aosp/docs @5366136
make -j110 docs showcommands dist DIST_DIR=/buildbot/dist_dirs/git_pi-dev-plus-aosp-linux-docs/5366136 checkbuild
FAILED:
 Dependencies in out found with no rule to create them:
 out/target/product/generic/data/app/CtsVerifierTester/CtsVerifierTester.apk
 out/target/product/generic/data/app/TradeFedTestApp/TradeFedTestApp.apk
 out/target/product/generic/data/app/TradeFedUiTestApp/TradeFedUiTestApp.apk
 15:53:46 stopping
and
make -j50 showcommands dist TARGET_PRODUCT=cf_x86_phone DIST_DIR=/buildbot/dist_dirs/git_master-linux-ndk_translation_all/5366149 ndk_translation_all
FAILED: ninja: 'out/target/product/vsoc_x86/data/nativetest/arm/arm_insn_tests_arm_static/arm_insn_tests_arm_static', needed by 'out/target/product/vsoc_x86/obj/PACKAGING/ndk_translation_tests_intermediates/arm_insn_tests_arm_static_result.xml', missing and no known rule to make it
15:55:38 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Return Code: 2

Change-Id: Idf95ef2e06526a0a31690420c923207db627605f
2019-03-11 16:48:29 +00:00
nelsonli
6e17758737 Merge "Build System: Solve dependency problem for test" am: 15e76e3848 am: 740ac49c83
am: 6e62c0bdaa

Change-Id: Ic1786c6b153ab105400aa1e2c78101fa288ee913
2019-03-11 08:34:40 -07:00
nelsonli
224e103308 Build System: Solve dependency problem for test
1. A test can add a runtime dependent test module by just setting
   LOCAL_REQUIRED_MODULES or LOCAL_TARGET_REQUIRED_MODULES. Then the dependent test
   module will be copied to testcase folder.
2. Do not install to $(TARGET_OUT_DATA) for testcase

BUG: 117224272

Test: 1. (a) vi cts/tests/tests/text/Android.mk
         (b) add LOCAL_REQUIRED_MODULES := CtsPrintTestCases
         (c) m -j CtsTextTestCases
         (d) Then, CtsPrintTestCases should also be built to testcase folder like below.
             ./target/product/generic_arm64/testcases/CtsPrintTestCases

Change-Id: I24ea3783486c54a05cfa9d3d0375b977afc230f8
2019-03-07 14:08:35 +08:00
Nicolas Geoffray
e7379ba071 Merge "Pass the --api-flags to appcompat explicitly." am: 53cfd9275b am: 40ccefa404
am: 05cee18432

Change-Id: I89ab19518261acaf22565fc608611231288b7a70
2019-03-04 06:31:55 -08:00
Nicolas Geoffray
53cfd9275b Merge "Pass the --api-flags to appcompat explicitly." 2019-03-04 14:14:39 +00:00
Colin Cross
62fc068b69 Merge "Use flags from Soong for d8 and r8" am: 5852c93585 am: fb770b4f84
am: ecc4607403

Change-Id: I863876bb8139fd8c5aceb97f4fde51f2df3697ff
2019-03-01 07:51:15 -08:00
Nicolas Geoffray
ac1f90c39c Pass the --api-flags to appcompat explicitly.
Bug: 125794065
Test: m && appcompat logs contain data
Change-Id: Idef875138d6670efc9ed7b9c63f653229b173d3e
2019-02-28 13:51:14 +00:00
Colin Cross
17ea341950 Use flags from Soong for d8 and r8
Use the flags provided by Soong when running d8 and r8.

Bug: 119270658
Test: m checkbuild
Change-Id: I9459ded386effc27c4c96f1e94f9ea2f8ed19319
2019-02-21 15:04:37 -08:00
Colin Cross
44bc5d6323 Merge "Make copy-many-files take an optional destination directory" am: ceaf716a3d am: e95dc4e3cc
am: da37ee584c

Change-Id: I5b81e3c051dfc15e2bf027be1857d5cf0553ac59
2019-02-13 17:02:19 -08:00
Colin Cross
dc53f450af Make copy-many-files take an optional destination directory
Test: m checkbuild
Change-Id: I777952d27bd1a0cf2608e080a0f46e39268784ce
2019-02-13 08:03:25 -08:00
Colin Cross
e8903ad55c Merge "Make manifest and APK agree on uncompressed native libs" am: 010df4b471 am: b568c2e15d
am: 2197223be0

Change-Id: Iafc06c2cfb9ccdcb3d6774863c1a146977277ded
2019-02-08 18:55:22 -08:00
Colin Cross
ead7b66590 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: Iae26e4676c29c68fa3f76187512c82786bfa0522
2019-02-07 21:44:12 -08:00
Colin Cross
58ba970763 Merge "Consolidate sdk version handling" am: 2b526bf7f3 am: 5e2b2c666d
am: 1403c05cc8

Change-Id: I0cb43b0b62692faf23e6ad9ed23a2f4a4ead4936
2019-02-07 18:55:15 -08:00
Colin Cross
a27f42aa5d Consolidate sdk version handling
Share the logic that converts LOCAL_SDK_VERSION, LOCAL_MIN_SDK_VERSION
and the global config values into minSdkVersion, targetSdkVersion,
and compileSdkVersion.

Test: m checkbuild
Change-Id: Id038673662b23cffc9e57978ac55a3f35ef8237a
2019-02-07 08:55:48 -08:00
Colin Cross
c15321795a Merge "Move hiddenapi singleton rules to Soong" am: 6d1ae7a015 am: 4d2fbfd232
am: 38513055b3

Change-Id: Ib094f9f615c914750629bc45bcbdb0102182f6ef
2019-02-07 00:09:18 -08:00
Colin Cross
485c9cd400 Move hiddenapi singleton rules to Soong
Hiddenapi rules are now in build/soong/java/hiddenapi_singleton.go.
This effectively requires any module in PRODUCT_BOOT_JARS to be
defined in Soong.

Bug: 123645297
Test: m checkbuild
Change-Id: If72bd1c20b2014d0a3d400624d37fdb0a3052245
2019-02-05 21:38:55 -08:00
Adrian Roos
b5724ecfbf Merge "Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true" am: 61ae763ec4 am: 840b7b3df2
am: 3c1e101f6d

Change-Id: Iea80bf83b6b051b608c13d27e6f13fed33f50fec
2019-01-31 12:06:10 -08:00
Treehugger Robot
61ae763ec4 Merge "Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true" 2019-01-31 19:25:59 +00:00
Joe Onorato
4abc14b9ed Merge "When using inherit-package for a test, also allow specifying a new test suite." am: c51c523b88 am: ac00ab680e
am: f1847c0a18

Change-Id: Ibac629980c5794b00f0c2e31b9c4c27aef132e55
2019-01-25 17:20:45 -08:00
Adrian Roos
21028b7ad6 Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
Fixes: 122957987
Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true make droid
Change-Id: Iafef8cc69971fd10718882326fbba99a6223d0f8
2019-01-25 17:35:25 +01:00
Joe Onorato
62472b676a When using inherit-package for a test, also allow specifying a new test suite.
Test: make
Change-Id: I2c9b5d998e6cc3159e4d23d7547bfd0b865f714c
2019-01-23 14:50:07 -08:00
David Brazdil
85b0346b7a Replace hiddenapi-{public,private}-list.txt with a CSV file am: fc274bab4d am: a1a433b368
am: 0e4ce6c0e1

Change-Id: Ib8c051aa4c41b83a1530a964c2ed54af3283611a
2019-01-21 12:08:22 -08:00
David Brazdil
fc274bab4d Replace hiddenapi-{public,private}-list.txt with a CSV file
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: If56c7ab8a4c3bbd33e447ef0dfd33f2c303a937c
2019-01-19 15:57:35 +00:00
Colin Cross
748e839bdf Merge changes from topics "hiddenapi-soong", "hostdex_install" am: d61a1aba36 am: 9cfe03b9d5
am: b1e0d646e6

Change-Id: Ib2b539012d410a54489e2845c2d7707c1fec42e7
2019-01-17 15:54:28 -08:00
Colin Cross
49adea3bd8 Move hiddenapi to Soong
Perform hiddenapi CSV generation and dex encoding for Soong modules
in Soong.  This fixes an issue where dexpreopting was happening on
a different jar than was being installed.

Bug: 122856783
Test: m checkbuild
Change-Id: I24a235c63ff62fed7e1af9f2fd17e55b0c1598a5
2019-01-17 10:23:10 -08:00
Jeongik Cha
0a87686514 Merge "Dump and enforce certificate for apks" am: bdf0ec03b6 am: 237303f1e2
am: b10dfc9222

Change-Id: I8836193364ea0b21ed0af6beac75250fca192496
2019-01-10 20:50:00 -08:00
Jeongik Cha
bdf0ec03b6 Merge "Dump and enforce certificate for apks" 2019-01-11 04:31:02 +00:00
Dan Willemsen
19fd4d0842 Merge "Stop trying to read depfile from vtsc" am: 82f2cb078f am: d372e54742
am: afbfff0d2d

Change-Id: I4f336a2f8b6d3fce8b1529a0e50a82d15b12d008
2019-01-10 10:12:19 -08:00
Jeongik Cha
b2c4bb7e3d Dump and enforce certificate for apks
Dump the list of APKs that aren't located at system partition and signed
with system certificate.
And when enforcement option is enabled, it makes build error if there is
the apk that satisfies the condition above.

Bug: 74699609

Test: m -j
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/certificate_violation_modules.txt

Change-Id: I23c41f2665dd97abac3e77d1c82d81ff91b894eb
2019-01-10 11:37:22 +09:00
Dan Willemsen
5125746561 Stop trying to read depfile from vtsc
vtsc just ignores the -d argument and apparently can't write a depfile.
So for now, just stop assuming it produces one.

Bug: 121058584
Bug: 120496070
Test: NINJA_ARGS="-w missingdepfile=err" m libvts_interfacespecification
Change-Id: Ie1483fbeead9f710d8a6636df07ce44bbc4a6e2d
2019-01-09 16:40:58 -08:00
Mathew Inwood
0fa280036b Fix hiddenapi-greylist.csv generation.
It was referring to a non-existant macro paramater resulting in empty
output.

Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
& then check output.

(cherry picked from commit 8626c8ea95)

Change-Id: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
Merged-In: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
2019-01-07 14:59:51 +00:00
Tor Norbye
58027e26aa Merge "Switch apicheck over from doclava to metalava" am: 5ca77c512c am: 52c520096b
am: 30905d6ef7

Change-Id: I4e3187cf8980ada64e7b65eb34a14b8fa2abd675
2019-01-06 08:34:26 -08:00
Tor Norbye
cb58fa13df Switch apicheck over from doclava to metalava
Apicheck seems to only be used for signature file
conversion and diffing at this point.

Test: make dist
Not Yet Merged In Ib8c09ba7f85fbb48526132ca8cc85856d63ca407
Change-Id: I5ca70a019ef4f7828f0a566f7745fc2dbf673b2e
2019-01-01 13:18:04 -08:00
Dario Freni
91bfcc3d3c Merge "Log only errors when invoking veridex." am: 17e9a79fb0 am: a56b6fb49a
am: 3f95d38e05

Change-Id: I3d9bbb01bed418951e2ff7d28f7e58561df0a6a0
2018-12-19 16:25:27 -08:00
Dario Freni
ee835c736b Log only errors when invoking veridex.
Test: m
Bug: 121225084
Change-Id: I7e8cfbb7b0bcdb3f8d941086ce920da38d558145
2018-12-19 18:24:53 +00:00
Mathew Inwood
8626c8ea95 Fix hiddenapi-greylist.csv generation.
It was referring to a non-existant macro paramater resulting in empty
output.

Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
& then check output.

Change-Id: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
2018-12-05 17:51:37 +00:00
Jaewoong Jung
594e6b0d0e Merge "Use debug mode when running R8 for eng builds." am: 58b7f7480f am: 2623318e10
am: 64f54d3991

Change-Id: Iaf3b88bfa92ac42e7a22e88b31cf64e3b61b015f
2018-12-03 07:58:47 -08:00
David Brazdil
451f79b072 Merge "Replace hidden API lists with a single CSV" am: 8d8d4584f8 am: 3ca0bb066f
am: 26a968f409

Change-Id: I8bb7be6147e826ddbe5c6fe52e04361bbba87a02
2018-12-03 06:34:25 -08:00