Commit graph

35827 commits

Author SHA1 Message Date
Spandan Das
5d1b929f21 Port module_partition logic for RRO from Make to Soong
The default partition for RRO is "product/" in Make, but it was
"system/" in Soong. This CL ports the logic from Make to Soong

To implement this, a new function PathForModuleInPartitionInstall is
created that enables callers to provide the relevant partition

Bug: 158407753
Test: from build/soong, ran go test ./java
Change-Id: I05b02eae7fe57189aaad5109c26cccc5823518ef
2021-06-08 17:53:31 +00:00
Dan Albert
ad66593085 Disable ABI dumps on Darwin.
I'm not sure why these targets are getting built as part of the sdk
build anyway, but we don't need them.

Test: treehugger
Bug: http://b/156513478
Bug: http://b/190394921
Change-Id: I1ea0e75f459ad7cad648f96b67a4f2424d36fda7
2021-06-07 13:22:30 -07:00
Liz Kammer
2f26595072 Merge changes I4a5ea40c,I40ab16e3
* changes:
  Handle excludes_{shared,static}_libs
  Extract function to handle configurable excludes
2021-06-07 16:42:38 +00:00
Liz Kammer
d5c00287f0 Merge "Disable from mixed builds broken targets." 2021-06-07 14:57:47 +00:00
Liz Kammer
01b64bb216 Disable from mixed builds broken targets.
Test: build/bazel/ci/mixed_libc.sh
Change-Id: Ic478f5591874320750edea6097f1e415b1db9efa
2021-06-07 10:53:17 -04:00
Anton Hansson
70336cd2fa Make soong create sourcepath dirs
Sourcepath is set to dir of the Android.bp, but that dir does not
necessarily have any inputs for the metalava invocation defined in that
Android.bp. This leads to problems when metalava tries to read a
non-existent dir, so create it first.

Bug: 153703940
Test: m sdk dist
Change-Id: I8c2ca45c8f066cabf3247b9652a7094cefc047a9
Merged-In: I8c2ca45c8f066cabf3247b9652a7094cefc047a9
(cherry picked from commit 7eff3a8fc3)
2021-06-07 14:34:39 +01:00
Lukacs T. Berki
1af9316e0a Remove sort_bss_symbols_by_size.
Its only use was removed in aosp/1717013.

Bug: 187928080
Test: Presubmits.
Change-Id: If6acbfe8ba21ec4dc34166768ba1bde3bb78123c
2021-06-07 09:23:15 +02:00
Dan Albert
07538bb56b Merge "Use libabigail to track NDK ABIs." 2021-06-04 21:06:00 +00:00
Pirama Arumuga Nainar
e36a3d9d0d Merge "[cc] Cleanup unused function" 2021-06-04 20:31:00 +00:00
Pirama Arumuga Nainar
bd20ccb83e [cc] Cleanup unused function
Test: TH
Change-Id: I7c7fd1ada1303e8006b27923f124c836a4776d8b
2021-06-04 11:33:33 -07:00
Christopher Parsons
fa4ab8a7f4 Merge "Support mixedbuilds for static variant cc_library" 2021-06-04 15:09:21 +00:00
Liz Kammer
47535c51fa Handle excludes_{shared,static}_libs
Bug: 188497994
Test: bp2build.sh
Change-Id: I4a5ea40cbd804e8542fe33143e4926abc0c6164f
2021-06-04 10:15:36 -04:00
Liz Kammer
74deed445b Extract function to handle configurable excludes
This allows it to be used for other modules types and other properties
(e.g. static_libs & exclude_static_libs).

Test: go test soong tests
Bug: 188497994
Change-Id: I40ab16e3b540ece0a6684558b32f7e8e25df6f24
2021-06-04 10:15:34 -04:00
Liz Kammer
9abd62d133 Use maps in bazel *attribute types
This is to simplify the process of resolving label + exclude labels
across the various configuration axes we have and across the various
properties/modules that use this behavior.

Test: ci/bp2build.sh && ci/mixed_droid.sh
Change-Id: I8efae3e75ddb365384f5caaf5bb504a5206618d3
2021-06-03 17:37:56 -04:00
Dan Albert
f1d14c7e67 Use libabigail to track NDK ABIs.
The local diffing behavior is currently flagged off so we can land
this in stages.

Test: pytest cc
Test: treehugger
Test: development/tools/update_ndk_abi.sh
Test: m ndk
Bug: http://b/156513478
Change-Id: Iccb314411bc74ea3ddfea8b85b0539709295f65a
2021-06-03 14:29:03 -07:00
Chris Parsons
bcc9b88d49 Support mixedbuilds for static variant cc_library
Test: mixed_droid CI
Change-Id: I3126b528b375462d78e8146b5432d1e5cec20829
2021-06-03 16:52:46 -04:00
Colin Cross
37b3626f2c Merge "Remove registerOverrideMutator" 2021-06-03 17:30:05 +00:00
Ivan Lozano
42b7157ff6 Merge changes I4976d3e1,I4c53b937,I502eaa4b
* changes:
  Rust rlib vendor snapshot support.
  Export cc functions for snapshotting Rust rlibs.
  Rust cdylib/statliclib support for vendor snapshot.
