Commit graph

766 commits

Author SHA1 Message Date
Martin Geisler
46329e9ba4 Remove spurious trailing backslash in prefer_rlib docstring
Change-Id: I851306c73cb86df4bc4c82c3471ce3b6eaad9ded
2022-09-29 13:12:27 +00:00
Charisee
a688a793e4 rustc-1.64.0 Build 9099361
Test: m rust
Change-Id: I0f104dec7027a01524be155a63cae05f494c7101
2022-09-23 20:41:53 +00:00
Chris Wailes
af1e89e07b rustc-1.63.0 Build 8951290
Bug: https://issuetracker.google.com/issues/241303140
Test: m rust
Change-Id: Ie641a90154d5c3b9cedf671901116f68e5e47edb
2022-08-24 10:04:40 -07:00
Zhenhuang Wang
0ac5a431a9 Move common test_options properties into the android package
Multiple modules (e.g. java, cc, python, rust) define the `test_options`
field. Extract the common properties in test_options to share across
different test rules.

Bug: 240928948
Test: `refreshmod` and diff with original module-info.json
Change-Id: I404a7a157b4ccaa53d800ee2217559ff695bd825
2022-08-17 01:19:15 +08:00
Matthew Maurer
18fa8f641a Merge "Revert^4 "rust: Only allow bindgen to produce rlibs."" 2022-08-11 17:50:17 +00:00
Matthew Maurer
e94f3e73dd Revert^4 "rust: Only allow bindgen to produce rlibs."
199c188502

Change-Id: I28b353fa89354cc572806b2274169342a473a03c
2022-08-10 20:25:50 +00:00
Treehugger Robot
3a4088dfd1 Merge "Introduce cc_api_library" 2022-08-10 04:12:32 +00:00
Kiyoung Kim
487689eaee Introduce cc_api_library
Introduce cc_api_library, which reflects imported API from other
inner-tree. This cc_api_library module type will later refer from
the other ninja module which generates stub library from the interface
description.

Tested environment :
* original libc definition has been removed temporarily, to ensure that
  imported api stub library is being used from build
* Added new definition of libc as below
 cc_api_library {
  name: "libc",
  arch: {
    x86: {
      src: "libs/x86/libc.so",
    },
    x86_64: {
      src: "libs/x86_64/libc.so",
    },
  },
  header_libs: [
    "libc_headers",
  ],
  export_header_lib_headers: ["libc_headers"],
  min_sdk_version: "9",
  vendor_available: true,
 }

Bug: 236087698
Test: `ALLOW_MISSING_DEPENDENCIES=true m vendorimage` succeeded
Change-Id: I67070b0f3561aa2afd73b6c1c0fdf4255218baac
2022-08-10 10:12:18 +09:00
Matthew Maurer
801b058fe3 Merge "Revert^3 "rust: Only allow bindgen to produce rlibs."" 2022-08-02 23:28:26 +00:00
Matthew Maurer
199c188502 Revert^3 "rust: Only allow bindgen to produce rlibs."
9cc801ab7a

Change-Id: Ib59840b51b316c0ad03bc66565814dd96be0b072
2022-08-02 23:26:16 +00:00
Treehugger Robot
c4ee5535f1 Merge "Revert^2 "rust: Only allow bindgen to produce rlibs."" 2022-08-02 21:36:37 +00:00
Matthew Maurer
9cc801ab7a Revert^2 "rust: Only allow bindgen to produce rlibs."
b983c8971b

Change-Id: Ic82433885f7932be8cfe65433330527214807684
2022-08-02 16:57:30 +00:00
Matthew Maurer
d13d15a9c0 Merge "Revert "rust: Only allow bindgen to produce rlibs."" 2022-08-01 22:19:32 +00:00
Matthew Maurer
b983c8971b Revert "rust: Only allow bindgen to produce rlibs."
This reverts commit 53a452d1ff.

Reason for revert: Broken build

Change-Id: I4c1c6f2166c3729ef1916ad7c21e32599c5e692f
2022-08-01 21:59:00 +00:00
Matthew Maurer
a8ea3ff66e Merge "rust: Only allow bindgen to produce rlibs." 2022-08-01 20:50:41 +00:00
Matthew Maurer
53a452d1ff rust: Only allow bindgen to produce rlibs.
Generated bindings are intended to be slim translation layers, usually
consisting of nothing more than type signatures and constants.
Generally, they should also be used in exactly one location by the safe
wrapper for these bindings. By preventing them from building as
`dylib`s, we avoid the per-library overhead of these non-reused pieces
of code.

Additionally, default visibility restrict all bindgen modules to their
subpackages. This is being done both:
* to encourage use of a single safe bindings crate
* to avoid diamond dependency graphs with mixed rlib/dylib dependencies

