Commit Graph

8199 Commits

Author SHA1 Message Date
Treehugger Robot
0821b3bff7 Merge "Add android_sdk_repo_host to build platform-tools&build-tools" am: adf2b3e68f am: e89cd9f2b5 am: 57fbf57305 am: 4dc404e3bc am: de46f5cc11
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1828170

Change-Id: I36da12f89cd704d3f3174490ee7f74da2c6fd959
2021-10-15 03:39:17 +00:00
Treehugger Robot
adf2b3e68f Merge "Add android_sdk_repo_host to build platform-tools&build-tools" 2021-10-15 02:04:45 +00:00
Stephen Hines
004cbd0aa1 Merge "Switch to clang-r433403b (13.0.3)" am: f7bc97ce7a am: 7996129541 am: a13cb2b3b0 am: 32ff8710a6 am: 8493cd0d60
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1857593

Change-Id: I6471cc7387ef2dd74e3a000b6e33ab9c2e403afa
2021-10-14 19:56:59 +00:00
Ivan Lozano
39b0bf0326 rust: Package shared libraries with fuzzer zips
Rust fuzzers were not packaging up their CC shared dependencies.
This would lead to fuzzers using the shared libraries included on
system, which may not be sanitized, leading to incorrect behavior.

This refactors the relevant code from CC and calls it from the Rust
build logic.

Bug: 202282599
Test: output rust fuzzer zip file includes shared dependencies.
Change-Id: I92196eb0141733797a67eae24f8e9aedea94c3bc
2021-10-14 15:31:47 -04:00
Stephen Hines
f7bc97ce7a Merge "Switch to clang-r433403b (13.0.3)" 2021-10-14 18:46:08 +00:00
Yi Kong
002fdcfcfe Add Global ThinLTO option (2nd try) am: 8ea56f9da9 am: 370a0be4b8 am: 2d2452c88e am: 2168e3ba48 am: ead0d42fa9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1857453

Change-Id: I7d62c691182d3cdc567e77779d0c3f02e5a28f4d
2021-10-14 12:39:42 +00:00
Yi Kong
8ea56f9da9 Add Global ThinLTO option (2nd try)
Instead of making everything into ThinLTO variant by default (it works
but many Soong tests don't like this, and got bit rot due to lack of
active builder for this configuration), let the default option be
ThinLTO and no LTO be a special variant.

Test: m GLOBAL_THINLTO=true
Test: m
Bug: 195134194
Change-Id: I2fd98061ba55eba1fdfdd056fb2f8c2051fd2553
2021-10-14 17:34:13 +08:00
Stephen Hines
b7b0ae12be Switch to clang-r433403b (13.0.3)
Bug: http://b/202099787
Test: m
Change-Id: Id923948c56b0308842c94846edd6528fd26dbf72
2021-10-14 01:21:21 -07:00
Jiyong Park
81dbef72d4 Merge "Remove use_apex_name_macro" am: ddf4ebae19 am: c05ccb3724 am: 7330b2652e am: e9907ef104 am: 28e6e4098c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1853655

Change-Id: Ida69fb806665f65159f19516b06d8e35e4d99b56
2021-10-14 03:46:27 +00:00
Jiyong Park
ddf4ebae19 Merge "Remove use_apex_name_macro" 2021-10-14 02:32:43 +00:00
Jiyong Park
91f1b42226 Remove use_apex_name_macro
The property is no longer used.

Bug: 161926892
Test: m
Change-Id: I98948152d6d09bde2eeba4875c7ca01531a24930
2021-10-14 08:57:59 +09:00
Liz Kammer
d2871189b1 Update version_script to be handled as linkopt
This allows us to handle this consistently between cc_binary and
cc_library* types.

Test: build/bazel/ci/bp2build.sh
Change-Id: I996f42bbe591215217c3d561662e775925b871ff
2021-10-13 08:36:58 -04:00
Dan Willemsen
9fe1410213 Add android_sdk_repo_host to build platform-tools&build-tools
The Android SDK has been built with Make up until now, monolithically,
then split up into several sdk-repo zip files for different purposes.
The Mac and Windows SDKs really only need to contain the platform-tools
and build-tools pieces, but due to this monolithic sdk zip, we had to
build the whole SDK first.

