Commit Graph

33672 Commits

Author SHA1 Message Date
Frederick Mayle
5b2ed7a0f5 cargo_embargo: add option to set module visibility
Bug: 269356487
Test: ran on crosvm repo
Change-Id: Ibcbdd26115c0e54d3b2825e26083ed74000b7563
2023-02-15 10:55:17 -08:00
Treehugger Robot
66f9ab6962 Merge "Extend cargo2android.py version matching to include alpha and beta crates" 2023-02-03 22:01:40 +00:00
Colin Cross
602c2483a5 Extend cargo2android.py version matching to include alpha and beta crates
The ring crate hasn't had a non-alpha release in over two years, and
may need to be updated to an alpha release.  Modify the version regex
in cargo2android.py to recognize the alpha version as part of the
version suffix.

Test: manually run cargo2android.py in redshell
Change-Id: If48d5be339d10bc3e6651485b0038b7219403077
2023-02-03 12:39:51 -08:00
Treehugger Robot
c60a5da303 Merge "Rolling to 34.0.0. for UDC." 2023-02-03 18:01:03 +00:00
Shaju Mathew
43940506b3 Rolling to 34.0.0. for UDC.
Bug: 267330961

Test: Treehugger

Change-Id: Ieeb199230e9f037cfeb7dfa16ecc8eead17ac574
Signed-off-by: Shaju Mathew <shaju@google.com>
2023-02-02 17:03:59 -08:00
Hsin-Yi Chen
9b286a1967 Merge "Diff array types" 2023-02-02 08:27:42 +00:00
Hsin-Yi Chen
6ecc9e3997 Merge "Rename GenericFieldDiffInfo to RecordFieldDiffResult" 2023-02-02 06:31:49 +00:00
Hsin-Yi Chen
64930c428f Diff array types
This commit implements the function that compares array size, alignment,
and element type.

Test: ./test.py ; update prebuilts/clang-tools and build
Bug: 255702405

Change-Id: I4f25d22f060cfda04bbd88b9c2521461b95e6829
2023-02-02 12:58:35 +08:00
Jeffrey Vander Stoep
7b902e93f4 Merge "c2a: make Rust version matchin regex less exact" 2023-02-01 18:12:39 +00:00
Jeff Vander Stoep
b06dd5c7e2 c2a: make Rust version matchin regex less exact
Allow custom version like 1.65.0.p1 (added in aosp/2404317).

Resolves warning:
WARNING: cannot find RustDefaultVersion in
development/scripts/../../build/soong/rust/config/global.go
Change-Id: I6fced7695473e025b0f739f9986df932d2c3f5fe

Test: cargo2android.py --config cargo2android.py
no warning

Change-Id: I43ff81f061477fc0322f27fef1c950954130dbc6
2023-02-01 14:23:40 +01:00
Hsin-Yi Chen
eb5797a263 Rename GenericFieldDiffInfo to RecordFieldDiffResult
Test: ./test.py
Bug: 255702405
Change-Id: I7e1112697f75b0a93ab821a128054e7e80acd6e1
2023-02-01 16:22:31 +08:00
Jeffrey Vander Stoep
6e50b8e094 Merge "Include non-local tests by path" 2023-02-01 07:42:21 +00:00
Treehugger Robot
c3e0908508 Merge "Platform tools 33.0.4: rev bump" 2023-01-31 20:51:47 +00:00
Shaju Mathew
fc4c4f311f Platform tools 33.0.4: rev bump
Bug: 267330961
Bug: 267327613
Bug: 248249899

Test: Treehugger
Change-Id: I7ce0c5b90e8b8f7be6c43dcc6190389bfe24ac8f
2023-01-31 11:11:48 -08:00
Jeff Vander Stoep
408e5db8d9 Include non-local tests by path
Import paths for non-local tests because including tests
directly has proven to be fragile and burdensome. For example,
whenever a project removes or renames a test, all the TEST_MAPPING
files for its reverse dependencies must be updated or we get test
breakages. That can be many tens of projects that must updated to
prevent the reported breakage of tests that no longer exist.
Similarly when a test is added, it won't be run when the reverse
dependencies change unless/until update_crate_tests.py is run for its
depenencies. Importing TEST_MAPPING files instead of tests solves
both of these problems. When tests are removed, renamed, or added,
only files local to the project need to be modified. The downside is
that we potentially miss some tests. But this seems like a reasonable
tradeoff since it's primarily unit tests that are missing, and all
unit tests are always run on the host for every presubmit.

See aosp/2400500 as an example of what test mapping files now
look like after this change.

