Commit Graph

24839 Commits

Author SHA1 Message Date
Anton Hansson 944e77d219 Change sdk_library child visibility semantics
If specified, the more specific *_visibility attribute override the
visibility attribute.

This is a temporary solution local to java_sdk_library. Ideally this
should be applied to all modules that create child modules.

Bug: 165017290
Test: m
Change-Id: Ia8c5ae119623a83d8ac583c602320915bb8c7f33
2020-09-01 15:17:41 +01:00
Ramy Medhat d678bba6b6 Merge "Pass cpp linking implicit deps to RBE." am: 3618f0a02e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1414829

Change-Id: I30d07f85594f7ee04ab288dbb799eec8d62c23b0
2020-09-01 11:51:11 +00:00
Ramy Medhat 3618f0a02e Merge "Pass cpp linking implicit deps to RBE." 2020-09-01 11:19:28 +00:00
yangbill 5ec4555d22 AutoGen: Support NativeTest with vendor namespace.
Set the TEST_ROOT to /data/local/tmp/tests/vendor if LOCAL_VENDOR_MODULE or
LOCAL_USE_VNDK be set, if not, set to /data/local/tmp.

Bug: 138450837
Test: atest binderVendorDoubleLoadTest
Change-Id: I04acf12976dd24b9bf880a6775fa4f043a221001
2020-09-01 10:33:12 +08:00
Jooyung Han 0703fd873f apex: support prebuilt_firmware for vendor apexes
prebuilt_firmware module is one of many prebuilt_etc-like modules. When
it is soc-specific, it is installed in /vendor/firmware. Similarly, when
prebuilt_firmware is embeded in a vendor apex, installing it in
<apex>/firmware instead of <apex>/etc.

Bug: 162701747
Test: lunch sunfish-userdebug
      m && device boots && vibrator works
Change-Id: I00d28cde42259aaf8221e3897df77efc42b0c1ca
2020-09-01 10:45:13 +09:00
Treehugger Robot 01f7b2c24c Add rust_protobuf module. am: 588aae727b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1412889

Change-Id: I95a0c23468f781cb94a47942985d84ddf2d764e6
2020-09-01 01:05:10 +00:00
Treehugger Robot 588aae727b Add rust_protobuf module.
This adds a new SourceProvider module type to handle protobuf code
generation. See the new test for an example of how to call this.

Bug: 143953733
Test: New soong tests pass.
Test: Replacing genrules in crosvm with rust_protobuf modules.
Change-Id: Ie3117129cde37b8736bc18ee09bf5cde27c01c34
2020-08-31 14:05:39 -04:00
Liz Kammer 3a55c91f9d Remove create_stubs and checkapi from droiddoc
Test: m docs
Test: go java tests
Bug: 144248501
Bug: 143136634
Change-Id: Ic0da89332f3ed2e5e1bb36d00cb9cbd1f6282b45
2020-08-31 08:16:22 -07:00
Ivan Lozano ddd0bdb372 rust: Fix rust_bindgen implicits
rust_bindgen implicits currently include dependency-exported include
directories. This is incorrect, and causes issues when the include
directory is a generated directory.

Instead, remove the dependency-exported include directories from the
implicits list, and also add dependency-exported headers to the
implicits to handle these correctly.

Bug: 166779501
Test: Rust projects continue to build, test-case no longer failing.
Change-Id: Ia2da25de9e712b7306f19603dc9d14de6bac3fb3
2020-08-31 10:58:35 -04:00
Thiébaud Weksteen 019f272c2b Rename ccConfig to cc_config am: 682c9d7b25
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1414650

Change-Id: Ie95fe427cc9355c18e470c887aca831f46ee8ec3
2020-08-31 14:17:28 +00:00
Thiébaud Weksteen 9656838a64 Merge changes I94fd8bbc,I497dcdff,I1873a180 am: 416149e09b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1411849

Change-Id: Id1d836a546d04ebaa75a2dea325e01e016c8cb00
2020-08-31 08:22:12 +00:00
Thiébaud Weksteen 682c9d7b25 Rename ccConfig to cc_config
Follow up from aosp/1413495 to set a consistent name throughout the
package.

Test: m
Change-Id: Idafcd973e7d874cd97599ac419c2972a8a5cd0b4
2020-08-31 10:06:16 +02:00
Thiébaud Weksteen 416149e09b Merge changes I94fd8bbc,I497dcdff,I1873a180
* changes:
  rust: strip libraries and binaries
  rust: add ccToolchain to Module
  rust: enable use-android-relr-tags
2020-08-31 07:54:32 +00:00
Colin Cross 207037e03e Merge "Remove hack for platform availability of modules with missing apexes" am: 9c35c9ae63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1414830

