Commit graph

35792 commits

Author SHA1 Message Date
Ivan Lozano
d1dec54988 Export cc functions for snapshotting Rust rlibs.
Export additional fuctions, structs, and interfaces from cc for use in
the rust package to allow for rlib snapshotting.

Bug: 184042776
Test: m nothing
Change-Id: I4c53b9378d5d5b5973dbd23ab692cdfb2ede60b9
2021-06-03 08:34:47 -04:00
Ivan Lozano
1921e8003d Rust cdylib/statliclib support for vendor snapshot.
Adds support for platform vendor_available Rust FFI libraries and
binaries to be included in the vendor snapshot.

Because rlib and dylibs are not yet in snapshots, libstd cannot be
included in a vendor snapshot. As a result, vendor-specific Rust code
can't be guaranteed to work with the platform-provided vendor_available
modules built with a newer toolchain. For now, a check is added
indicating vendor-specific Rust code is unsupported.

This changes the linkage for vendor variants of these modules to default
to rlib linkage since dylibs cannot be included in the snapshot yet.

Bug: 184042776
Test: m nothing # new Soong tests pass
Change-Id: I502eaa4bb962eb87ff868fcf49b435f0d2f982e6
2021-06-03 08:32:05 -04:00
Ivan Lozano
d67a6b0a88 Export cc vendor functions for usage by rust.
This CL exports and refactors some cc vendor-snapshot related functions
so they can be reused by rust modules to support vendor snapshotting.

Bug: 184042776
Test: m nothing
Change-Id: I12706e62ce0ac3b2b4298085fafc1d77b8e0a0c4
2021-06-03 08:31:55 -04:00
Jose "Pepe" Galmes
7e21d3cd04 Merge "Fix duplicate variations when using the VSDK." 2021-06-02 03:31:07 +00:00
Jingwen Chen
adf5564f94 Merge "Fix OUT_DIR lookup in mixed builds." 2021-06-02 03:22:18 +00:00
Yuntao Xu
a8f4e62b8d Merge "add the LOCAL_DISABLE_TEST_CONFIG variable" 2021-06-01 22:11:59 +00:00
Colin Cross
7cbf1d68ec Merge "Fix propagating EMPTY_NINJA_FILE from multiproduct_kati to minibp" 2021-06-01 21:55:25 +00:00
Elliott Hughes
2a8b0530fa Merge "Rename gccCmd mingwCmd now that's all it's used for." 2021-06-01 21:40:16 +00:00
Colin Cross
f3bdbcbea3 Fix propagating EMPTY_NINJA_FILE from multiproduct_kati to minibp
I6dca478f356f56a8aee1e457d71439272351390b replaced calling
build/blueprint/bootstrap.bash with running minibp directly,
but didn't propagate the EMPTY_NINJA_FILE environment variable
to minibp.  Since everything that uses EMPTY_NINJA_FILE is
executed directly from soong_ui now, replace the EMPTY_NINJA_FILE
environment variable with a config bool and pass it to minibp.

Bug: 189148777
Test: build/soong/build_test.bash --dist --incremental --shard-count=300 --shard=1 && du out/multiproduct
Change-Id: I4d64275ce02c5d68948012f71ac4dc3795af9e85
2021-06-01 11:43:55 -07:00
Treehugger Robot
ebdf61ece2 Merge "Remove versioned LLNDK stubs" 2021-06-01 18:38:52 +00:00
Christopher Parsons
c5e4a0750d Merge "Remove elements from denylist that are obsolete" 2021-06-01 15:17:10 +00:00
Jingwen Chen
8c52358ad7 Fix OUT_DIR lookup in mixed builds.
In mixed builds, Bazel operates in <root>/out/soong/workspace, but the real
OUT_DIR is just <root>out/, not <root>/out/soong/workspace/out. This CL
ensures that the correct OUT_DIR is passed to mixed builds's bazel by
making OUT_DIR absolute.

