This removes ambiguity for developers with the 'stem' property.
Bug: 159064919
Test: New Soong test; error is produced if this property is undefined.
Change-Id: I790fbcfa6cd7dbf6df63b5cf5c22983426ec072e
Bug: http://b/157081822
This will be used if LLVM_PROFILE_FILE is not set at runtime. Some
bionic tests are run without LLVM_PROFILE_FILE set and if they are run
from '/', they fail unable to write to '/default.profraw'. This may
affect other tests as well. Setting this to the value defined by
init.rc.
Test: Enable coverage for bionic, ensure relevant bionic-unit-tests
pass.
Change-Id: If1d0e16ce003149fb21d5472d10699ef6582e065
In some cases customized logic is required to generate the expected
bindgen bindings. This adds support for rust_bindgen modules to define a
HostTool module to use instead of bindgen.
Bug: 161816141
Test: New Soong tests pass.
Test: Local test case shows custom_binary module being used for bindgen
generation.
Change-Id: Id52aec4f25c38206d7e585d8e662be7836aa1d4b
crate_name do not need to be unique. A library may depend on two
different versions of the same crate. Use the module name instead of the
crate name when indexing the modules for rust-project.json.
Test: SOONG_GEN_RUST_PROJECT=1 m nothing
Bug: 162896400
Change-Id: I275f04639ef05f2b649c30168046e13b2efcacb9
While rust_bindgen modules may be interpreted as libraries, they do not
have a reference to the generated source until bindgen has been
executed. For now, ignore these modules.
Update the unit tests to cover the rust_bindgen case.
Test: SOONG_GEN_RUST_PROJECT=1 m nothing
Bug: 162881856
Change-Id: Ie736d7ebb115f2c1f9a90be006c972ce24265c6a
With the addition of apexes and /system_ext some of the bootclasspath
and system server jars have moved from /system to the new locations.
This has been implemented by using lists of colon-separated strings
called "apex-jar pairs" (although "apex" was misleading as it could
refer to "platform" or "system_ext", not necessarily a real apex).
Using the colon-separated string representation is inconvenient, as it
requires splitting and reassembling the list components many times,
which harms performance and makes error handling difficult. Therefore
this patch refactors the colon-separated lists into a struct that
hides the implementation details.
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Id248ce639a267076294f4d4d73971da2f2f77208
Dependencies of makefile modules are being redirected according to
SOONG_CFI_STATIC_LIBRARIES and SOONG_HWASAN_STATIC_LIBRARIES. But the
variables are shared among all variants (e.g. core, vendor, product,
arch), which can cause build error.
This splits the Makefile variables into several lists, one list per each
arch and each image variant, to correctly make the redirection.
Bug: 162476652
Test: build and inspect ninja
Change-Id: Icc753382f1c53de8468cc85243a6954e1986297a
bindgen generated code may not pass clippy checks, so preemptively
disable clippy for these.
Bug: 162828070
Test: clippy is not called when compiling rust_bindgen library variants.
Change-Id: I9632c889417bdfd1adf96d9cfbccbe6340824205
Bindgen generated bindings will not pass lints, so we need to disable
them when building bindings crates.
Test: m libbinder_ndk_bindgen
Change-Id: I4536f15f8505ff8d5436f1e6cbc2035e6801276d
Bindgen flags and cflags should be escaped, as they may contain shell
globs or other special characters.
Test: Updated Soong test passes.
Change-Id: I3df8ef25391f53a191f0494c5ff8c641d4d4b6f8
Adds a test_harness field to Rust test blueprint properties. If this
field is explicitly set to false, do not build the test binary with
`--test`. This is necessary for Rust tests which cannot use the standard
test harness.
Test: atest rustBinderTest
Test: atest --host proc-macro2_tests_test
Change-Id: Icbcb54422cc716348feae56b2d71f013516b0ac0
We want to support a compile_dex property for java_import. This splits
dex-related properties into a dexer struct which can be embedded in
relevant modules.
Test: m
Test: soong tests
Bug: 160455085
Change-Id: If56a51dac43f630d49483a36db29cd50e9ccd529
The default is android.jar to maintain current behavior but allows users
to specify a different filepath to support generating api-versions for
docs other than the platform (e.g. auto).
Bug: 162552181
Test: m doc
Test: go test java_test
Change-Id: I9e51abaf7d5451d68ca782157d9b739f76c5da82
This allows SourceProvider modules to create rust_library variants so
that generated source can be referenced as an external crate rather than
via an include macro. This is done by including rust_bindgen modules
like any other library, as a dependency in either rlibs, dylibs, or
rustlibs.
This renames the stem and flags properties for rust_bindgen modules to
source_stem and bindgen_flags, respectively. This deconflicts with the
usage in baseCompiler.
This also removes 'subName' from the Module struct and moves it over to
SourceProvider, which was the only user. This allows us to set it in
baseSourceProvider's AndroidMk; setting it in Module's AndroidMk was
causing problems finding NOTICE files for bindgen library variants.
Bug: 159064919
Test: New Soong tests pass.
Test: Local test rust_binary can use rust_bindgen module as a crate.
Change-Id: Ieb2cb614c2dd0b5aa7120541d77f6f822a6a1806
Necessary to avoid problems with implicitly enabled host OS'es, e.g.
linux_glibc getting enabled when we only supply a linux_bionic linker
in runtime-module-host-exports. That will then cause a non-functional
prebuilt to take precedence over source if the prebuilt is preferred.
We don't do this for device since we so far only support a single
device OS (android).
This introduces the notion that SDK member types can be host OS
dependent or not. That way java members with host prebuilts don't get
restricted to a specific host OS.
Test: m nothing
Test: build/soong/scripts/build-aml-prebuilts.sh runtime-module-host-exports
Check that the generated Android.bp correctly disables the bionic
linker prebuilt for linux_glibc.
Test: art/build/apex/runtests.sh
on master-art with an updated runtime SDK snapshot
Test: art/tools/buildbot-build.sh {--host,--target}
on master-art with an updated runtime SDK snapshot
Bug: 160349757
Change-Id: Idad7ef138cdbcbd209d390bf6c10ca8365d4619f
"exec format error" showed up on Mac when running the rbe_test.go.
The generated bash scripts did not have a newline at the end of
the file.
Bug: b/162600461
Fixes: b/162600461
Test: "m blueprint_tools" on Android Mac builder.
Change-Id: I425fa5f428733b6569c3fcdaa312023f9761d020
Disable the error test cases to allow developers to build
AOSP on Mac.
Bug: b/162600461
Test: m nothing
Change-Id: Ic8c6fe04743a8e4fe197a1bb71259036fb749edc
Disable the error test cases to allow developers to build
AOSP on Mac.
Bug: b/162600461
Test: m nothing
Change-Id: Iac4373dcb10710d8a2325eeb3ee20a6eeca6143f
rust_library modules no longer produce "link" variants alongside
"rust_libraries" variants as the former have been moved to rust_ffi
modules. rust_library modules however still create empty link variants
and code paths still assume that modules can support both rust linkage
and cc linkage. This adds unnecessary complexity that no longer serves a
purpose.
This cleans this up by removing the unused "link" variant for
rust_library modules and simplifies code paths that can now assume
modules are either a rust library or a cc library, but not both.
This also fixes a bug where Shared() was returning the wrong value.
Bug: 159064919
Test: cd external/rust/; mma
Test: cd external/crosvm/; mma
Change-Id: I3b5498c80b315c56b621dcb1388022fecc1bfc1b