Change-Id: Ia9908c38ab39589f914d7361a38871c5c7117008
2020-08-31 04:51:05 +00:00
Colin Cross 9c35c9ae63 Merge "Remove hack for platform availability of modules with missing apexes" 2020-08-31 04:20:18 +00:00
Xin Li 65cb5c69ea Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ifca7b65f4e27bf14cdc30f72f790b0de90130bae
Change-Id: I3a39be5f0b8736de4822c6a14072c78d4e4ad89d
2020-08-29 01:17:45 -07:00
Ramy Medhat 81b3a83401 Fallback to /tmp when socket address is longer than max length.
Test: Temporary change of base name to cover handled cases.
Change-Id: I1f6953752e7861ccbe7180351386ed65ab5fc259
2020-08-28 23:53:02 -04:00
Nikita Ioffe bca691b377 Merge "Add F2FS support for APEX build system" am: a0254b5289
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1331923

Change-Id: Id4dac9654f6ede9568450f658056b354c0a4bda7
2020-08-28 22:38:18 +00:00
Nikita Ioffe a0254b5289 Merge "Add F2FS support for APEX build system" 2020-08-28 21:55:24 +00:00
Colin Cross d2c81a7933 Remove hack for platform availability of modules with missing apexes
The affected modules weren't actually built in the affected build,
delay the platform availability check in Make instead to allow
the build to proceed.

Bug: 154888298
Test: m checkbuild
Change-Id: I21778e38e04635545b352dee2043a33ec9da246b
2020-08-28 13:32:02 -07:00
Matthias Maennich f4d8891660 Merge "soong: add support for module specific lexer flags" am: bea94d3525
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1363562

Change-Id: I12d1ed4149f489ce52a75a6eb82fa08f44a4b80b
2020-08-28 19:47:54 +00:00
Matthias Maennich bea94d3525 Merge "soong: add support for module specific lexer flags" 2020-08-28 19:24:01 +00:00
Ramy Medhat 6797edc70e Pass cpp linking implicit deps to RBE.
Test: build with RBE_CXX=1 RBE_CXX_EXEC_STRATEGY=remote
Change-Id: Ie769b9a99f080b75c1b82e458b5220261e9c1b47
2020-08-28 14:53:44 -04:00
Theotime Combes 4ba38c1a3f Add F2FS support for APEX build system
Add the new property payload_fs_type in apex module type. Either 'f2fs'
or 'ext4'. Default 'ext4'.

Test: m

Bug: 158453869
Change-Id: I36f373251bd597e11acb62af75437a87e2a531ec
Merged-In: I36f373251bd597e11acb62af75437a87e2a531ec
2020-08-28 12:03:00 +00:00
Jooyung Han e145e4c081 Merge "apex: dedup jni_libs when generating apex_manifest" am: dcbb66f8c9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1413429

Change-Id: I683dc2938b3f9bdc0bd155ad457564b48438de5f
2020-08-28 11:52:36 +00:00
Jooyung Han dcbb66f8c9 Merge "apex: dedup jni_libs when generating apex_manifest" 2020-08-28 11:28:49 +00:00
Ulyana Trafimovich eb285d43fe Merge "Propagate transitive SDK Java library dependencies to dexpreopt." am: b8822a0616
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1408708

Change-Id: Ia5c85d4370deff72b1dbc83064440ea9f1a1440d
2020-08-28 09:55:25 +00:00
Ulyana Trafimovich b8822a0616 Merge "Propagate transitive SDK Java library dependencies to dexpreopt." 2020-08-28 09:36:13 +00:00
Thiébaud Weksteen fabaff6bd7 rust: strip libraries and binaries
Reuses the cc.Stripper logic. Abstracts Stripper to avoid the spreading
of references to the cc package.

rustc requires unstripped libraries (precisely, with the `.rustc`
section) when building dependent targets. Contrary to cc, the output of
a compiler module will remain unstripped and only an extra build rule
will be added. This rule will be referenced at install time (in
baseCompiler.install or androidmk).

This change drastically reduces the size of the installed libraries:
(unstripped, from out/target/product/crosshatch/system)
$ find . -name \*.dylib.so -print0 | du -c --files0-from=-
149996  total

(stripped, with this change)
$ find . -name \*.dylib.so -print0 | du -c --files0-from=-
42380   total

Bug: 153430439
Test: cd external/rust; mma
Change-Id: I94fd8bbcec97e0610aa325d3db4460be84d01734
2020-08-28 10:50:17 +02:00
Thiébaud Weksteen 31f1bb80ef rust: add ccToolchain to Module
The cc toolchain information is required when using cc.Stripper.
Move to a Module method to avoid importing the cc package everywhere.

Test: m nothing
Bug: 153430439
Change-Id: I497dcdff4e767ecb8b8688c73cf88850c302683d
2020-08-28 10:47:11 +02:00
Thiébaud Weksteen 19e1c6c8e7 rust: enable use-android-relr-tags
Bug: 153430439
Test: m
Change-Id: I1873a180f0646cd1dba9e1756fd68bd788d4f725
2020-08-28 10:47:11 +02:00
Thiébaud Weksteen 44c0a17793 Merge "cc: export Stripper struct" am: 03156929db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1404788