Test: run it over all projects in external/rust/crates
Change-Id: I2b644f9ebf97968c9928f5b1756b2ab199e8e7ca
2023-01-30 13:10:25 +01:00
Treehugger Robot
b1fbcaf684 Merge "VSDK fake snapshot may read hwasan modules" 2023-01-27 06:16:32 +00:00
Charisee Chiw
1ef73b3454 Merge "Change requests for Rust update v1.66.0" 2023-01-26 23:26:02 +00:00
Justin Yun
172671beea VSDK fake snapshot may read hwasan modules
Bug: 234772527
Test: build and update fake snapshot with SANITIZE_TARGET=hwaddress
Change-Id: Ia31bc4958f11c12c89cab6efb098eda8ab67fc85
2023-01-25 16:46:46 +09:00
Treehugger Robot
8f9307b9d7 Merge "Add a rename mapping for libatomic to libatomic_rust" 2023-01-25 02:46:27 +00:00
Charisee
b1bf592d68 Change requests for Rust update v1.66.0
Test: ./build.py --lto=thin
Bug: 263153841
Change-Id: I7cd07a67291213dac8c80fa6b85cf746066ffb1d
2023-01-25 01:20:41 +00:00
Chris Wailes
13b1ca483d Add a rename mapping for libatomic to libatomic_rust
Bug: 229895468
Test: cargo2andoid.py --config cargo2android.json
Change-Id: Icf542d1398f9cd378bba845445b2dab34bb0b317
2023-01-24 16:31:14 -08:00
Chris Wailes
a7b72f4a02 Merge "Fix warnings from Rust 1.65.0" 2023-01-20 21:24:17 +00:00
Treehugger Robot
95e0aacc63 Merge "Add FLAG_IMMUTABLE in DevTools app" 2023-01-20 13:27:34 +00:00
Chris Wailes
33e7c091f5 Fix warnings from Rust 1.65.0
Bug: 250026064
Test: m rust
Change-Id: If6428513f3d6324a2930720baa69e374ea8f4d7f
2023-01-19 16:17:21 -08:00
Yabin Cui
7d47151afb Merge "Update clang-tools build to clang-r475365b" 2023-01-19 20:42:44 +00:00
Treehugger Robot
085867a244 Merge "Fix adb_py module." 2023-01-19 01:23:54 +00:00
Dan Albert
dcf513a013 Fix adb_py module.
Apparently these tests are used, they are just defined in
//packages/modules/adb, so atest can't find them here.

Bug: http://b/265846006
Test: ran adb_integration_test_device
Change-Id: If1d82280ab51e80497d235f55582688b78c00f5b
2023-01-18 22:23:38 +00:00
Frederick Mayle
c72989659a Merge "cargo_embargo: new cargo2android tool" 2023-01-18 21:31:44 +00:00
Frederick Mayle
77eb4ba473 cargo_embargo: new cargo2android tool
A fork of cargo2android, initially aimed at big imports like crosvm.

* Faster run time when there are many packages (30 min -> 1 min for
  crosvm).

* `--reuse-cargo-out` feature allows iterating on most of the config
  with sub second run time.

* Most options can be specified per-package.

Bug: 261486161
Test: ran on crosvm and checked diffs
Change-Id: Iaf3f4732e828a6f8b281f0e63fe1e0e1e9e98631
2023-01-18 11:48:09 -08:00
Yabin Cui
deddd88b27 Update clang-tools build to clang-r475365b
Also remove -std=c++14 flag. Because clang 16 uses c++17
by default. And some headers don't compile with c++14.

Bug: 253033919
Test: run build-prebuilts.sh
Change-Id: Ia76c227831ed62a9de190fb1d816f23d7c92fad2
2023-01-18 10:27:50 -08:00
Hsin-Yi Chen
160df5c455 Merge "Add a field for arrays of unknown bound" 2023-01-18 02:12:17 +00:00
Dan Albert
bf8030234b Merge changes from topic "restructure-adb.py"
* changes:
  Fix tests.
  Make this a proper python package.
  Remove python 2 garbage.
  Add type information to adb module.
2023-01-17 18:50:50 +00:00
Shaju Mathew
4e13a43693 Merge "Add py.typed file to export types to dependents." 2023-01-17 15:25:34 +00:00
Hsin-Yi Chen
3a51bf53f1 Add a field for arrays of unknown bound
The ABI tools do not diff the array length. They cannot distinguish
between arrays of unknown bound (e.g., int foo[]) and arrays of zero
length (e.g., int bar[0]). To implement array diff, this commit adds
"is_of_unknown_bound" field to the ABI dumps. It defaults to false so
that it can be omitted for common cases.

Test: ./test.py ; update prebuilts/clang-tools and build
Bug: 255702405
Change-Id: I5db163eb62e95fa01377ef7202e70cc2a0e89524
2023-01-16 17:36:38 +08:00
Dan Albert
808c90cf8d Fix tests.
Bug: None
Test: pytest
Change-Id: Ibe4259750a8d6f1800b5f659a80b301226d6929d
2023-01-13 14:30:19 -08:00
Dan Albert
91e796d227 Make this a proper python package.
Python is picky about directory structure. Ever since python 3 the tests
have not been able to run because the import won't work. This fixes that
problem.