This adds an `android_sdk_repo_host` module that can build these
platform-tools and build-tools zips.

Bug: 187222815
Change-Id: I55809e1d7447dd65e22461f921b2b8abb6d5f822
2021-10-13 01:25:02 -07:00
Yi Kong
0636a598c3 Merge "Re-enable unused-command-line-argument warning" am: a9e56f062d am: 0a7e9a5283 am: 904191ecea am: 23627d319a am: 62ecc57732
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1799592

Change-Id: I55a5eb146d2b70a7cfa7028aeff42a830b0a1725
2021-10-13 05:26:06 +00:00
Yi Kong
a9e56f062d Merge "Re-enable unused-command-line-argument warning" 2021-10-13 04:12:12 +00:00
Yi Kong
62e75f507d Re-enable unused-command-line-argument warning
Turn on the warning by default, unless USE_CCACHE is set.

Test: presubmit
Bug: 197177755
Change-Id: I01e2b0f1be3f4bd3a8d78bb4ab053b4db227596d
2021-10-13 04:11:56 +00:00
Jingwen Chen
308ea77fe4 Merge "Convert cpp_std to be an attribute instead of a copt." am: e466cc7ea6 am: 91368f3a67 am: f561d7ca91 am: 06496515f2 am: 86b57b788b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1853143

Change-Id: I0cc50e3323495e184f1a9132b7bea9df5253c1b5
2021-10-13 00:27:20 +00:00
Jingwen Chen
e466cc7ea6 Merge "Convert cpp_std to be an attribute instead of a copt." 2021-10-12 23:13:53 +00:00
Liz Kammer
5773904832 Merge "bp2build: Improve handling of generated_sources" am: 7e1956643c am: b3e79728ad am: c2ac7f1d74 am: 15e76c48b2 am: 25c2657d31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1851764

Change-Id: I40765b34dd0c69b174291453967b76ceda163088
2021-10-12 18:42:26 +00:00
Liz Kammer
7e1956643c Merge "bp2build: Improve handling of generated_sources" 2021-10-12 17:29:23 +00:00
Liz Kammer
222bdcff5c bp2build: Improve handling of generated_sources
Test: build/bazel/ci/bp2build.sh
Change-Id: Id5f8b6ae9bbf1e90d72854daafb8b1f86f7241ea
2021-10-11 14:15:51 -04:00
Jingwen Chen
5b11ab1a69 Convert cpp_std to be an attribute instead of a copt.
This attribute is then converted into a feature in cc_library_static.

Fixes: 202518741
Test: CI
Change-Id: I070b56a1e96680ffad0466d085caaab2e9308ebc
2021-10-11 17:44:33 +00:00
Rajesh Nyamagoud
3e4a48850b Support for OMAPI Vendor stable interface
Changes are made to include OMAPI VNDK libraries.

Bug: b/180639372
Test: m -j64
Change-Id: I6b2122c5f9c696e4676fdbd85eefb5bc194a7342
2021-10-08 22:38:37 +00:00
Liz Kammer
8ccd99660b Merge "bp2build; Update handling of linker flags" am: 2649c7913a am: e6450855c6 am: bb88d20495 am: 4841f6ffda am: 4f8094fef7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1846573

Change-Id: I70a8271bf8b13ce2d7e0aab11b6acb79bc6ac89d
2021-10-08 21:25:21 +00:00
Liz Kammer
2649c7913a Merge "bp2build; Update handling of linker flags" 2021-10-08 20:09:32 +00:00
Jingwen Chen
8c5f070847 Add bp2build support for cpp_std. am: 97b8531492 am: aff7f12f5a am: ffa51d929e am: 6ac44b93dc am: 4350025d8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1850354

Change-Id: Ie6279620041da5d656ca8f0e520191f7705cd1fa
2021-10-08 17:40:25 +00:00
Jingwen Chen
97b8531492 Add bp2build support for cpp_std.
This converts cpp_std and gnu_extensions into a -std copt, if cpp_std is
specified or gnu_extensions is false if cpp_std is not specified.

I chose to go with this copts approach because the tradeoff is a much
simpler setting than adding a new attr(s) everywhere that uses features
to set the flag.