Also add STANDALONE_BAZEL to build_test's Bazel smoke test.

Test: TH
Change-Id: If8b4058d43bf821f5196016f9b0ad38edfe18716
2021-06-01 12:07:40 +00:00
Treehugger Robot
dddb0152a5 Merge "Use fingerprint when min_sdk is current or none" 2021-06-01 09:45:58 +00:00
Treehugger Robot
72aedde483 Merge "Handle product vars *flags props in cc* modules" 2021-05-31 08:21:19 +00:00
Anton Hansson
ee7891acec Merge "Remove support for removed_dex_api_filename" 2021-05-28 13:23:18 +00:00
Yuntao Xu
7a31855228 add the LOCAL_DISABLE_TEST_CONFIG variable
Introduce and set the variable LOCAL_DISABLE_TEST_CONFIG varaible to be
true for the `android_test_helper_app` type modules.

Bug: 188927912
Test: rum 'm module-name' (`android_test_helper_app` type module)
Test: TreeHugger
Change-Id: I5db1029f31d8afe1ca5e9fab95e39d751971058d
2021-05-27 17:53:46 -07:00
Bill Peckham
78f76b92e2 Merge "Fix ExcludeFromVendorSnapshot check" 2021-05-27 23:28:57 +00:00
Chris Parsons
2affc3bf59 Remove elements from denylist that are obsolete
Test: mixed_droid CI
Change-Id: Ib4b4a5114362feea358da5a989b41bc01f1f7010
2021-05-27 18:06:51 -04:00
Julien Desprez
8620b65bf1 Merge "Switch python_test_host default to unit_test:true" 2021-05-27 21:31:37 +00:00
Julien Desprez
66534a0144 Switch python_test_host default to unit_test:true
Test: presubmit
Bug: 183730987
Change-Id: Ib54c30c751731aaae8a46af96e809c46469659d1
2021-05-27 20:49:13 +00:00
Liz Kammer
4854a7d2cb Use fingerprint when min_sdk is current or none
We have versions of the same apex targetting different min_sdk_versions;
however, fingerprint is overriding the hardcoded min_sdk_version. We
should only be overriding if it is current or unset.

Test: go test apex soong tests
Change-Id: Id030a5ba7d8edebb806ce83d318132fd839a00a5
2021-05-27 14:28:27 -04:00
Liz Kammer
ba7a9c5e4a Handle product vars *flags props in cc* modules
Test: build/bazel/ci/bp2build.sh
Bug: 188497994
Change-Id: Ifb379e370075d6a7bc55b82d79c210c31ef377e9
2021-05-27 13:57:01 -04:00
Jose Galmes
7fdc336b9f Fix duplicate variations when using the VSDK.
When using the VSDK there can be multiple variations of the same module
for core, product, vendor, recovery. If two or more of those variations
exist, a suffix must be added to the variation to avoid duplicate modules
with the same name.

Bug: 188717568
Test: m -j nothing
Change-Id: Ifd8fa5590a8e225a97c2a8e3110d5d5f20beb50d
2021-05-27 10:16:24 -07:00
Rupert Shuttleworth
ffd4582b86 Add cc_prebuilt_library helpers for use by the llvm_prebuilt_library_static converter.
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libFuzzer
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libomp
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libunwind
Test: bazel build //prebuilts/clang/host/linux-x86:prebuilt_libunwind-exported

Change-Id: I9343e19a149b62785e8ee3096254776c19675032
2021-05-27 09:07:57 -04:00
Liz Kammer
f6840284b6 Merge "Support empty srcs for configurable attrs" 2021-05-27 12:56:29 +00:00
Justin Yun
9e13187f6b Fix ExcludeFromVendorSnapshot check
ExcludeFromVendorSnapshot() must return true if the module must not
be snapshotted and built from the vendor source tree.
The default value must be false because rust modules are provided by
the system source tree.