2021-06-03 16:54:14 +00:00
Chris Gross
471370b2e2 Merge "Use broader permissions when archiving files." 2021-06-03 16:42:25 +00:00
Ivan Lozano
39f901a137 Merge "Export cc vendor functions for usage by rust." 2021-06-03 15:50:36 +00:00
Ivan Lozano
3149e6ed18 Rust rlib vendor snapshot support.
Adds support for snapshotting Rust rlibs. This allows us
vendor-specific code that uses rlib-only linkage until dylib
snapshot support is added.

Bug: 184042776
Test: m nothing # new Soong tests pass
Test: Example test Rust vendor module builds
Test: m dist vendor-snapshot # includes rlibs
Change-Id: I4976d3e1efec0ee778cc97730d45be471dffb678
2021-06-03 08:36:09 -04:00
Ivan Lozano
d1dec54988 Export cc functions for snapshotting Rust rlibs.
Export additional fuctions, structs, and interfaces from cc for use in
the rust package to allow for rlib snapshotting.

Bug: 184042776
Test: m nothing
Change-Id: I4c53b9378d5d5b5973dbd23ab692cdfb2ede60b9
2021-06-03 08:34:47 -04:00
Ivan Lozano
1921e8003d Rust cdylib/statliclib support for vendor snapshot.
Adds support for platform vendor_available Rust FFI libraries and
binaries to be included in the vendor snapshot.

Because rlib and dylibs are not yet in snapshots, libstd cannot be
included in a vendor snapshot. As a result, vendor-specific Rust code
can't be guaranteed to work with the platform-provided vendor_available
modules built with a newer toolchain. For now, a check is added
indicating vendor-specific Rust code is unsupported.

This changes the linkage for vendor variants of these modules to default
to rlib linkage since dylibs cannot be included in the snapshot yet.

Bug: 184042776
Test: m nothing # new Soong tests pass
Change-Id: I502eaa4bb962eb87ff868fcf49b435f0d2f982e6
2021-06-03 08:32:05 -04:00
Ivan Lozano
d67a6b0a88 Export cc vendor functions for usage by rust.
This CL exports and refactors some cc vendor-snapshot related functions
so they can be reused by rust modules to support vendor snapshotting.

Bug: 184042776
Test: m nothing
Change-Id: I12706e62ce0ac3b2b4298085fafc1d77b8e0a0c4
2021-06-03 08:31:55 -04:00
Jingwen Chen
c306326fea Merge "bp2build: split as, c, and cpp srcs for cc_library" 2021-06-03 10:15:27 +00:00
Jingwen Chen
14a8bda31e bp2build: split as, c, and cpp srcs for cc_library
This CL adds support for cc_library to correctly split c, as and cpp
srcs in shared/static nested props, as well as splitting
the *filegroup* deps in those props, where each filegroup is expanded
into its own c, cpp and as srcs filegroups. This ensures that the
correct sources go into cc_library_static's underlying cc_libraries for
c, cpp and as sources respectively.

See the bp2build conversion test for a better visualization.

Bug: 183064430

Test: TH
Change-Id: I29add5140672d042adff65527d8b65f4a5f0a05b
2021-06-03 05:00:37 +00:00
Chris Gross
fa5b4e909b Use broader permissions when archiving files.
Using broader premissions for archived files allows them to be more
easily used when extracted. For example, defaulting regular files to
0644 will allow other tooling to use a file without the need to change
permissions manually.

Bug: 189919409
Test: m dist and inspected file permissions of archived files
Change-Id: I4a0f8075206391254c639ecf865639bb9e8df0bf
2021-06-02 16:14:45 -07:00
Spandan Das
8e590ea854 Merge "Create Make flags to set source tree as ReadOnly in soong builds" 2021-06-02 19:23:11 +00:00
Mohammad Islam
6da49c6b72 Merge "Do not build compressed APEX" 2021-06-02 17:29:51 +00:00
Samiul Islam
d365449fae Do not build compressed APEX
This script expects to build uncompressed APEX and use them as
prebuilts.

Bug: 189926000
Test: build_mainline_modules.sh
Change-Id: If0f62c2baa3db3c079b2913fcdc3dafd66394011
2021-06-02 15:34:42 +01:00
Colin Cross
c92738a24b Merge changes I9e62c703,I4c2ae2a2,I899c2946
* changes:
  Support dist_group property instead of owner for setting sdk dist subdirectory
  Add test for java_sdk_library dist properties
  Move java_sdk_library tests to sdk_library_test.go
