Commit Graph

3771 Commits

Author SHA1 Message Date
Liz Kammer
0425ac6016 Merge changes I4a5ea40c,I40ab16e3 am: 2f26595072 am: cc1961d51d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1726010

Change-Id: I4f1af9e641322edc52dd60206168e43c28d44d3e
2021-06-07 17:18:03 +00: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
6418442092 Merge "Disable from mixed builds broken targets." am: d5c00287f0 am: d231a92247
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1728573

Change-Id: I1397ce861dcf414b65e29e4abe48ca43d49f0049
2021-06-07 15:50:39 +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
Dan Albert
c0702f6a37 Merge "Use libabigail to track NDK ABIs." am: 07538bb56b am: eaeae632a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388354

Change-Id: I1a21874562cc3b8e3bef0ff236565eaf901cef53
2021-06-04 21:49:23 +00:00
Dan Albert
07538bb56b Merge "Use libabigail to track NDK ABIs." 2021-06-04 21:06:00 +00:00
Liz Kammer
6044fae776 Use maps in bazel *attribute types am: 9abd62d133 am: e90edc333c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1725151

Change-Id: I3d75f3405b099d21151334598a346f8c1c592e9b
2021-06-04 14:29:03 +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
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
Colin Cross
ebd6253f0e Merge "Remove registerOverrideMutator" am: 37b3626f2c am: d1f1e590e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1698867

Change-Id: I3455a84ac9f37577ef5dc5c0d6793c2e6bc2c25e
2021-06-03 17:58:46 +00:00
Colin Cross
37b3626f2c Merge "Remove registerOverrideMutator" 2021-06-03 17:30:05 +00:00
Jingwen Chen
d85bdd8833 Merge "bp2build: split as, c, and cpp srcs for cc_library" am: c306326fea am: 2b978911bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1723161

Change-Id: Iee2fcb1cec1bc09d05fb0c57e7be3ba608bcc588
2021-06-03 11:07:38 +00: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
Jeff Sharkey
af898dbc17 platform/build/soong - S is now 31 am: 7412091dcc
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/14743945

Change-Id: Ic687aac0e899ac9b58eb0b66773149018eeb758b
2021-06-02 20:14:08 +00:00
Jeff Sharkey
799822d7af Merge changes from topic "may27-sdk" into sc-dev
* changes:
  Hacky workaround for half-finalized builds.
  platform/build/soong - S is now 31
2021-06-02 20:11:14 +00:00
Christopher Parsons
cf5248b134 Merge "Clear mixed build denylist." am: abca1d19a4 am: f222246684
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1723728

Change-Id: I536fefafaefe06e74da9af2d59216019a011012e
2021-06-02 15:04:15 +00:00
Christopher Parsons
abca1d19a4 Merge "Clear mixed build denylist." 2021-06-02 14:18:23 +00:00
Jingwen Chen
c1d99f9a6f Merge "Fix OUT_DIR lookup in mixed builds." am: adf5564f94 am: 103131efc6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1722656

Change-Id: I8b5dd28fede360a30683b2f5916b7070b85b3273
2021-06-02 04:12:01 +00:00
Jingwen Chen
adf5564f94 Merge "Fix OUT_DIR lookup in mixed builds." 2021-06-02 03:22:18 +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
Christopher Parsons
db65d0f191 Merge "Remove elements from denylist that are obsolete" am: c5e4a0750d am: 1dfbbff536
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1721640

Change-Id: Ib1a0b67daf718f783ef583e99bfa0cd967df6954
2021-06-01 16:01:39 +00:00
Jeff Sharkey
7412091dcc platform/build/soong - S is now 31
Bug: 171506470
Test: Build
Change-Id: I7b02ab24d12ea07463efd319a7ff059751416990
2021-06-01 06:49:05 -06: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
Chris Parsons
2affc3bf59 Remove elements from denylist that are obsolete
Test: mixed_droid CI
Change-Id: Ib4b4a5114362feea358da5a989b41bc01f1f7010
2021-05-27 18:06:51 -04:00
Colin Cross
3225be468a Make CopyDirectlyInAnyApex match the documentation
CopyDirectlyInAnyApex was documented to copy from child to parent, but
was copying from parent to child.  It is unused, so reverse it to
match the documentation.

