Commit graph

27459 commits

Author SHA1 Message Date
Tom Cherry
271f4acd72 Revert "Include system/core/liblog/include instead of using symlinks"
Revert submission 1428983-no-log-header-symlinks

Reason for revert: Build breaks
Reverted Changes:
I248a2f045:Include system/core/liblog/include instead of usin...
Ic189e0f59:Remove logging symlinks from system/core/include

Change-Id: I9ee896f5fde36c879c182365295c1f5a5a39a76b
2020-10-05 19:24:12 +00:00
Tom Cherry
f6a4e63413 Merge "Include system/core/liblog/include instead of using symlinks" am: 24ee3605fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429369

Change-Id: I2d3a7994578d9766ac85231189046eec2759f59b
2020-10-05 17:35:57 +00:00
Tom Cherry
24ee3605fa Merge "Include system/core/liblog/include instead of using symlinks" 2020-10-05 15:26:51 +00:00
Paul Duffin
f78b75224f Merge "Add prebuilt_visibility property" am: cbda59333c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441935

Change-Id: I6228adbeabd2cf7e1ce957964c269e40b553be2a
2020-10-05 12:13:00 +00:00
Paul Duffin
cbda59333c Merge "Add prebuilt_visibility property" 2020-10-05 11:41:55 +00:00
Treehugger Robot
e74f6092de Merge "Remove stale apex_available dependency." am: 0400ede359
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435497

Change-Id: I9ab452e3dd054fa68dd64f829c829cf58af8f996
2020-10-04 23:26:28 +00:00
Treehugger Robot
0400ede359 Merge "Remove stale apex_available dependency." 2020-10-04 22:52:57 +00:00
Ivan Lozano
46df6b07e3 Merge "rust: Allow rust_bindgen to use cc_defaults." am: 4e7b26a434
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439751

Change-Id: I161ce227d518125f5cd13607b4b5dcb669101b18
2020-10-03 00:35:24 +00:00
Ivan Lozano
4e7b26a434 Merge "rust: Allow rust_bindgen to use cc_defaults." 2020-10-03 00:22:49 +00:00
Ivan Lozano
9197667b21 Merge "rust: Add static binary support" am: e934c5ba7e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1446955

Change-Id: I5d9a7613f7231107828a8a6be28e9f6b3d0b1e5b
2020-10-02 22:31:26 +00:00
Ivan Lozano
e934c5ba7e Merge "rust: Add static binary support" 2020-10-02 21:48:00 +00:00
Colin Cross
1348ce3f13 Don't make SplitPerApiLevel imply UseSdk
UseSdk was returning true when SplitPerApiLevel returned true,
which was causing the platform variant of SplitPerApiLevel
module to compile against the SDK.  Check SplitPerApiLevel
separately in the sdkMutator instead.

Test: m checkbuild
Change-Id: I0ae667d48a3b7b96709a6cad8e8ea9701659fc2a
2020-10-02 13:00:19 -07:00
Colin Cross
b6135218a4 Remove vendor crt special case
It doesn't seem to be necessary, crt objects can get headers via
local_include_dirs.

Test: m checkbuild
Change-Id: Id357adc054c85576aa9935d0acbee5f1ae3dcbff
2020-10-02 13:00:19 -07:00
Colin Cross
9f720ce52a Fix apex_test.go and add it to Android.bp
apex_test.go wasn't listed in the Android.bp file, which allowed
it to bitrot.  Make the API level methods take a PathContext
so that they can be called from a test using configErrorWrapper.
Also fix an int that was converted to a string.

Test: apex_test.go
Change-Id: I1ff87134c837bd5d344d22550baabde10d1b0b2e
2020-10-02 13:00:14 -07:00
Pirama Arumuga Nainar
18fc11a093 Merge "Update to use clang-r399163b." am: 0b88bf33fc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1443739

Change-Id: Iadcdee65467e9e5ee4ccbb33beeac8ef52c605f4
2020-10-02 16:57:04 +00:00
Pirama Arumuga Nainar
0b88bf33fc Merge "Update to use clang-r399163b." 2020-10-02 16:37:52 +00:00
Ivan Lozano
bf63d00c54 rust: Add static binary support
Adds the "static_executable" property to rust_binary modules which
allows for building fully static executables. This only impacts bionic
targets.

Bug: 169434439
Test: rust_binary module with static_executable true builds, runs on
      device.

Change-Id: I83c19fddd070859b7e56d248237cfd73e1768519
2020-10-02 12:31:23 -04:00
Paul Duffin
55a2ad6c6b Merge "Explicitly specify visibility in sdk/module_exports snapshot" am: 958dd4f6ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441934

Change-Id: I125abb0ba408a538d3b311ac2dc5b2ee5f49ca2a
2020-10-02 10:05:49 +00:00
Paul Duffin
157f40f056 Add prebuilt_visibility property
Some mainline modules provide an `sdk` and one or more set of
module_exports. When the snapshots are unpacked into separate prebuilts
directories (one per snapshot) then any dependencies from a member of
one snapshot to a member of another may require the latter to have
additional visibility rules.