This approach limits the number of user-configurable knobs (since users
would then be able to set std in _both_ copts and the new attr). But it
does rely on the user copt overriding the toolchain's default gnu++17
version, which can mean a `-std` flag showing up twice in the action.

Fixes: b/202462232
Test: b build //system/libziparchive:libziparchive
Change-Id: I81dad029059461739b91f318d662e089edb46b84
2021-10-08 11:16:20 +00:00
Xin Li
800112b97f Merge "Merge Android 12" 2021-10-07 23:50:21 +00:00
Jingwen Chen
0f0ede8468 Add support for nocrt by translating it to link_crt in bp2build. am: 6ada589f6e am: 6de8f75712 am: d68ad80f07 am: 968dbaf81e am: 49ee9639cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830053

Change-Id: I4284e192dec9b38d01bfb35ba2db12e0870be169
2021-10-07 21:07:35 +00:00
Liz Kammer
0eae52e0de bp2build; Update handling of linker flags
Test: build/bazel/ci/bp2build.sh
Bug: 197920036
Change-Id: I6e3100574fa0e40bcd8cf0e6af0efd3310aa41bf
2021-10-07 16:07:40 -04:00
Jingwen Chen
6de8f75712 Add support for nocrt by translating it to link_crt in bp2build. am: 6ada589f6e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830053

Change-Id: I2fbe236b2a81eb5f223ab566369b8dcfa7b04bca
2021-10-07 19:49:37 +00:00
Jingwen Chen
6ada589f6e Add support for nocrt by translating it to link_crt in bp2build.
If nocrt is true, then the compilation for cc_shared_library,
cc_binary (shared or static binaries) will _not_ link against their
respective crtbegin and crtend libraries.

nocrt is true only for the Bionic libraries themselves. For everything
else that links against the Bionic runtime, crtbegin and crtend
libraries are used. This makes the "nocrt: false" case the majority.
Hence, if nocrt is explicitly false, we omit the generating attribute in
bp2build.

If nocrt is explicitly true (link_crt is false), the Starlark macro will
disable the link_crt cc_toolchain feature.

Test: new tests
Test: CI
Fixes: 187928070
Fixes: 197946668
Change-Id: I8947789930e599dc802d8eae440859257d044475
2021-10-07 14:04:39 +00:00
Treehugger Robot
28f9c8d9d9 Merge "Bp2Build common properties auto-handling" am: d905146590 am: 3e745e63f3 am: 98f0fd07ca am: 6aaaea1740 am: 37ba2d3f8d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815376

Change-Id: I110e0ec8b35ab3f86164e7cbd4db47aa01b65601
2021-10-04 20:15:38 +00:00
Colin Cross
8c1986947a Merge "Export SOONG_CC_API_XML to Make outside androidmk" am: f79f4c3199 am: fec737d6fe am: a385e8aa55 am: 79d0f5f517 am: d32f52da4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1842574

Change-Id: Ie593492cd05b426fb736821f3bb349104f0997bf
2021-10-04 19:34:39 +00:00
Treehugger Robot
3e745e63f3 Merge "Bp2Build common properties auto-handling" am: d905146590
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815376

Change-Id: I38f1063302ea90583a51e625076e6232b4364ab7
2021-10-04 19:20:28 +00:00
Treehugger Robot
d905146590 Merge "Bp2Build common properties auto-handling" 2021-10-04 19:02:07 +00:00
Colin Cross
fec737d6fe Merge "Export SOONG_CC_API_XML to Make outside androidmk" am: f79f4c3199
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1842574