Bug: 166332519
Test: m; Make sample module use dylib bindgen dependency, see build failure.
Change-Id: I8e9d9cb851c2ec99f4ed63e6e18c4ba26b29721c
2022-08-01 16:28:51 +00:00
Matthew Maurer
cf3844c879 rust: Rust is now GA for platform usage
Rust is now approved for general platform use without project-specific
review.

Bug: 240501326
Test: m
Change-Id: I6fd4c22ba2c6a3a5bac6f91fd087fe5cffe46c01
2022-07-28 06:57:26 -07:00
Charisee
d6a5b15dfe rustc-1.62.0.p1 Build 8836667
Test: m rust
Change-Id: I8e22ce766ccfb64263eba794aa75144c58ebb71a
2022-07-18 22:15:44 +00:00
Yi Kong
cc3ad51a36 Merge changes from topic "llvm-stable-r458507"
* changes:
  [bindgen] Allow unrecognised -Wno-* flags on LLVM_NEXT
  Add extra cflags for LLVM_NEXT
2022-07-15 07:30:57 +00:00
Cory Barker
b1c8940be1 Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ran them" 2022-07-14 16:26:41 +00:00
Yi Kong
4f664e9128 [bindgen] Allow unrecognised -Wno-* flags on LLVM_NEXT
Test: LLVM_NEXT=true m
Bug: 236798112
Change-Id: I5d1625a30d7271c94cba71347f17fbcb0b87f4ae
2022-07-14 12:38:06 +00:00
Cory Barker
a1da26fa9b Adding support for building AFLpp
Test: Build AFL fuzzers locally and ran them

Change-Id: Ie4fbd258c87663cf81d7d64d575b3da1d5febc17
2022-07-12 21:31:47 +00:00
Cory Barker
14058f2c4a Merge "Revert "Adding support for building AFLpp Test: Build AFL fuzzer..."" 2022-07-12 20:20:00 +00:00
Cory Barker
7bc91232d1 Revert "Adding support for building AFLpp Test: Build AFL fuzzer..."
Revert submission 2124256-AFLpp support in Soong

Reason for revert: It is breaking the build
Reverted Changes:
Ie07ec3368:Adding support for building AFLpp Test: Build AFL ...
I5bd6d1e9b:Adding support for building AFLpp Test: Built AFL ...

Change-Id: Id2eec1060f7532fec46293d0c207be800e6eaa03
2022-07-12 18:04:17 +00:00
Cory Barker
7e0b4bae8a Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ran them" 2022-07-12 17:21:05 +00:00
Cory Barker
f4b1c3a7a7 Adding support for building AFLpp
Test: Build AFL fuzzers locally and ran them

Change-Id: Ie07ec336892649192a844a4d0d231196673e34a0
2022-07-12 01:20:17 +00:00
Charisee
30332aee9b rustc-1.62.0 Build 8809119
Test: m rust
Change-Id: I6daa0f00428dc46bfb5cc1ca1ae8818fd233d708
2022-07-11 19:02:33 +00:00
Colin Cross
a8941ec69f Don't use prebuilt rust stdlibs for linux bionic
Linux bionic doesn't have rust stdlib prebuilts, don't use the prebuilts
when it is configured as the host os.

Bug: 216192129
Test: builds
Change-Id: I03425dee4b2e3659bf90c0a0c808cc286daa4b7f
2022-07-01 18:30:17 +00:00
Colin Cross
567d342ed8 Use musl rust prebuilts for USE_HOST_MUSL=true
Building rust code with musl enabled can load proc macro crates built
against musl into rustc, so we have to use a version of rustc also
built against musl.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Icd23b542a4b64a975850a8a4bb4b69183cc6c2c6
2022-07-01 02:58:14 +00:00
Colin Cross
1faf82305a Add rust musl arm and arm64 toolchains
Add rust toolchain configurations for arm-linux-musleabihf and
aarch64-linux-musl.

Bug: 236052820
Test: builds with linux musl arm64 host cross configured
Change-Id: Icfa73a75eac710e955f71a073cb4b7bb1cdfcc7a
2022-06-28 15:16:15 -07:00
Ivan Lozano
7f67c2a665 rust: Allow rust_ffi_shared in jni_libs
Allow listing rust_ffi_shared modules as a jni_libs dependency
in conjunction with platform_api: true. This allows inclusion by
android_app modules.

Bug: 237304791
Test: android_app module builds with a rust_ffi_shared dependency.
Change-Id: I3a28e1baa522ad8f9c2aa86f1d23b19ce9f967e1
2022-06-27 16:00:26 -04:00
Lukacs T. Berki
6c71676d6c Migrate sanitizers to transition mutators.
The logic is not 100% provably the same since HEAD was quite
confusing at some points, but I did make an effort to preserve
functional equivalence.