Previously, these rules had to be added to each source module. This
change allows additional visibility rules to be specified on the
sdk/module_exports that are added to all the prebuilts in its snapshot.

Bug: 155921753
Bug: 168301990
Test: m nothing
Change-Id: Ia3eacb5749981f04770ae9872a8013e43c5c6ef1
2020-10-02 10:59:41 +01:00
Paul Duffin
958dd4f6ad Merge "Explicitly specify visibility in sdk/module_exports snapshot" 2020-10-02 09:45:22 +00:00
Colin Cross
0730dce1c0 Merge changes from topic "sanitizer-runtime-stubs" am: 973f46703b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1437232

Change-Id: I5807ce1617f2d78828c914fea8858d26a5883409
2020-10-02 01:22:03 +00:00
Artur Satayev
a0a4061836 Track allowed transitive deps in any updatable module. am: 4e1f2bd0d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1437234

Change-Id: Ie8fb3d8d69d3cbf68b7652f3465a6f268498c8d8
2020-10-02 01:21:27 +00:00
Colin Cross
973f46703b Merge changes from topic "sanitizer-runtime-stubs"
* changes:
  Add version dependencies to sanitizer runtime dependencies
  Fix prebuilt library stubs
  Track allowed transitive deps in any updatable module.
2020-10-02 01:06:10 +00:00
Kris Alder
394e9930b9 Merge "add acknowledgements field to fuzz_config" am: 0f1a0f7a81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1442242

Change-Id: Idb94b2a56d21b00db4a717247ccdace1c52667a1
2020-10-02 00:45:30 +00:00
Kris Alder
0f1a0f7a81 Merge "add acknowledgements field to fuzz_config" 2020-10-01 23:58:01 +00:00
Paul Duffin
d99d997238 Explicitly specify visibility in sdk/module_exports snapshot
This change ensures that each prebuilt in a snapshot explicitly
specifies its visibility even when that visibility is the current
default. This is done for two reasons:
1. It simplifies a follow up change that adds visibility rules to an
   existing set of rules.
2. It ensures that the snapshots are independent of the current Soong
   default visibility.

