Commit graph

58865 commits

Author SHA1 Message Date
Lukacs T. Berki
84f8b98843 Add a "Contributing" section to README.md .
Test: documentation change.
Change-Id: Icb87fbb73abe28e1760bd452c26bda058aa5d22c
2022-10-12 12:22:38 +00:00
Chaohui Wang
7233dac59e Merge "Support Kotlin in Robolectric test" 2022-10-12 01:39:14 +00:00
Colin Cross
986706296d Merge "Create suggested-fixes.zip before exiting on error" 2022-10-12 01:14:37 +00:00
Colin Cross
58fecb427f Merge "Disable stripping for riscv64" 2022-10-11 20:51:18 +00:00
Cole Faust
45891bd93a Merge "Revert^2 "Enable new python path behavior by default"" 2022-10-11 20:37:54 +00:00
Colin Cross
1deeade634 Disable stripping for riscv64
create_minidebuginfo doesn't support riscv64 yet, disable stripping
for riscv64 until it does.

Test: m ALLOW_MISSING_DEPENDENCIES=true LLVM_PREBUILTS_VERSION=clang-r468909b LLVM_RELEASE_VERSION=15.0.3 libc -k
Change-Id: Iaad7ec0e4befe1652b413e20a7095cdde56d57bc
2022-10-11 11:50:55 -07:00
Colin Cross
1b9e68389d Create suggested-fixes.zip before exiting on error
suggested-fixes.zip is useful even when lint is exiting with an
error.  Save the exit code from the lint executable, create the
zip file, then re-exit with the exit code.

Bug: 216456886
Test: Introduce lint error, verify suggested-fixes.zip is created.
Change-Id: I0ba6190e3de0744e53b2a59ba3016861f2f115e2
2022-10-11 11:22:24 -07:00
Cole Faust
02ad4016cc Revert^2 "Enable new python path behavior by default"
This reverts commit 4d5cc709fa.

Reason for revert: Acloud issue was fixed in aosp/2243150, make sure the host unit tests are run on this cl via go/abtd before submitting

Change-Id: Ie148430d331a01a9877adaf3cb88f1c57af136a0
Bug: 245583294
Bug: 247578564
Bug: 251688241
2022-10-11 18:15:36 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
256e3b4597 Support mixed building for cc_prebuilt_binary
Enable cc_prebuilt_binary to also take part in mixed builds.

Bug: 241415823
Test: TestPrebuiltBinaryWithBazel
Test: mixed_droid yields stats-log-api-gen under bazel-out/
Change-Id: I18b2906c91ea90370ab851a1287c2890546d633f
2022-10-11 18:13:54 +00:00
Cole Faust
051fa91513 Add system-server sdk type to droidstubs
Needed to generate the system-server api database.

Bug: 193460475
Test: go test
Change-Id: I8c6bb3cc1d16ae128b7bcd2513fce4a83e852a5e
2022-10-11 10:54:11 -07:00
Chaohui Wang
dcbe33ced2 Support Kotlin in Robolectric test
Currently, Robolectric test written in Kotlin may not run, especially
when shards are in used, for example SettingsRoboTests has 10 shards.

This is because Robolectric test currently only recognize java files,
adding kt files to fix.

Rename current uniqueSrcFiles to uniqueJavaFiles, and compiledJavaSrcs
to uniqueSrcFiles. uniqueSrcFiles will contains both Java and Kotlin
files.

Note: android.FirstUniquePaths cannot be used, seems the behavior is
different and cause build error.

Bug: 252355400
Test: cd build/soong && mm
Test: m RunSettingsRoboTests with Kotlin tests
Change-Id: Id530ae4dcabffe01a06f44fe4234ffc67b73a601
2022-10-11 18:14:10 +08:00
Treehugger Robot
922875d187 Merge "Disable HWASan if UBSan is enabled" 2022-10-11 02:51:50 +00:00
Jingwen Chen
a71b4ca7a1 Merge "Blanket disallow bp2build_available: true." 2022-10-11 00:36:44 +00:00
Florian Mayer
bb158a34c3 Disable HWASan if UBSan is enabled
Test: `atest inputflinger_tests libinput_tests` does not crash
Bug: 251249010
Change-Id: Ic6bab1d2361ecfbad038acf9f124d4b9d4cee6d1
2022-10-10 17:11:30 -07:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
49b59385da Merge "Support cc_prebuilt_binary building with Bazel" 2022-10-10 21:37:35 +00:00
Spandan Das
40fb2e202a Merge "Converters for contributions to systemapi and vendorapi" 2022-10-10 21:33:21 +00:00
Elliott Hughes
21f1365887 Merge "Add riscv64." 2022-10-10 20:25:46 +00:00
Mark Teffeteller
0342382526 Merge changes Ib951c4f5,Iacdccb8f
* changes:
  Include target_mods field Test: build a module with target_mods populated in cc_fuzz
  Update cc_fuzz rule - add library_path param Test: make haiku
