Commit Graph

11 Commits

Author SHA1 Message Date
Colin Cross db98001be1 Use order-only dependencies for symbols files
Use an order-only dependency from $(LOCAL_BUILT_MODULE) to the symbols
file so that wiping the symbols directory during installclean doesn't
force anything to rebuild.

Bug: 186507256
Test: m && rm -rf $OUT/symbols && m
Change-Id: Ic164819c71f9db6126ff91c58752c8727cde0d5e
2021-04-27 19:43:33 -07:00
Ivan Lozano ae2274b5a2 Add Rust vendor image support to Make.
This adds the requisite Make logic to handle Rust vendor modules.

Bug: 184042776
Test: Example cc_library vendor module can depend on rust_ffi_shared.
Test: Example rust_library vendor-only module compiles.
Change-Id: Ib5ef6b403ca7e19a2aac9b77ff08b051425ea019
2021-04-07 16:25:55 -04:00
Ivan Lozano d5d15c8673 Rust: Collect gnco files with CLANG_COVERAGE too.
Until Rust supports LLVM coverage, Soong treats both NATIVE_COVERAGE and
CLANG_COVERAGE as producing GCOV coverage files. On the make-side, we
should be collecting the gcno files into a zip file when CLANG_COVERAGE
is defined too.

Bug: 170983066
Test: Coverage build with CLANG_COVERAGE produces zip file.
Change-Id: If6f86280f0d823e86884b64729530cc3548103a1
2020-11-16 15:32:19 -05:00
Martin Stjernholm bf4e8f4708 Make the build fail when the executable prebuilt target check fails.
Amends https://r.android.com/1439191; I realised echo-error doesn't
imply a false status.

Test: m art-check-{release,debug,testing}-apex-gen-fakebin
  without https://r.android.com/1441933.
Bug: 169375644
Change-Id: Ice75aeab30120e781df50a28c3dce3874ec0bfd1
2020-10-07 21:04:51 +01:00
Martin Stjernholm 2cfce9380e Do not chmod the symlink target when a prebuilt binary is symlinked.
It may be in a source tree that isn't writable. Instead check that
the target is executable.

Test: m
Test: chmod a-x system/sepolicy/tools/insertkeys.py && \
  rm -rf out/host out/soong/host && \
  m insertkeys.py
  Check that it fails with the expected error message.
Fixes: 169375644
Change-Id: I402d029dba45783127586ad9749c90012afe891d
2020-09-25 17:17:50 +01:00
Ivan Lozano 3e3d0913a5 rust: Don't install static libraries.
Bug: 168729404
Test: Make no longer attempts to install static libraries.
Change-Id: Ifdfd486dfbb0d64e2aeb9738f88c4d4efcb0337a
2020-09-18 14:30:28 -04:00
Martin Stjernholm 49a4e9b52e Preserve symlinks in the Soong prebuilt install steps for host binaries
and shared libs.

If a prebuilt module file is a symlink in the .intermediates tree it is
preserved when copied to the final install location. This preserves
symlinks to prebuilt binaries, so that they are run from their prebuilt
source location and can find libraries in relative paths from there.

Symlinks are converted to absolute, to not fail if they are relative in
the source tree.

Test: m clean && m droid dist checkbuild
  with and without the change, then compare the lists of symlinks in
  the out/ trees
Test: build/soong/soong_ui.bash --make-mode \
    TARGET_PRODUCT=crosshatch_hwasan TARGET_BUILD_VARIANT=userdebug \
    droid SANITIZE_TARGET=hwaddress \
    continuous_instrumentation_tests_api_coverage \
    continuous_native_tests device-tests platform_tests
  check that libclang_rt.hwasan_static-aarch64-android.a isn't a
  symlink in out/target/product/crosshatch/obj
Bug: 145934348
Change-Id: I7600e5b0754f8ea6cd0ffc8e1ba6d39153f182aa
2020-09-01 00:24:54 +01:00
Ivan Lozano fcd8fcefa8 Add support for Rust coverage files from Soong.
Bug: 146448203
Test: Coverage file zips are installed correctly by make.
Change-Id: Ia087ec87e5c7be0a91a43307abeabafaa9b366f3
2020-04-24 16:29:17 -04:00
Chih-Hung Hsieh ef17769720 Set NATIVE_TESTS executable like EXECUTABLES
* Rust test modules should have NATIVE_TESTS class,
  not EXECUTABLES, to work with atest --host.

Bug: 140938178
Test: make rust projects
Change-Id: I45c84284d894702471ea46faaa599de27ab6be51
2019-11-15 14:10:09 -08:00
Colin Cross 02b50d12be Remove TARGET_TRANSLATE_2ND_ARCH
TARGET_TRANSLATE_2ND_ARCH is never set to true any more,
TARGET_NATIVE_BRIDGE_ARCH := arm is always used instead.

Bug: 141242600
Test: m checkbuild
Change-Id: Id3e0614a1d8a088d37929655b74fecd812606db2
2019-09-18 16:23:04 +00:00
Ivan Lozano d62e7123d8 Make support for rust modules from Soong.
Support for rust modules built in Soong.

Bug: 136189233
Test: Test module builds.
Test: crosvm builds.
Change-Id: Idf2e4a4f760cbcee1d35fe6567ef8e12d4855094
2019-08-27 11:23:35 -07:00