Bug: 183759446
Test: next CL
Change-Id: I950c9b5416d66e83d76ca489aeb5e0572e005d5d
Merged-In: I950c9b5416d66e83d76ca489aeb5e0572e005d5d
(cherry picked from commit 4d4f7d6114)
2021-05-27 13:13:17 -07:00
Martin Stjernholm
c4f4cedc47 Merge "Drop "prebuilt_" prefixes from names registered in ApexInfo.InApexXxx."
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1719298

Bug: 180325915
Change-Id: I1fd96bad2326612d153fed31308914902f58d3ec
Merged-In: Icbe4e025ce1a4c8dd258ff95d326ca2f27905188
(cherry picked from commit f4c44417a3)
2021-05-27 17:23:16 +00:00
Martin Stjernholm
6912b71c08 Merge "Drop "prebuilt_" prefixes from names registered in ApexInfo.InApexXxx." am: 664b2cf89a am: 5eb4b21deb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1719298

Change-Id: I72b64b8f26bdb135838f8cf735b2ac7da84cdba7
2021-05-27 10:14:36 +00:00
Martin Stjernholm
664b2cf89a Merge "Drop "prebuilt_" prefixes from names registered in ApexInfo.InApexXxx." 2021-05-27 09:24:55 +00:00
Colin Cross
532e863da0 Merge changes I0116f5f4,I950c9b54,I967f5c42 am: 4ab2dd1afe am: 7ca753793f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1718475

Change-Id: I864c97d90aa8f2ec4e43ac9d39464ca257b608e2
2021-05-27 01:38:25 +00:00
Colin Cross
4ab2dd1afe Merge changes I0116f5f4,I950c9b54,I967f5c42
* changes:
  Treat java libraries in classpath fragments as directly in apex
  Make CopyDirectlyInAnyApex match the documentation
  Remove unused cc.copyDirectlyInAnyApexDependencyTag
2021-05-27 00:56:52 +00:00
Martin Stjernholm
be10503d3a Drop "prebuilt_" prefixes from names registered in ApexInfo.InApexXxx.
Neither InApexVariants nor InApexModules should have them. This allows
us to get rid of InApexVariantByBaseName as well.

Test: m nothing
Test: m nothing SOONG_CONFIG_art_module_source_build=false
Bug: 180325915
Change-Id: Icbe4e025ce1a4c8dd258ff95d326ca2f27905188
2021-05-26 17:05:17 +01:00
Rupert Shuttleworth
e33da475f9 Make GetTargetProperties() aware of more complex targets, like 'android_arm', instead of just 'android'. am: c194ffbcf3 am: 42b29a5b40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1712089

Change-Id: I2a68455e55701c2251d61a0db6855c34879fea93
2021-05-26 05:13:18 +00:00
Colin Cross
4d4f7d6114 Make CopyDirectlyInAnyApex match the documentation
CopyDirectlyInAnyApex was documented to copy from child to parent, but
was copying from parent to child.  It is unused, so reverse it to
match the documentation.

Bug: 183759446
Test: next CL
Change-Id: I950c9b5416d66e83d76ca489aeb5e0572e005d5d
2021-05-25 18:28:38 -07:00
Rupert Shuttleworth
c194ffbcf3 Make GetTargetProperties() aware of more complex targets, like 'android_arm', instead of just 'android'.
Test: Added new unit test and updated existing tests.

Test: bazel build //bionic/... //external/... //frameworks/... //system/...

Test: ./build/bazel/scripts/run_presubmits.sh

Change-Id: I250d1964f5cf42b92ddb929379d35d8c844423f7
2021-05-25 19:40:16 -04:00
Chris Parsons
7b632c48e6 Mixed build denylist rollback am: 26caa1b2de am: 297bc11711
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1718182

Change-Id: I41907806c97eb7e6f36af0b9a43c4084668d7b2b
2021-05-25 22:23:06 +00:00
Chris Parsons
26caa1b2de Mixed build denylist rollback
Previous changes broke mixed_droid CI, and reverting the denylist
changes should get the build green.

More rigorous testing and fixes to follow.

Test: `m linker` which was previously broken.
Change-Id: I9c009d3456ea0c553148316665c97bfb372606d7
2021-05-25 17:24:06 -04:00
Christopher Parsons
c311686ec6 Merge "Rollforward "Split asm and c flags and srcs in..."" am: e28a176a99 am: 47e19b1774
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1717990