Bug: 184042776
Bug: 189372652
Test: m nothing
Change-Id: I267c3a5674bea966d1dd831cda73538ae94cf25f
2021-05-27 21:27:52 +09:00
Rupert Shuttleworth
69e7231677 Merge "Remove unused Common field." 2021-05-27 12:13:31 +00:00
Anton Hansson
5ab4286e84 Remove support for removed_dex_api_filename
Nothing uses this argument anymore, so simplify the droidstubs code by
removing the argument.

Bug: 189426360
Test: m
Merged-In: I0e4b84d73a954b3819db1149be3da287cf604eec
Change-Id: I0e4b84d73a954b3819db1149be3da287cf604eec
2021-05-27 12:50:44 +01:00
Rupert Shuttleworth
1b1ab6d7ab Merge "Add e.g. Target: { Android_arm: { ...} } support to LabelAttribute." 2021-05-27 09:30:39 +00:00
Martin Stjernholm
664b2cf89a Merge "Drop "prebuilt_" prefixes from names registered in ApexInfo.InApexXxx." 2021-05-27 09:24:55 +00:00
Rupert Shuttleworth
9d63de8c6e Remove unused Common field.
Test: TH
Change-Id: I8364dc70bde4ba02925dc713ca9f2a17fa3da083
2021-05-27 04:48:47 -04:00
Rupert Shuttleworth
22cd2eb3d1 Add e.g. Target: { Android_arm: { ...} } support to LabelAttribute.
LabelListAttribute support was already added, but LabelAttribute support is needed for cc_import rules.

Test: Added unit test for version_script, which is the only supported LabelAttribute so far.

Change-Id: I4e86e7391586e0780623d06b794e7399f0ccd50e
2021-05-27 04:32:48 -04:00
Colin Cross
4ab2dd1afe Merge changes I0116f5f4,I950c9b54,I967f5c42
* changes:
  Treat java libraries in classpath fragments as directly in apex
  Make CopyDirectlyInAnyApex match the documentation
  Remove unused cc.copyDirectlyInAnyApexDependencyTag
2021-05-27 00:56:52 +00:00
Rupert Shuttleworth
de2dfdea6b Merge "Use Finder for getPathsToIgnoredBuildFiles() to try and speed up builds with slow hard drives." 2021-05-26 22:22:14 +00:00
Jose "Pepe" Galmes
581dc930b2 Merge "Fix change in logic introduced in https://r.android.com/1666563." 2021-05-26 21:09:05 +00:00
Liz Kammer
2b07ec7b3b Support empty srcs for configurable attrs
Test: mixed build linkerconfig
Change-Id: I1ee56f7fa46ce2971ecae6d2ca9258631a32f46a
2021-05-26 16:58:54 -04:00
Rupert Shuttleworth
e03bb61072 Use Finder for getPathsToIgnoredBuildFiles() to try and speed up builds with slow hard drives.
NOTE: This relies on https://chromium-review.googlesource.com/c/angle/angle/+/2906252 being merged into AOSP first

Test: bazel build //bionic/... //external/... //frameworks/... //system/...

Change-Id: Id552941274ffbc9955dfcd8f545a58f1e3368845
2021-05-26 16:11:27 -04:00
Anton Hansson
cf21e25ef1 Merge "Add sdkextensions tests to soong TEST_MAPPING" 2021-05-26 19:53:03 +00:00
Treehugger Robot
4e0c1d3747 Merge "Use stem when filtering boot jars." 2021-05-26 19:35:46 +00:00
Anton Hansson
f300316614 Add sdkextensions tests to soong TEST_MAPPING
Changes in soong have left sdkextensions tests broken for over 2 days,
so let's prevent that happening again.