Change-Id: I836ecc56d2657d3c52827b11d2e332dcb8b854a9
2020-08-28 08:33:41 +00:00
Bowgo Tsai aeca1f6aa0 Merge "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO"" am: 38414db4de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1413430

Change-Id: I27e6f7450ad00ae056695f2d48f0ea16c1a3f2e8
2020-08-28 08:33:36 +00:00
Thiébaud Weksteen d8dfb130b1 Return all rules when TestingModule.Rule fails am: 3600b80e6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1413494

Change-Id: Iec90c67bc31abb309c604177ab65b02cb04c5b6f
2020-08-28 08:33:29 +00:00
Thiébaud Weksteen 03156929db Merge "cc: export Stripper struct" 2020-08-28 08:32:28 +00:00
Bowgo Tsai 38414db4de Merge "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO"" 2020-08-28 08:15:48 +00:00
Thiébaud Weksteen 3600b80e6f Return all rules when TestingModule.Rule fails
Similarly to Output, we return the list of Rules that have been
generated for TestingModule. This helps debugging failing tests.

Test: m nothing
Change-Id: I3542f4e4632f94fb84208c2e48e629271a373fd4
2020-08-28 08:15:09 +00:00
Bowgo Tsai 988ff8d149 Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO"
This reverts commit 5010a97388.

Reason for revert:  b/166728338 - build failures on master branch

Bug: 162702246
Bug: 166728338
Change-Id: Ie9e51e7c5533d220ad3e160439cb38ff88f068ac
Test: TreeHugger
2020-08-28 08:08:36 +00:00
Jooyung Han b9007609f6 apex: dedup jni_libs when generating apex_manifest
When we package both 32/62, there could be two instances of the same
library. We need to dedup the list of jni_libs.

Bug: n/a
Test: m com.android.cronet (which uses jni_libs)
      check apex_manifest.pb
Change-Id: I9a9f42f0f5219ab7bc50d945b54113b5d823b7f3
2020-08-28 16:33:16 +09:00
Treehugger Robot b2403bc2f7 Merge "[pgo] Return updated Flags after adding flags for PGO/AFDO" am: 1fde95ac3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1414408

Change-Id: I93c3408fac01018c2fc8835614d73ab68b2a7b66
2020-08-28 04:52:43 +00:00
Treehugger Robot 1fde95ac3f Merge "[pgo] Return updated Flags after adding flags for PGO/AFDO" 2020-08-28 04:50:08 +00:00
Treehugger Robot 21f698a5c6 Merge "Introduce BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES" am: 10a3873a80
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1393237

Change-Id: I7f43582f31953d75fc3f4f7f7c01d140015d795e
2020-08-28 04:42:47 +00:00
Treehugger Robot 10a3873a80 Merge "Introduce BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES" 2020-08-28 04:26:49 +00:00
Pirama Arumuga Nainar 5010a97388 [pgo] Return updated Flags after adding flags for PGO/AFDO
Bug: http://b/162702246

Test: m ANDROID_PGO_INSTRUMENT=hwui hwuimacro and check hwuimacro has
      PGO instrumentation.
Change-Id: I8044702e0aed4fa7bb9ac71608a83a95f319abd9
2020-08-27 16:28:45 -07:00
Ivan Lozano 61b6656332 Merge "[rust] Pass cc dependencies as linker flags." am: b0e99edab1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1410907

Change-Id: If88108a6ae5959ea57833f163f8d0c460a343d23
2020-08-27 21:53:11 +00:00
Ivan Lozano b0e99edab1 Merge "[rust] Pass cc dependencies as linker flags." 2020-08-27 20:50:16 +00:00
Jeongik Cha 219141c6bb Introduce BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES
If BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES has a numeric value,
it replaces "current" or "system_current" with the version which
the flag indicates.

Bug: 163009188
Test: BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES=29 m, and then check if every vendor
java module's sdk_version is 29 if its sdk_version was current.

Change-Id: I17b49b8e02caf2d1bc57b91648d4420f3ad9fcb9
2020-08-27 23:09:54 +09:00
Ulya Trafimovich fc24ad3d4e Propagate transitive SDK Java library dependencies to dexpreopt.
For some dependencies, like stubs, the SDK library may not be found at
build time (either because the implementation library is not among the
dependencies of the dexpreopted module, or because it's part of a
prebuilt, or because it's missing from the build altogether). In such
cases dexpreopt is useless, because dex2oat does not have access to the
full classpath (unless the &-classpath is used). Therefore do not
dexpreopt in such cases.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: If289088cfd103011ccb16165e95a97b30fd31b81
2020-08-27 11:47:15 +01:00
Ulyana Trafimovich ffcc1d5418 Merge "Export error reporting function to allow using it in other packages." am: 03333d0e2f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1409809

Change-Id: I19ebf395226992bbeaf6be36a482f6e52fb21f26
2020-08-27 09:46:07 +00:00
Ulyana Trafimovich 03333d0e2f Merge "Export error reporting function to allow using it in other packages." 2020-08-27 09:07:51 +00:00