The latter is important because we intend to switch from modules being
visible to everyone by default (i.e. //visibility:public) to only being
visible to modules in the same package (i.e. //visibility:private). By
making the snapshots of modules that do not specify any visibility
explicitly specify that they are "//visibility:public" it ensures that
the snapshots will not need to be changed when the default changes.

Bug: 168301990
Test: m nothing
Change-Id: Ia034f4a1e5124c17f46d73b0e9a6c5f2a251038e
2020-10-01 18:20:13 +01:00
Ivan Lozano
cee1e90ed3 Merge "rust: Refactor staticStd to stdLinkage" am: 45dda43df0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441253

Change-Id: I90ce086becadb199f85bd513b6a5f37d6ed4a846
2020-10-01 12:38:29 +00:00
Ivan Lozano
45dda43df0 Merge "rust: Refactor staticStd to stdLinkage" 2020-10-01 12:25:38 +00:00
Paul Duffin
c218ace51c Merge "Add support for using sdk_version: "module_<ver>"" am: 3a7e672abe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1442937

Change-Id: If112463c2a44fa6d7e39c0763107783a2aa2f555
2020-10-01 10:57:39 +00:00
Paul Duffin
3a7e672abe Merge "Add support for using sdk_version: "module_<ver>"" 2020-10-01 10:36:23 +00:00
Stephen Hines
5060c9e558 Update to use clang-r399163b.
Bug: http://b/155835175
Test: aosp_blueline
Change-Id: I34d26da72a36b16491cf328075d817b073acfc0d
2020-09-30 19:07:42 -07:00
Janis Danisevskis
1edd039bff Add allow rust rule for android.system.keystore2 vts tests.
Bug: 160623310
Test: N/A
Change-Id: Ie501a56c3ed6c1352fc57b5b956df6ac3f4af39f
2020-09-30 14:43:40 -07:00
Colin Cross
e7257d2019 Add version dependencies to sanitizer runtime dependencies
The hwasan runtime has stubs, make the function to add all version
variants of a shared library available to the sanitizer mutator.

Test: m checkbuild
Change-Id: Ie4124022140f8520834d7bf7b59f0499cd381083
2020-09-30 21:17:59 +00:00
Colin Cross
d48fe734cd Fix prebuilt library stubs
There were multiple stacked issues with prebuilt library stubs that
cancelled eachother out.  Prebuilts were never considered to be
DirectlyInAnyApex by the AndroidMk logic to handle stubs libraries
because it looked it up in the global list of modules in apexes
using the name with the "prebuilt_" prefix.  Fixing that to use
ctx.BaseModuleName() exposed a second issue, that stubs variants
for prebuilt libraries were never created, so there was no latest
version to expose to Make.

Making the *prebuiltLibraryLinker type work with all of the
methods that handle stubs should really be done with an interface
and methods implemented on *libraryDecorator, but that would
also cause other types like that embed libraryDecorator to
participate in stubs that may trigger more issues.  I'd like
to replace those methods anyways, so just manually handle
*prebuiltLibraryLinker for now.

Test: m checkbuild
Change-Id: I1267ee01659ad9ab11d75318c6c6bdbf8f72a061
2020-09-30 21:17:51 +00:00
Artur Satayev
4e1f2bd0d8 Track allowed transitive deps in any updatable module.
Instead of tracking per module and per module variant, track allowed
list of dependecies for all modules combined. This avoids issues with
different products and different downstream branches having different
build graphs.

To compare allowed_deps.txt vs head, run:
:; m -j out/soong/apex/depsinfo/new-allowed-deps.txt.check

To update source allowed_deps.txt, run:
:; build/soong/scripts/update-apex-allowed-deps.sh

Bug: 149622332
Test: m
Change-Id: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
Merged-In: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
(cherry picked from commit 453555083b)
(cherry picked from commit e5207cd9a6)
2020-09-30 21:17:42 +00:00
Martin Stjernholm
3b8ca4c317 Remove stale apex_available dependency.
Test: m
Bug: 142944931
Change-Id: I9c69ef64eb9eecd45f6272a1d79bf77ee910815c
2020-09-30 17:40:17 +01:00
Paul Duffin
fb6ae5bc73 Add support for using sdk_version: "module_<ver>"
Fixes a panic when trying to build something with
sdk_version: "module_30".

Test: m nothing
Change-Id: I9b2ce50957f59e2bead335ffa58888e15cda1f78
2020-09-30 16:20:17 +01:00
Thiébaud Weksteen
c944017c9f Merge "rust: document manual configuration for rustfmt" am: 996de36d0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1393184

Change-Id: Ib85fe502686392c4e40e2cfa28b428212e3485cb
2020-09-30 15:12:39 +00:00
Thiébaud Weksteen
996de36d0f Merge "rust: document manual configuration for rustfmt" 2020-09-30 14:41:14 +00:00
Thiébaud Weksteen
bec87ec33a rust: add darwin as host arch am: 4f6c766992
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1442775

Change-Id: Id000716f42751f9efb2bcce097e463e948428df0
2020-09-30 14:23:47 +00:00
Thiébaud Weksteen
4f6c766992 rust: add darwin as host arch
Bug: 169739272
Test: m nothing
Change-Id: I3ef2a3dd7e80b9fe47edb6eb04ed9d37e8d58096
2020-09-30 14:16:12 +02:00
Thiébaud Weksteen
f9edb0a56a Merge changes Icbbf176c,I52beadc8 am: d2ff08710b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441335

Change-Id: Ia6abe0d82d20b2e8006fe485481ef7e94abe0c2b
2020-09-30 08:58:01 +00:00
Thiébaud Weksteen
425a542e2b rust: document manual configuration for rustfmt
Currently, rustfmt requires to be enabled per repository. Add a comment
near the current project allowed_list as a reminder.

Test: None
Bug: 160223496
Change-Id: Iecf8d5b693620541a00d8ddc905549652025eed9
2020-09-30 08:37:42 +00:00
Thiébaud Weksteen
d2ff08710b Merge changes Icbbf176c,I52beadc8
* changes:
  rust: Add ref to generated sources (aidl, bindgen)
  rust: refactor projectGeneratorSingleton
2020-09-30 08:21:36 +00:00
Yi Kong
a5e515b85a Merge "Do not implicitly turn on lto for static libraries" am: 21de510915
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440495

Change-Id: I0bdb93e2163d158583f4839a3c5320bf868364ec
2020-09-30 02:17:29 +00:00
Yi Kong
21de510915 Merge "Do not implicitly turn on lto for static libraries" 2020-09-30 01:42:10 +00:00
Treehugger Robot
7cfb58c3f4 Merge "Add support of test data to python_host_test" am: 025ae97b0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433195

Change-Id: I0ba0185ff291ef1aac2ddcb2efd5a40706b739d0
2020-09-29 22:41:17 +00:00
Kris Alder
2598c9b350 add acknowledgements field to fuzz_config
This will be used to track who should be recognized for any CVEs
resulting from bugs found by a fuzz target.

Bug: 145745999
Test: n/a
Change-Id: I21e065ab8013d013b1d9f42981c729b996163387
2020-09-29 22:28:18 +00:00
Treehugger Robot
025ae97b0e Merge "Add support of test data to python_host_test" 2020-09-29 21:56:19 +00:00
Thiébaud Weksteen
a6351caf12 rust: Add ref to generated sources (aidl, bindgen)
Test: SOONG_GEN_RUST_PROJECT=1 m nothing; Edit
  system/security/keystore2/selinux/src/lib.rs;
  Check name resolution in IDE.
Bug: 168263887
Change-Id: Icbbf176c4355c3043807ce3fe0c3967c4a1374e2
2020-09-29 20:23:49 +02:00