Change-Id: Ia0ad960d0339fdfc308d63c8b77b7fad000d111d
2021-05-25 19:52:24 +00:00
Chris Parsons
990c4f4fc3 Rollforward "Split asm and c flags and srcs in..."
This fixes a test and rolls forward I28cf7437ee96cdf2fdbcb1eda2303691cff08ba4

Test: m nothing
Test: See I28cf7437ee96cdf2fdbcb1eda2303691cff08ba4
Change-Id: I0e450c28e70087e406e7b562d7e772785f177379
2021-05-25 12:15:52 -04:00
Colin Cross
cba30f8e8a Merge "Revert "Split asm and c flags and srcs in bp2build output"" am: 4f9d8d6482 am: 093a04ee0b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1717890

Change-Id: I132d4470234905227d5c8172914a7eaa141bbe45
2021-05-25 16:12:56 +00:00
Christopher Parsons
15f4842622 Merge "Split asm and c flags and srcs in bp2build output" am: ed73b76513 am: 9f4133b1a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1714835

Change-Id: I6d55ca20c08fec94f0f0454d13394acf8ff3c13d
2021-05-25 15:40:33 +00:00
Colin Cross
4f9d8d6482 Merge "Revert "Split asm and c flags and srcs in bp2build output"" 2021-05-25 15:21:36 +00:00
Colin Cross
52aa4e1fd4 Revert "Split asm and c flags and srcs in bp2build output"
Revert submission 1714835-roboleaf-asm-c

Reason for revert: TestCcLibraryStaticProductVariableSelects fails everywhere
Reverted Changes:
I28cf7437e:Split asm and c flags and srcs in bp2build output
I2b47e6b55:Split libraries by language in cc_library_static

Change-Id: I85d39a462f0a5b3f5ff3d685906813fab9f01358
2021-05-25 15:20:39 +00:00
Christopher Parsons
ed73b76513 Merge "Split asm and c flags and srcs in bp2build output" 2021-05-25 14:58:32 +00:00
Jingwen Chen
907d03cba5 Merge changes I3ecdeaab,I43720641 am: 962a8f0253 am: 94e25a1664
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1714195

Change-Id: I38cb1dadd97e1319287d96f960e02d0ae9bc3c0a
2021-05-25 13:58:30 +00:00
Jingwen Chen
962a8f0253 Merge changes I3ecdeaab,I43720641
* changes:
  Make BUILD file merging slightly smarter.
  bp2build/b: exit early in GENERATE_BAZEL_FILES=1.
2021-05-25 08:56:21 +00:00
Jingwen Chen
4910976314 Make BUILD file merging slightly smarter.
This change enables checked-in BUILD files like
prebuilts/clang/host/linux-x86/BUILD.bazel to be merged cleanly with the
bp2build generated one into the synthetic workspace.

The checked-in BUILD file contains a package() declaration that bp2build
also generates. To avoid double declaration, the BUILD file writer now
checks if the BazelTargets contain handcrafted targets. If so, it
delegates the package declaration to the handcrafted BUILD file instead.

This change also sorts the bp2build targets before the handcrafted ones,
and adds a section header to demarcate the two sets of targets.

Test: TH
Change-Id: I3ecdeaab3226b895b623daf0791d24a657f7a7c6
2021-05-25 07:01:55 +00:00
Treehugger Robot
5221b7664b Merge "Handle arch/os-specific product variables" am: c1ae9243a4 am: 91743e86ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1700827

Change-Id: Id941cac62a9a64a9d224038583b73421b432881e
2021-05-25 06:59:32 +00:00
Chris Parsons
af24cdd99f Split asm and c flags and srcs in bp2build output
This allows removal of almost all current items from the mixed build
denylist, which were previously broken due to being unable to separately
control flags for compilations of different languages within the same
target.

Note that this does not appropriately implement asm/c srcs and flags for
either the shared variant or the static variant. This will require a
followup.

Test: bp2build.sh and mixed_libc.sh CI scripts
Test: Updated b2build tests

Change-Id: I28cf7437ee96cdf2fdbcb1eda2303691cff08ba4
2021-05-24 21:49:14 -04:00