Bug: None
Test: None
Change-Id: I4a626f130e4ca3cd2c9b69804083dfe6daffb5f7
2023-01-13 14:30:19 -08:00
Dan Albert
ac3c9fd05e Remove python 2 garbage.
This code hasn't worked since the python 3 switch, because `unicode`
doesn't exist any more. The problems that this code worked around were
all python 2 problems as well, so it's no longer needed.

Bug: None
Test: ran test.py on windows and mac
Change-Id: Ifacaed5cddc6c9ee9d9d9872c2f2851150ace468
2023-01-13 14:30:18 -08:00
Dan Albert
316dbf5332 Add type information to adb module.
mypy still complains about a few things here, but that looks to be
mostly coming from code that is very, very dead in python 3.

The tests don't run, and haven't since the python 3 switch. Will try to
revive those next, but it likely requires moving files around to fix the
package structure (source needs to go in a subdirectory to make a real
package, as do the tests).

Bug: None
Test: mypy . && pylint .
Change-Id: Ide55a41babecbd6684b73787b17e7f5fdb81c090
2023-01-13 14:30:18 -08:00
Sekyeong
4a9a733d6b Add FLAG_IMMUTABLE in DevTools app
Happened IllegalArgumentException on DevTools app.
  package : com.android.development
Because PendingIntent requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE.

Test : DevTools - Connectivity - press START SCREEN TOGGLE button

Change-Id: I998c74f974d8f555e8016b2a319e1a9a4a4f2669
Signed-off-by: Sekyeong <sekyeong.heo@samsung.com>
2023-01-11 13:02:51 +09:00
Hsin-Yi Chen
e07e343451 Merge "Fix the bug that generates multiple definition of references" 2023-01-10 03:08:11 +00:00
Nataniel Borges
20b563e65e Merge "Update winscope proxy to version 1.0" 2023-01-09 12:36:09 +00:00
Nataniel Borges
7353794edc Update winscope proxy to version 1.0
Bug: 264573983
Change-Id: Ie7e14b11c3b3a866a649b4e013a60fe542d3d754
Test: open winscope and proxy and dump wm and sf states
2023-01-09 12:14:09 +00:00
Hsin-Yi Chen
6e5894f6a2 Fix the bug that generates multiple definition of references
If a type ID is persent in local_to_global_type_id_map,
ModuleMerger functions should report that was_newly_added_ = false.

Test: ./test.py ; update prebuilts/clang-tools and build
Bug: 255702405
Change-Id: I0fbe68ebbc6b8df3ea4ae36a017d0bb61bc7d553
2023-01-07 16:24:43 +08:00
Treehugger Robot
a8802bc47a Merge "Revert "Provide a script to update the generated Android.bp"" 2023-01-03 05:19:58 +00:00
Justin Yun
699b519ec1 Revert "Provide a script to update the generated Android.bp"
This reverts commit c7c0e42748.

Reason for revert: This workaround is no longer required.

Change-Id: If85cb87c2af02b321bfa484bdfe791ede144d490
2023-01-02 07:12:19 +00:00
Hsin-Yi Chen
25a02ee161 Merge "Determine struct extensions before calling IRDiffDumper" 2022-12-30 09:55:24 +00:00
Hsin-Yi Chen
a062a6cf35 Determine struct extensions before calling IRDiffDumper
This commit moves the functions that determine struct extensions from
ir_diff_representation.cpp to abi_diff_helpers.cpp. The functions
are called before IRDiffDumper so that the IR and the dumper do not
include the diff logic.

Test: ./test.py
Bug: 259148872
Change-Id: I93aaa3028bf6a30312f0b0e5b1ef5f6ae1041f21
2022-12-30 16:33:48 +08:00
Shuo Wang Hsu
eb91e5586a Merge "Support building crate variants." 2022-12-29 19:29:01 +00:00
Shuo Wang Hsu
be3f0d9d11 Support building crate variants.
The cargo2android.json config file now supports the key "variants" with
a list of entries containing keys and build name suffix. Each entry
will produce a different library (or binary). Keys supplied for each
variant will overwrite any existing ones specified in the config file.

See an example of the protobuf crate on aosp/2368788.

Test: None
Change-Id: Iaca67c7f22718c27b3cb118d9794f1ff01d31c84
2022-12-28 15:39:42 -08:00
Hsin-Yi Chen
82b8191b50 Merge "Allow extending qualifiers of function parameters and return values" 2022-12-28 09:31:24 +00:00