2022-10-10 19:29:29 +00:00
Elliott Hughes
8cddc00b02 Add riscv64.
Otherwise we hit an unknown --arch error in ndkstubgen as soon as we try
to build an NDK library (such as libc/libdl/libm, which are the very
first libraries we need to build).

Test: treehugger
Change-Id: Id633248d1fa80eeddfd234301355931bb1309dc3
2022-10-10 15:33:50 +00:00
Jingwen Chen
1735b2e096 Blanket disallow bp2build_available: true.
This can be updated to use an allowlist again if the need arises.

Bug: 251197532
Test: presubmits
Change-Id: If56c45d8587a41b57358f249d20eb9a6ed9191ac
2022-10-10 14:31:53 +00:00
Jingwen Chen
17e0b7607a Merge "bp2build: disallow bp2build_available definition with neverallow." 2022-10-10 13:38:03 +00:00
Spandan Das
4238c65a17 Converters for contributions to systemapi and vendorapi
The module types in scope of this conversion are
1. cc_library and cc_library_shared (non-null llndk or stubs prop)
2. cc_library_headers (all)

For (2), we need some postprocessing on the results of the parser
bp2BuildParseBaseProps. This is necessary because arch and os specific
API exports need to be flattened and added to the generateed API headers
target along NoConfigAxis
e.g.
```
The api equivalent of
cc_library_headers (
  name = "lifoo",
  deps = select({
  	"//build/bazel/platforms/arch:arm": ["arm_deps"],
  	"//build/bazel/platforms/arch:arm64": ["arm64_deps"],
	}),
)
should be
cc_api_library_headers (
  name = "lifoo",
  deps = ["arm_deps", "arm64_deps"],
)
```

For (1), we also need to generate 1:many header api targets so that
arch-specific deps can propagate arch metadata to the top-level
api_domain rule

Test: go test ./bp2build
Test: go test ./cc

Change-Id: Ie40cba1ac8e89f290b3d926c190d5e93abd52859
2022-10-07 23:48:00 +00:00
Colin Cross
8ca61c1820 Move checking of minApiForArch for apex into cc
I49220cbec628f1508709741dc56b62aaac7786d9 attempted to allow
apexes to depend on native code whose min_sdk_version had been
increased to meet the minimum supported API level for a new
architecture.  It wasn't quite right, as it assumed that the
primary architecture of the apex would be the newest, and
it applied to all dependencies, not just ones that were
specfiic to the new architecture.  Move the checking into
cc.ShouldSupportSdkVersion, where it can be specific to an
individual architecture variant.

Bug: 250918230
Test: TestApexMinSdkVersion_MinApiForArch
Change-Id: I303cf485ba54b4c6bf63a9f9b49286ff9b2c9c83
2022-10-07 16:04:50 -07:00
Treehugger Robot
8e4a787ae7 Merge "Allow overriding rro category in override_runtime_resource_overlay" 2022-10-07 22:39:26 +00:00
Treehugger Robot
41a7fedd39 Merge "Fix incrementality bug with merged BUILD files" 2022-10-07 22:21:26 +00:00
Cole Faust
fd88414b4c Fix incrementality bug with merged BUILD files
The merged build files should be added as ninja dependencies,
so we rerun when they're changed.

Fixes: 246552590
Test: m bp2build, m bp2build again and observe it didn't rerun. Then add a comment in external/protobuf/BUILD.bazel, run m bp2build again, and observe it reruns
Change-Id: I26ed035cc0a894500a192f9aa3371fb46519689b
2022-10-07 13:11:45 -07:00
Zi Wang
aa981edcf0 Incorporate bpf into mixed builds
Bug: 240163393
Test: TestBpfWithBazel in bpf_test.go
Change-Id: I1d24a9c0d1d6911987c730bf1b5b7e02d6e73a5e
2022-10-07 18:30:45 +00:00
Jeremy Meyer
7e671297c7 Allow overriding rro category in override_runtime_resource_overlay
Bug: 240322840
Test: unit tests
Change-Id: I6b07cf57dc113e3805346e50ef9896471df9f53c
2022-10-07 18:21:34 +00:00
Yu Liu
f1e6126cb0 Merge "Add libprofile-clang-extras when coverage is enabled." 2022-10-07 17:46:10 +00:00
Trevor Radcliffe
4e503ec09d Merge "Split ldflags in bp2build" 2022-10-07 17:31:29 +00:00
Paul Duffin
6e8f980324 Merge "Properly skip TestBootImageConfig on non-Linux platforms" 2022-10-07 16:50:54 +00:00
Lais Andrade
dd0cc36b27 Merge "Revert "Enable new python path behavior by default"" 2022-10-07 13:28:30 +00:00
Treehugger Robot
d504adbead Merge "apex_key bp2build: disambiguate module and src deps." 2022-10-07 10:55:50 +00:00
Paul Duffin
85d8bdc10e Properly skip TestBootImageConfig on non-Linux platforms
Bug: 245956352
Test: m nothing
Change-Id: I6402573b378eee77d802829ec5dfacf4c514d3b8
2022-10-07 11:48:17 +01:00
Lais Andrade
4d5cc709fa Revert "Enable new python path behavior by default"
This reverts commit 5fe655d1c7.