2021-06-02 14:33:47 +00:00
Christopher Parsons
abca1d19a4 Merge "Clear mixed build denylist." 2021-06-02 14:18:23 +00:00
Jose "Pepe" Galmes
7e21d3cd04 Merge "Fix duplicate variations when using the VSDK." 2021-06-02 03:31:07 +00:00
Jingwen Chen
adf5564f94 Merge "Fix OUT_DIR lookup in mixed builds." 2021-06-02 03:22:18 +00:00
Yuntao Xu
a8f4e62b8d Merge "add the LOCAL_DISABLE_TEST_CONFIG variable" 2021-06-01 22:11:59 +00:00
Colin Cross
7cbf1d68ec Merge "Fix propagating EMPTY_NINJA_FILE from multiproduct_kati to minibp" 2021-06-01 21:55:25 +00:00
Spandan Das
a3639e62cd Create Make flags to set source tree as ReadOnly in soong builds
The following two Make vars control RO/RW access to the source tree
1. BUILD_BROKEN_SRC_DIR_IS_WRITABLE
2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST

By default, (1) will be truthy.
- this ensures that this CL is a non breaking change across all products
- different products can opt in to set is as "false"

Bug: 174726238
Test: from build/soong dir, ran go test ./ui/build
Change-Id: I4d55ac74f02b2a73194d31506a9010162620b25a
2021-06-01 21:40:49 +00:00
Elliott Hughes
2a8b0530fa Merge "Rename gccCmd mingwCmd now that's all it's used for." 2021-06-01 21:40:16 +00:00
Chris Parsons
45cffa4479 Clear mixed build denylist.
Test: mixed_libc and mixed_droid CI
Change-Id: Ib9c37fba00a7c13c38b77171a7ddc59ef82ec515
2021-06-01 16:59:34 -04:00
Colin Cross
986b69aa51 Support dist_group property instead of owner for setting sdk dist subdirectory
Reusing the owner property is confusing, especially when the property is
required on every java_sdk_library module.  Create a new dist_group property
to use instead.

Bug: 186723288
Test: TestJavaSdkLibraryDist
Change-Id: I9e62c703a95d6b63cafa60bffb1b37ba85388593
2021-06-01 13:40:44 -07:00
Colin Cross
30c491b885 Add test for java_sdk_library dist properties
Add tests that cover the owner, core_lib and dist_stem properties.

Bug: 186723288
Test: TestJavaSdkLibraryDist
Change-Id: I4c2ae2a23dcd9a668c46ed5cc23b1d7dcfae798a
2021-06-01 13:40:17 -07:00
Colin Cross
1d2b6b3b2e Move java_sdk_library tests to sdk_library_test.go
Seperate the java_sdk_library tests into their own file.

Bug: 186723288
Test: go test ./java/...
Change-Id: I899c2946cb2234dc595a4281e64bbb239b89bda8
2021-06-01 13:40:17 -07:00
Colin Cross
f3bdbcbea3 Fix propagating EMPTY_NINJA_FILE from multiproduct_kati to minibp
I6dca478f356f56a8aee1e457d71439272351390b replaced calling
build/blueprint/bootstrap.bash with running minibp directly,
but didn't propagate the EMPTY_NINJA_FILE environment variable
to minibp.  Since everything that uses EMPTY_NINJA_FILE is
executed directly from soong_ui now, replace the EMPTY_NINJA_FILE
environment variable with a config bool and pass it to minibp.

Bug: 189148777
Test: build/soong/build_test.bash --dist --incremental --shard-count=300 --shard=1 && du out/multiproduct
Change-Id: I4d64275ce02c5d68948012f71ac4dc3795af9e85
2021-06-01 11:43:55 -07:00
Treehugger Robot
ebdf61ece2 Merge "Remove versioned LLNDK stubs" 2021-06-01 18:38:52 +00:00
Christopher Parsons
c5e4a0750d Merge "Remove elements from denylist that are obsolete" 2021-06-01 15:17:10 +00:00
Jingwen Chen
8c52358ad7 Fix OUT_DIR lookup in mixed builds.
In mixed builds, Bazel operates in <root>/out/soong/workspace, but the real
OUT_DIR is just <root>out/, not <root>/out/soong/workspace/out. This CL
ensures that the correct OUT_DIR is passed to mixed builds's bazel by
making OUT_DIR absolute.

Also add STANDALONE_BAZEL to build_test's Bazel smoke test.

Test: TH
Change-Id: If8b4058d43bf821f5196016f9b0ad38edfe18716
2021-06-01 12:07:40 +00:00
Treehugger Robot
dddb0152a5 Merge "Use fingerprint when min_sdk is current or none" 2021-06-01 09:45:58 +00:00
Treehugger Robot
72aedde483 Merge "Handle product vars *flags props in cc* modules" 2021-05-31 08:21:19 +00:00
Anton Hansson
ee7891acec Merge "Remove support for removed_dex_api_filename" 2021-05-28 13:23:18 +00:00
Yuntao Xu
7a31855228 add the LOCAL_DISABLE_TEST_CONFIG variable
Introduce and set the variable LOCAL_DISABLE_TEST_CONFIG varaible to be
true for the `android_test_helper_app` type modules.

Bug: 188927912
Test: rum 'm module-name' (`android_test_helper_app` type module)
Test: TreeHugger
Change-Id: I5db1029f31d8afe1ca5e9fab95e39d751971058d
2021-05-27 17:53:46 -07:00