Commit Graph

6388 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
Yi-Yo Chiang
21d1c6d637 cc/sabi.go: Propagate ShouldCreateSourceAbiDump to reuseObjTag deps
`reuseObjTag` is a dependency from the shared variant of a `cc_library`
to the static variant. When such dependency exist, the shared variant
would reuse the object files of the static variant.
Thus if the shared variant requires ABI dump, then the static variant
would need to generate ABI dump as well.

Bug: 190339664
Test: m findlsdump
Change-Id: I015328d74acbeb89ff7622397e59b68864af34a4
2021-06-07 20:29:11 +08:00
Lukacs T. Berki
cb18077103 Remove sort_bss_symbols_by_size. am: 1af9316e0a am: 763d8e5198
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1728138

Change-Id: I40d776f224199eea91e69ff237dfcdf95e03adf5
2021-06-07 09:49:18 +00: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
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
Pirama Arumuga Nainar
adc58d324f Merge "[cc] Cleanup unused function" am: e36a3d9d0d am: 99419cf462
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1728211

Change-Id: I1d2a5f2b8a9f295ff57f9ee8ed4c8ddbb8780f5c
2021-06-04 21:03:57 +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
f00740e176 Merge "Support mixedbuilds for static variant cc_library" am: fa4ab8a7f4 am: 7c7686b551
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1725972

Change-Id: I4c2f7bb5bc354ef56e75259c4d744e1845efc0c9
2021-06-04 15:41:16 +00:00
Christopher Parsons
fa4ab8a7f4 Merge "Support mixedbuilds for static variant cc_library" 2021-06-04 15:09:21 +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
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
Ivan Lozano
4c23bb16ef Merge changes I4976d3e1,I4c53b937,I502eaa4b am: 42b7157ff6 am: acbf71ae2b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1719775

Change-Id: I772839da81467c6453500f994e060a859031a175
2021-06-03 17:26:21 +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
Ivan Lozano
529498258a Merge "Export cc vendor functions for usage by rust." am: 39f901a137 am: 99678b3669
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1716892

Change-Id: Iba88111c9631117e9280d26d2b3a1362c3f4db9c
2021-06-03 16:26:04 +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
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
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
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
Jose "Pepe" Galmes
5da30faf40 Merge "Fix duplicate variations when using the VSDK." am: 7e21d3cd04 am: 7508c6b797
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1720491

Change-Id: I1c831a29598f63bc1ae911358fd1a7ead9f79568
2021-06-02 04:12:09 +00:00
Jose "Pepe" Galmes
7e21d3cd04 Merge "Fix duplicate variations when using the VSDK." 2021-06-02 03:31:07 +00:00
Elliott Hughes
e51f891c43 Merge "Rename gccCmd mingwCmd now that's all it's used for." am: 2a8b0530fa am: 1b9fa5d148
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710949

Change-Id: Ic033240e074fbe92cfa325026bad4de39cb66b9d
2021-06-01 22:27:17 +00:00
Treehugger Robot
7577a2d094 Merge "Remove versioned LLNDK stubs" am: ebdf61ece2 am: db246b5784
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1698870

Change-Id: Ieed2cc19c37d477d5f90c2e42a901e90e7d748c9
2021-06-01 22:27:07 +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
Treehugger Robot
ebdf61ece2 Merge "Remove versioned LLNDK stubs" 2021-06-01 18:38:52 +00:00
Colin Cross
f58e5e8f24 Merge "Don't propagate ASAN through shared library dependencies" into sc-dev 2021-06-01 17:24:09 +00:00
Treehugger Robot
9c9c8e0055 Merge "Handle product vars *flags props in cc* modules" am: 72aedde483 am: 88a66219af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1719330

Change-Id: Ib995b400969601b5a803a56c14d903a81165dd68
2021-05-31 09:12:16 +00:00
Treehugger Robot
72aedde483 Merge "Handle product vars *flags props in cc* modules" 2021-05-31 08:21:19 +00:00
Rupert Shuttleworth
6981ce9f8c Add cc_prebuilt_library helpers for use by the llvm_prebuilt_library_static converter. am: ffd4582b86 am: ecedf43e7e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1712168

Change-Id: I70641ce38a2cbde196dc9418c2a348521c86a6c6
2021-05-27 20:47:53 +00:00
Colin Cross
58b783b460 Remove unused cc.copyDirectlyInAnyApexDependencyTag
Bug: 183759446
Test: go test ./build/soong/cc
Change-Id: I967f5c42cbf7722843a6455cbc2867a8912033cb
Merged-In: I967f5c42cbf7722843a6455cbc2867a8912033cb
(cherry picked from commit 243f3c250e)
2021-05-27 13:13:17 -07:00
Liz Kammer
ba7a9c5e4a Handle product vars *flags props in cc* modules
Test: build/bazel/ci/bp2build.sh
Bug: 188497994
Change-Id: Ifb379e370075d6a7bc55b82d79c210c31ef377e9
2021-05-27 13:57:01 -04:00
Jose Galmes
7fdc336b9f Fix duplicate variations when using the VSDK.
When using the VSDK there can be multiple variations of the same module
for core, product, vendor, recovery. If two or more of those variations
exist, a suffix must be added to the variation to avoid duplicate modules
with the same name.

Bug: 188717568
Test: m -j nothing
Change-Id: Ifd8fa5590a8e225a97c2a8e3110d5d5f20beb50d
2021-05-27 10:16:24 -07:00
Liz Kammer
d2f186a6ba Merge "Support empty srcs for configurable attrs" am: f6840284b6 am: 4fb2bdffee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1720031

Change-Id: I84ddfb65ec4c03cb3e246e2eba1c772e93ff73d2
2021-05-27 13:42:10 +00:00
Rupert Shuttleworth
ffd4582b86 Add cc_prebuilt_library helpers for use by the llvm_prebuilt_library_static converter.
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libFuzzer
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libomp
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libunwind
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libunwind-exported

Change-Id: I9343e19a149b62785e8ee3096254776c19675032
2021-05-27 09:07:57 -04:00
Liz Kammer
f6840284b6 Merge "Support empty srcs for configurable attrs" 2021-05-27 12:56:29 +00:00
Rupert Shuttleworth
eac63304a3 Merge "Add e.g. Target: { Android_arm: { ...} } support to LabelAttribute." am: 1b1ab6d7ab am: aff15276c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1720610

Change-Id: I48ba8df066f843eb011e5a89580937dbda907b1b
2021-05-27 10:14:45 +00:00
Rupert Shuttleworth
22cd2eb3d1 Add e.g. Target: { Android_arm: { ...} } support to LabelAttribute.
LabelListAttribute support was already added, but LabelAttribute support is needed for cc_import rules.

Test: Added unit test for version_script, which is the only supported LabelAttribute so far.

Change-Id: I4e86e7391586e0780623d06b794e7399f0ccd50e
2021-05-27 04:32:48 -04: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
Jose "Pepe" Galmes
e86a06a451 Merge "Fix change in logic introduced in https://r.android.com/1666563." am: 581dc930b2 am: ebf6fd1ca9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1718372

Change-Id: I25a3582c590c632cc6d05be882805c8832ba1a47
2021-05-26 21:43:16 +00:00
Jose "Pepe" Galmes
581dc930b2 Merge "Fix change in logic introduced in https://r.android.com/1666563." 2021-05-26 21:09:05 +00:00
Liz Kammer
2b07ec7b3b Support empty srcs for configurable attrs
Test: mixed build linkerconfig
Change-Id: I1ee56f7fa46ce2971ecae6d2ca9258631a32f46a
2021-05-26 16:58:54 -04:00