Change-Id: Ie7312e0928bfe7692454f8d9a074c10f90fa3f2e
2021-10-04 18:44:31 +00:00
Colin Cross
f79f4c3199 Merge "Export SOONG_CC_API_XML to Make outside androidmk" 2021-10-04 18:32:15 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
447f6c99c9 Bp2Build common properties auto-handling
Introduce `commonAttributes` & `fillCommonBp2BuildModuleAttrs used in
CreateBazelTargetModule

Adapt `bp2BuildInfo` to use `commonAttrs` instead of `Name`.
And thus also all downstream users of `CreateBazelTargetModule`.

As initial user, the Soong `required` property will be
translated to Bazel's `data`.

Bug: 198146582, 196091467
Test: build_converstion_test.go:TestCommonBp2BuildModuleAttrs
Test: go test
Test: mixed_{libc,droid}.sh
Change-Id: Ib500e40f7e2cb48c459f1ebe3188962fc41ec124
2021-10-04 14:43:04 +00:00
Colin Cross
7d55681ede Merge changes from topics "bp-bionic-cts-tests", "cts-per-testcase-directory" am: 2df9ebf9ca am: 10ef62ea67 am: 6625d51343 am: 9fd25f214e am: 0401a96fe7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838375

Change-Id: I018853330f0dc99cc5e00d81f24acb6aa320b8b4
2021-10-01 17:46:54 +00:00
Colin Cross
10ef62ea67 Merge changes from topics "bp-bionic-cts-tests", "cts-per-testcase-directory" am: 2df9ebf9ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838375

Change-Id: I9fd93be8154f2f1372ccde1eb9a37690738692b7
2021-10-01 16:46:26 +00:00
Colin Cross
2df9ebf9ca Merge changes from topics "bp-bionic-cts-tests", "cts-per-testcase-directory"
* changes:
  Add data_bins property
  Support per-testcase directories in all test suites
  Add environment variables to cc_genrule commands
2021-10-01 16:27:55 +00:00
Chris Parsons
34c5414d57 Support building libcrypto via mixed builds am: a37e195182 am: 486b80a0d5 am: e97eea3e78 am: 78e2b56196 am: e114e66006
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1839353

Change-Id: Ibfaa1f0001cf115a2d7764c7aa9420bf59407bb1
2021-09-30 21:17:12 +00:00
Colin Cross
ceaa5328f0 Export SOONG_CC_API_XML to Make outside androidmk
This relands Ie0a945d879de4f99ce76d005aea8041719c244f7 with a fix
to prevent building XMl files for multiple variants of a library.

The SOONG_CC_API_XML values are needed for modules that are not
exported to Make, export them from a singleton that covers all
modules instead of an AndroidMkProvider that may not be called
for some modules.

Bug: 193819970
Test: forrest
Change-Id: I54710c00901976a736e88126f406e02b1f3c3586
2021-09-30 13:11:48 -07:00
Chris Parsons
486b80a0d5 Support building libcrypto via mixed builds am: a37e195182
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1839353

Change-Id: I34a5ec794874856a415e2c5415ef8b08ef3a7e21
2021-09-30 20:10:15 +00:00
Chris Parsons
a37e195182 Support building libcrypto via mixed builds
This required the following fixes to bp2build:
  - Correctly handle Bionic_* and Linux_* targets
  - Correctly handle cc_object's selects
  - Generate linker_script, stl, and system_dynamic_deps for cc_object in bp2build

Test: USE_BAZEL_ANALYSIS=1 m adbd
Change-Id: I753fd18df8ae551fb69df07e4174527c5388f289
2021-09-30 12:30:36 -04:00
Treehugger Robot
3e13a74af9 Merge "Add unit tests for cpp/assembly flags." am: 4352a8e696 am: d758c9bccd am: 80e43462ce am: 5bb4970a5e am: 0f7b52baa0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1841793

Change-Id: Ia961c71c733c933e4898280e15bd4a57876321e1
2021-09-30 16:17:41 +00:00
Treehugger Robot
d758c9bccd Merge "Add unit tests for cpp/assembly flags." am: 4352a8e696
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1841793

Change-Id: Iea9755567590efb6fcd161a5e92182386b2fff47
2021-09-30 15:24:35 +00:00
Liz Kammer
08572c6d45 Add unit tests for cpp/assembly flags.
Test: go test soong tests
Change-Id: Idd4b8d558b9bccf92b63c80abff19792ea3ff766
2021-09-30 10:11:04 -04:00
Colin Cross
62bfb7aed2 Merge "Revert "Export SOONG_CC_API_XML to Make outside androidmk"" am: 6f37dba455 am: 59f957abbf am: 21ae24ec3f am: 299063b1b4 am: f353a32c74
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1841188

Change-Id: I073b25a2895eae53e9531566d56ab769010993c8
2021-09-30 04:33:53 +00:00