Bug: 180105615
Test: presubmit
Change-Id: I6961228bdd5a4606eb5078ed332b508ef6d2d6af
2021-05-26 19:25:52 +01:00
Martin Stjernholm
0770a175a1 Merge "Move logic to disable flattening in unbundled app mode from Soong to make." 2021-05-26 18:21:45 +00:00
Colin Cross
c33e5216f1 Treat java libraries in classpath fragments as directly in apex
Coverage is applied to java libraries that are directly in an apex.
Mark java libraries that are in an apex through a bootclasspath_fragment
or a systemserverclasspath_fragment as directly in the apex by
implementing CopyDirectlyInAnyApexTag on the dependency tags used for
their contents.

Bug: 183759446
Test: TestApexJavaCoverage
Change-Id: I0116f5f415083b5194000988cb257454ef115200
2021-05-26 10:07:44 -07:00
Dan Willemsen
5ac072371e Merge "Add go2bp tool" 2021-05-26 17:03:35 +00:00
satayev
1c564cc9c9 Use stem when filtering boot jars.
For testing purposes, a boot jar may be provided by a test java_library
that has a different content name, but sets "stem" property to match
the original java_library.

Given that Stem() returns either the property value or module name,
it is safe to replace all content names by their stems.

Bug: 180105615
Test: atest CtsClasspathsTestCases sdkextensions_e2e_tests
Merged-In: Ic519ffa0c5b616abddf15b41c934421dfac2e78a
Change-Id: Ic519ffa0c5b616abddf15b41c934421dfac2e78a
2021-05-26 17:13:43 +01:00
Martin Stjernholm
be10503d3a Drop "prebuilt_" prefixes from names registered in ApexInfo.InApexXxx.
Neither InApexVariants nor InApexModules should have them. This allows
us to get rid of InApexVariantByBaseName as well.

Test: m nothing
Test: m nothing SOONG_CONFIG_art_module_source_build=false
Bug: 180325915
Change-Id: Icbe4e025ce1a4c8dd258ff95d326ca2f27905188
2021-05-26 17:05:17 +01:00
Jingwen Chen
bcf5304eab bp2build: support arch/target static/shared props.
This CL adds the support for static/shared cc_library props nested
within target and arch structs, and correctly sets them in the right
select statement.

Test: TH
Bug: 189183307
Change-Id: I48f7d62755ebab56fe03d3ecee2e15427eb552c9
2021-05-26 09:28:19 +00:00
Jose Galmes
737d0a1f84 Fix change in logic introduced in https://r.android.com/1666563.
https://r.android.com/c/platform/build/soong/+/1666563/3/cc/image.go#551
introduced a change in logic.

Bug: 188717568

Test: source build/envsetup.sh
Test: m -j nothing
Change-Id: Iab27f1c3ca1a488d074f9c5c61fe071d7d445b91
2021-05-25 22:06:41 -07:00
Colin Cross
4d4f7d6114 Make CopyDirectlyInAnyApex match the documentation
CopyDirectlyInAnyApex was documented to copy from child to parent, but
was copying from parent to child.  It is unused, so reverse it to
match the documentation.

Bug: 183759446
Test: next CL
Change-Id: I950c9b5416d66e83d76ca489aeb5e0572e005d5d
2021-05-25 18:28:38 -07:00
Colin Cross
243f3c250e Remove unused cc.copyDirectlyInAnyApexDependencyTag
Bug: 183759446
Test: go test ./build/soong/cc
Change-Id: I967f5c42cbf7722843a6455cbc2867a8912033cb
2021-05-25 18:28:38 -07:00
Rupert Shuttleworth
c194ffbcf3 Make GetTargetProperties() aware of more complex targets, like 'android_arm', instead of just 'android'.
Test: Added new unit test and updated existing tests.

Test: bazel build //bionic/... //external/... //frameworks/... //system/...

Test: ./build/bazel/scripts/run_presubmits.sh

Change-Id: I250d1964f5cf42b92ddb929379d35d8c844423f7
2021-05-25 19:40:16 -04:00