In case that effort was not enough, it should be pretty easy to
tweak the logic at HEAD since it's still quite malleable.

Bug: 231370928
Test: Presubmits.
Change-Id: I17b2efbfb5c4d0aedd922caed54ff8d857e578df
2022-06-18 06:20:28 +02:00
Chris Wailes
0a02aba00e rustc-1.61.0.p2 Build 8709792
Bug: https://issuetracker.google.com/issues/232437287
Bug: https://issuetracker.google.com/issues/216192129
Test: m rust
Change-Id: I84d4b9e70a53c0f057a286b77eb7dea6161c03a8
2022-06-13 12:05:33 -07:00
Treehugger Robot
fdc0540751 Merge "[rust/coverage] Use new flag for coverage instrumentation" 2022-06-07 23:44:02 +00:00
Pirama Arumuga Nainar
f1f6dd17d1 [rust/coverage] Use new flag for coverage instrumentation
> warning: `-Z instrument-coverage` is deprecated; use `-C
instrument-coverage`

Test: above warning is absent when running:
    $ m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS=* rust
Change-Id: I8687c04534db3c8a67f209b93ed13d54c2f86dc8
2022-06-07 11:15:59 -07:00
Charisee
2f46ea40d1 rustc-1.61.0.p1 Build 8688465
Test: m rust
Change-Id: Ic565f8d0aca4081d2afa5b6ee64ed9c3f1d30a3d
2022-06-07 01:04:42 +00:00
Charisee Chiw
2313b0c798 Merge "rustc-1.61.0 Build 8644170" 2022-06-02 15:32:37 +00:00
Charisee
65c99a27ac rustc-1.61.0 Build 8644170
Test: m rust
Bug: 232437287
Change-Id: I93add84ae6adaa8da4a68ce2608a561cbb08828a
2022-05-29 22:06:22 +00:00
Hasini Gunasinghe
783e76c738 Merge "Add system/core/trusty/keymint-rust to allow list" 2022-05-27 17:57:51 +00:00
Hasini Gunasinghe
07851ffae4 Add system/core/trusty/keymint-rust to allow list
Bug: 225036046
Test: N/A
Change-Id: I2177960dc40c79a07d3acbc798b5235a26cfa72d
2022-05-26 22:58:10 +00:00
David Drysdale
21252b460a Add new system/keymint Rust directory
Bug: 195310053
Test: build, TreeHugger
Change-Id: I5bb3c000324fb8150bdd00ec8b8ca9ed79ceba06
2022-05-25 13:57:13 +01:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Lukacs T. Berki
2da6c3cc86 Keep a "sanitizer dependency" flag for each sanitizer.
This is so that we can avoid mutating state in sanitizerMutator, as
would be necessary if we only had a single bit for every sanitizer
together.

Test: Presubmits.
Change-Id: I5576367c12972fbea64342ab123118ec5a2cfeec
2022-05-19 09:48:57 +02:00
Liz Kammer
3bf97bd1c0 Clean up some bp2build technical debt
Previously we ran mutators in bp2build mode to add dependencies, now we
look up modules by name directly. Remove workarounds to allow bp2build
mode to not fail when adding/handling dependencies.

Test: m bp2build
Change-Id: Ibf6fd905150cac306e5c395902ef28f609f4df2a
2022-05-13 19:47:48 -04:00
Treehugger Robot
dd58c3fe2b Merge "Add cross-referencing support for Rust" 2022-05-03 19:10:17 +00:00
Treehugger Robot
5b70a8d677 Merge "Update clang version to clang-r450784d" 2022-05-02 18:33:32 +00:00
Yi Kong
4f6c92765d Update clang version to clang-r450784d
Test: presubmit
Bug: 219872355
Change-Id: If6c2c331044a363cb8f20a2516da894e72c4b7e7
2022-05-02 23:52:44 +08:00
Martin Geisler
507f9b26d5 Merge "Tell rustc to always use color output" 2022-05-02 13:00:40 +00:00
Matthew Maurer
e91f9d439e Merge "Allow BoringSSL's Rust bindings to build" 2022-04-29 17:40:24 +00:00
Martin Geisler
d352e3b788 Tell rustc to always use color output
By default, rustc will disable color output when it detects that its
stdin isn’t connected to a terminal. However, since we will print the
output to the user’s terminal, it makes sense to override this.

Test: Manually by triggering a compilation error. I ran
  * m pdl
  * atest --host --no-bazel-mode pdl_inline_tests
  * atest pdl_inline_tests
  and got useful color output in my terminal in each case.
Change-Id: I8b593d2eb59d13db17a3456e3fb053556fc16f07
2022-04-29 15:21:15 +02:00