Commit graph

35775 commits

Author SHA1 Message Date
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
Bill Peckham
78f76b92e2 Merge "Fix ExcludeFromVendorSnapshot check" 2021-05-27 23:28:57 +00: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
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
Chris Parsons
26caa1b2de Mixed build denylist rollback
Previous changes broke mixed_droid CI, and reverting the denylist
changes should get the build green.

More rigorous testing and fixes to follow.

Test: `m linker` which was previously broken.
Change-Id: I9c009d3456ea0c553148316665c97bfb372606d7
2021-05-25 17:24:06 -04:00
Christopher Parsons
e28a176a99 Merge "Rollforward "Split asm and c flags and srcs in..."" 2021-05-25 18:59:39 +00:00
Liz Kammer
3169bca9e2 Merge "Combine bp2build handling of static/shared props" 2021-05-25 16:55:02 +00:00
Liz Kammer
2edf872204 Merge "Mark test helpers as helpers." 2021-05-25 16:36:06 +00:00
Chris Parsons
990c4f4fc3 Rollforward "Split asm and c flags and srcs in..."
This fixes a test and rolls forward I28cf7437ee96cdf2fdbcb1eda2303691cff08ba4

Test: m nothing
Test: See I28cf7437ee96cdf2fdbcb1eda2303691cff08ba4
Change-Id: I0e450c28e70087e406e7b562d7e772785f177379
2021-05-25 12:15:52 -04:00
Colin Cross
4f9d8d6482 Merge "Revert "Split asm and c flags and srcs in bp2build output"" 2021-05-25 15:21:36 +00:00
Colin Cross
52aa4e1fd4 Revert "Split asm and c flags and srcs in bp2build output"
Revert submission 1714835-roboleaf-asm-c

Reason for revert: TestCcLibraryStaticProductVariableSelects fails everywhere
Reverted Changes:
I28cf7437e:Split asm and c flags and srcs in bp2build output
I2b47e6b55:Split libraries by language in cc_library_static

Change-Id: I85d39a462f0a5b3f5ff3d685906813fab9f01358
2021-05-25 15:20:39 +00:00
Christopher Parsons
ed73b76513 Merge "Split asm and c flags and srcs in bp2build output" 2021-05-25 14:58:32 +00:00
Liz Kammer
e4982e8828 Mark test helpers as helpers.
This enables identifying the correct location of test failures.

from godocs:
Helper marks the calling function as a test helper function.
When printing file and line information, that function will be skipped.
Helper may be called simultaneously from multiple goroutines.

Test: go test bp2build tests
Change-Id: I52430e541494c78f5222c11510a4d273fe205a06
2021-05-25 14:41:43 +00:00
satayev
70975ac815 Merge "Rename generate proto config file to match classpath type." 2021-05-25 14:17:04 +00:00
Liz Kammer
2222c6bb42 Combine bp2build handling of static/shared props
Test: go test soong tests
Change-Id: I793f88bcbad2cdee042c6b2d17104e9ca03602b9
2021-05-25 08:28:43 -04:00
satayev
8a7bbb5b79 Merge "Populate individual systemserverclasspath_fragments' proto configs." 2021-05-25 11:38:40 +00:00
Jingwen Chen
962a8f0253 Merge changes I3ecdeaab,I43720641
* changes:
  Make BUILD file merging slightly smarter.
  bp2build/b: exit early in GENERATE_BAZEL_FILES=1.
2021-05-25 08:56:21 +00:00
Jingwen Chen
4910976314 Make BUILD file merging slightly smarter.
This change enables checked-in BUILD files like
prebuilts/clang/host/linux-x86/BUILD.bazel to be merged cleanly with the
bp2build generated one into the synthetic workspace.

The checked-in BUILD file contains a package() declaration that bp2build
also generates. To avoid double declaration, the BUILD file writer now
checks if the BazelTargets contain handcrafted targets. If so, it
delegates the package declaration to the handcrafted BUILD file instead.

This change also sorts the bp2build targets before the handcrafted ones,
and adds a section header to demarcate the two sets of targets.

Test: TH
Change-Id: I3ecdeaab3226b895b623daf0791d24a657f7a7c6
2021-05-25 07:01:55 +00:00
Treehugger Robot
c1ae9243a4 Merge "Handle arch/os-specific product variables" 2021-05-25 06:06:40 +00:00