Commit Graph

24926 Commits

Author SHA1 Message Date
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
Thiébaud Weksteen d458745f15 cc: export Stripper struct
The cc stripping logic can be reused for Rust. Export the Stripper
structure for that purpose. Extract the strip-related flags from
builderFlags into StripFlags. Add the method flagsToStripFlags
(similarly to flagsToBuilderFlags).

Add the helper method disableStripping on libraryDecorator.

Test: m
Bug: 153430439
Change-Id: I11aef1abb8d498a4c1672500a7398279edf7f548
2020-08-27 10:13:42 +02:00
Colin Cross fb6ddeb5fd Merge changes I6aa28149,I1ff35ea9 am: 3806fc0943
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1406258

Change-Id: Ie4d910fb6851d8da7ea1b21fb02c08e512ba3e78
2020-08-27 00:59:23 +00:00
Colin Cross 3806fc0943 Merge changes I6aa28149,I1ff35ea9
* changes:
  Remove TestApexWithJniLibs_Errors
  Create image variations for sh_binary
2020-08-27 00:29:36 +00:00
Treehugger Robot 613222477c Merge "apex: pass "apex name" as literal to apex variants" am: d1ac3a79e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403227

Change-Id: I44b34edae5122fa674ec81e81ef1809e48109edf
2020-08-27 00:10:52 +00:00
Treehugger Robot d1ac3a79e0 Merge "apex: pass "apex name" as literal to apex variants" 2020-08-27 00:01:15 +00:00
Treehugger Robot bf49e6e7fc Merge "bootstrap is added for cc_binary only when the module is in an APEX" am: 23a6a41c66
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1409927

Change-Id: Iac3325aafb10daddbd8cc33a60b5815ab857ee94
2020-08-26 23:53:38 +00:00
Treehugger Robot 23a6a41c66 Merge "bootstrap is added for cc_binary only when the module is in an APEX" 2020-08-26 23:28:54 +00:00
Ivan Lozano 2093af23c0 [rust] Pass cc dependencies as linker flags.
In order to support cc dependencies which do not start with the 'lib'
prefix, we can't pass them through the -l flag. Instead, we can pass
them directly to linker flags.

Bug: 166151658
Test: cd external/rust/; mma
Test: cd external/crosvm/; mma
Test: Test linking to a cc dep that does not begin with 'lib'

Change-Id: I5acbf3d3405e66446f3eae600b35683c4eb3d8a5
2020-08-26 17:07:29 -04:00
Ivan Lozano 8ee04afe36 Merge "Link device binaries dynamically by default." am: 4d947f0ea8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403871

Change-Id: Ic617ce674f03c9cacaba90519694b437f66e1626
2020-08-26 20:49:03 +00:00
Matthias Maennich 22fd4d1b82 soong: add support for module specific lexer flags
To support module specific lexer flags, this follows the same strategy
as the yacc flags:
 - add LexProperties to the BaseCompilerProperties
 - propagate those flags to the generator generation (i.e. genLex)
 - add a placeholder for custom flags
 - replace the placeholder with the concatenated flags

This might not support escaping very well, but I figured that this is a
very edge case. Support for escaping etc. could be added later on.

Bug: 159682555
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I31a3b783bb05213fe1621191031952b41b318103
2020-08-26 21:41:33 +01:00
Ivan Lozano 4d947f0ea8 Merge "Link device binaries dynamically by default." 2020-08-26 20:32:32 +00:00
Colin Cross 42507337e5 Only request image and version variations for device SDK dependencies
AddFarVariationDependencies was broken, which allowed sdk modules to
request dependencies using image and version variations, even for
host modules that do not have image or version variations.  Make
the image and version variations conditional on device sdk modules.

Test: go test ./sdk
Change-Id: I59b7a32a3782254fd5feb828a5258ee13d4db812
2020-08-26 11:51:51 -07:00
Raphael Gault 70b96b0d64 Introduce new Arm64 arch variant with dot product features
In order to rely on `-march`/`-mcpu` compiler flags for feature
detection, we introduce a new arch variant based on armv8.2 with the
addition of dot product features.

Test: test-art-target on Pixel 4.

Change-Id: I4d97db6129e2cd718a2b21008d36ec767739f925
2020-08-26 15:52:22 +00:00
Joel Galenson 4915521f1d Migrate away from removed option am: 6945e9b650
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1411147

Change-Id: I74770ad7a04a4a01e4f2521385f7d5fb8dc0e75d
2020-08-26 02:09:05 +00:00