Reason for revert: DroidMonitor: Potential culprit for Bug b/251688241 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I1ea4df27557fc891d8f0156ec5681f9b0c601c98
2022-10-07 10:09:09 +00:00
Jingwen Chen
a4b7eed0bd bp2build: disallow bp2build_available definition with neverallow.
..other than the specified directories.

Test: CI

Bug: 251197532
Fixes: 251197532
Change-Id: Iec6407c915d2554bbfb62aea4591783208c4f633
2022-10-07 09:54:16 +00:00
Stephen Hines
6186318b72 Update clang version to clang-r468909b
Bug: http://b/241011085
Bug: http://b/235405318
Test: Builds
Change-Id: Ib415277284fc69f5a6b59b6998f6cdbcaefdd13e
2022-10-07 00:33:59 -07:00
Sorin Basca
538911b686 Merge "Revert^2 "Use the toolchain from JDK 17"" 2022-10-07 05:10:30 +00:00
Treehugger Robot
be5f83ef1b Merge "Enable new python path behavior by default" 2022-10-07 01:02:30 +00:00
Mark
74c0ad2248 Include target_mods field
Test: build a module with target_mods populated in cc_fuzz

Change-Id: Ib951c4f551db27f67e2cc18717e52763a99907a3
2022-10-06 22:36:33 +00:00
Paul Duffin
3a56f5e0e0 Skip TestBootImageConfig on non-Linux platforms
Bug: 245956352
Test: m nothing
Change-Id: I4c0bfd24febd308d8efa62da9603795a7e5ed222
2022-10-06 21:39:21 +01:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
b12ff59f0b Support cc_prebuilt_binary building with Bazel
Bp2build-enable cc_prebuilt_binary -> cc_prebuilt_binary

Bug: 241415823
Test: cc_prebuilt_binary_conversion_test.go
Change-Id: I007deef8d44f68993012f2114314d1cb52cfbb0e
2022-10-06 19:39:09 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
a44a4e079f Merge "Add Soong tests for cc_prebuilt_binary for bad srcs" 2022-10-06 17:48:15 +00:00
Treehugger Robot
e81503e161 Merge "Fix Errorf format string for error" 2022-10-06 17:43:07 +00:00
Paul Duffin
5b0bba9ff5 Merge changes I948c7e51,If917cfbc,I7845b793,Ia815537e
* changes:
  Prevent bootImageVariant.licenseMetadataFile being set twice
  Test bootImageConfig/Variant fields
  Add Config,RunningInsideUnitTest
  Add CommonOs to Config.Targets
2022-10-06 17:20:41 +00:00
Chih-hung Hsieh
55d3e2ba14 Merge "Add TIDY_EXTERNAL_VENDOR" 2022-10-06 17:12:05 +00:00
Treehugger Robot
0656d7d670 Merge "apex bp2build: refactor module names to be more meaningful." 2022-10-06 16:57:08 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
7a11dc8689 Fix Errorf format string for error
Also go ahead and mark `checkOverrides` as a `t.Helper()`

Test: go test
Change-Id: I368aabf4d032c02773416f27affa12eb40e77b40
2022-10-06 15:24:11 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
b1bd77048d Add Soong tests for cc_prebuilt_binary for bad srcs
Test: TestPrebuiltBinary{NoSrcsNoError,MultipleSrcs}
Change-Id: I1c803e38bae68e452cebf6208412cefed900c7f6
2022-10-06 14:10:49 +00:00
Jingwen Chen
34feb1471a apex bp2build: refactor module names to be more meaningful.
Numbered module names weren't obvious.

Test: presubmits
Change-Id: Iee921e2965d1664ed1bccd934ab80f913eff6356
2022-10-06 13:02:30 +00:00