Commit graph

58255 commits

Author SHA1 Message Date
Chris Parsons
1bb58da17c Remove USE_BAZEL_ANALYSIS
Use --bazel-mode-dev instead.

Test: Treehugger
Bug: 244309479
Change-Id: I570d02651eea92375cd96efbeb8d986a9495e1ed
2022-09-07 14:58:03 -04:00
Chih-hung Hsieh
cedd4117a8 Merge "No clang-tidy by default for external and vendor" 2022-09-07 01:27:38 +00:00
Kiyoung Kim
9bdd218281 Merge "Export API imported library list to Makefile" 2022-09-07 00:48:15 +00:00
Chih-Hung Hsieh
1a46753cbf No clang-tidy by default for external and vendor
* Most tidy-external-* and tidy-vendor-* rules
  are no longer generated. But external/bcc,
  external/android-clat, and some vendor/...
  projects still have tidy- rules because they
  have explicitly set tidy:true in .bp files.
* Some hardware/* directories are third-party
  projects and also disabled by default.

Bug: 244631413
Test: presubmit; make tidy-soong_subset
Change-Id: I17f625e6270de81a111d9cd382fbc39f34edf924
2022-09-06 13:59:33 -07:00
Trevor Radcliffe
a355be226f Merge "cc bp2build for sysprop_library modules" 2022-09-06 19:27:22 +00:00
Yi Kong
a4631f41cd Merge "Do not enable global ThinLTO for tests" 2022-09-06 19:03:54 +00:00
Treehugger Robot
bf5fa97bb6 Merge "Remove gen-kotlin-build-file.py from Bp2buildModuleDoNotConvertList" 2022-09-06 18:54:30 +00:00
Yi Kong
56fc1b6902 Do not enable global ThinLTO for tests
Tests are not shipped, no need to spend extra CPU cycles optimising them
during build.

Test: GLOBAL_THINLTO=true m
Bug: 169004486
Change-Id: I66ede9c01d43b574a7fe9f74f0bc6ba97f51be06
2022-09-06 16:24:00 +08:00
Cole Faust
0228d27943 Merge "Support arch features in bp2build" 2022-09-06 02:13:59 +00:00
Cole Faust
c843b99b71 Support arch features in bp2build
Bug: 189972518
Test: New soong test
Change-Id: I05d77c8f63ffe6697d8e0300226864658055e116
2022-09-02 15:20:54 -07:00
Sam Delmerico
3dca115dda Merge "jacoco libs dependency for instrumented libraries" 2022-09-02 18:50:29 +00:00
Alix Espino
8c7efde76c Merge "Handle filename variations for prebuilt_etc in bp2build" 2022-09-02 18:41:11 +00:00
Trevor Radcliffe
ad3d123fb6 cc bp2build for sysprop_library modules
This CL implements bp2build functionality for the cc outputs of
sysprop_library modules. cc_* modules depending on sysprop sources
will be handled in a later CL.

Bug: 244439349
Test: b build //system/libsysprop/srcs/...
Test: Inspect BUILD.bazel
Test: Unit tests
Change-Id: I6fa20661b984223347480c9afe0885b5db5a2807
2022-09-02 18:27:39 +00:00
Cole Faust
e89f91df44 Remove gen-kotlin-build-file.py from Bp2buildModuleDoNotConvertList
Its issue was fixed in aosp/2202605

Bug: 198619163
Test: Presubmits
Change-Id: Ic3878ea1280f8f1ebab1b4c2423e07d795886c94
2022-09-02 10:26:50 -07:00
Treehugger Robot
d75966e7db Merge "Remove system shared libs from non-bionic dep list" 2022-09-02 16:52:43 +00:00
Colin Cross
6d89152f33 Merge "Make toolchain more compose-y" 2022-09-02 15:33:17 +00:00
Liz Kammer
43345e23da Remove system shared libs from non-bionic dep list
bionic system shared libraries only build for bionic platforms, so it is
safe to remove them from other platforms, preventing issues where
duplicate libraries are incorrectly identified in Bazel.

Test: go test soong tests
Change-Id: Idac27c49a464831f8aca02d561f41f98fc763337
2022-09-02 10:46:38 -04:00
Trevor Radcliffe
d6fdd16617 Merge "Export RunBp2BuildTestCaseSimple() in testing.go" 2022-09-02 13:31:04 +00:00
Treehugger Robot
f20433b15f Merge "Handle product config specific header_libs prop in cc bp2build" 2022-09-02 13:02:04 +00:00
Treehugger Robot
c40694830b Merge "Fix module-file name collisions" 2022-09-02 00:24:00 +00:00
Cole Faust
bcc3d05aba Fix module-file name collisions
Bazel doesn't allow a module and file with the same name.

Bug: 198619163
Test: Presubmits
Change-Id: Ie9731b627945d2ff221d3a5d08a32a5a172f9dcd
2022-09-01 15:20:00 -07:00
Zi Wang
0a8a129ee8 Handle product config specific header_libs prop in cc bp2build
Product variable header_libs is able to be converted.
Since static_libs and header_libs both use implementationDeps,
also added logic to make sure they both contribute to bazel
target.

Bug: 228314770
Test: m bp2build
Test: TestCcLibraryProductVariablesHeaderLibs in cc_library_conversion_test
Change-Id: I370fc75b666b3908b6ac5ed42bca5560f957fc42
2022-09-01 14:32:51 -07:00
Colin Cross
fc3b064c9a Make toolchain more compose-y
Remove many of the overridden methods from toolchainBase in favor
of having smaller composable types.  toolchainNoCrt, toolchain32Bit
and toolchain64Bit now only provide a few methods and can be mixed
in to any toolchain type.  toolchainLinux, toolchainBionic,
toolchainWindows and toolchainDarwin now embed toolchainBase to provide
the default flags methods for when they don't override them.

This avoids the need for disambiguation methods required when a
type embeds two types that implement the same method.

Test: cc_test.go
Change-Id: I641da2a47aba597c517f693efedb65cf41273c82
2022-09-01 14:21:36 -07:00
Yabin Cui
a73e672503 Merge "symbol_inject: add step to codesign Mach-O binaries." 2022-09-01 21:01:04 +00:00
Treehugger Robot
3636a06fe0 Merge "Use CommonAttributes.Data for cc_test.data." 2022-09-01 20:55:26 +00:00
Florian Mayer
41e31d8092 Merge "Revert "Revert "[soong] Add memtag-stack sanitizer, switch to li..."" 2022-09-01 19:29:33 +00:00
Yabin Cui
7f5f22b226 symbol_inject: add step to codesign Mach-O binaries.
The adhoc codesign of Macho-O binaries is broken after symbol
injection. MacOS refuses to run the binaries unless we sign
them again.

Bug: 241493489
Test: build and run simpleperf_ndk64 on MacOS
Change-Id: I25ef5c6413bd97e1bfa0a4ec5d04eaefb6fea54c
2022-09-01 11:57:13 -07:00
Trevor Radcliffe
1b4b2d9209 Export RunBp2BuildTestCaseSimple() in testing.go
This is to support the migration of conversion tests to be next
to the files they're testing

Bug: 242070498
Test: m bp2build
Change-Id: I66243d420743273e7ebad70886cfe690740182c4
2022-09-01 18:57:01 +00:00
Jingwen Chen
ebdc20f571 Use CommonAttributes.Data for cc_test.data.
data is a common attr like name, so avoid redefining it in testBinaryAttrs.

Test: presubmits
Change-Id: Ia694b94620dfad6b8411e5a1b6c530843983ca01
2022-09-01 18:54:50 +00:00
Alix
993872a5d7 Handle filename variations for prebuilt_etc in bp2build
Bp2build now handles these cases:

-filename is specified as a property
-if filename is not specified and filename_from_src = true,
	filename is set as the src
-filename defaults to the module name otherwise

Bug: 228353188
Test: bp2build/prebuilt_etc_conversion_test.go
Change-Id: Ia4c9b2c89f100e4ed9363dc3ba20ea501b776216
2022-09-01 18:42:10 +00:00
Treehugger Robot
6faa161557 Merge "bp2build: allowlist //system/logging/... and deps." 2022-09-01 18:29:21 +00:00
Treehugger Robot
2701ecd502 Merge "Remove USE_BAZEL and its dead code" 2022-09-01 17:32:00 +00:00
Spandan Das
1d243da558 Merge "bp2build for ndk_headers" 2022-09-01 17:22:50 +00:00
Treehugger Robot
1f03a9f953 Merge "Convert cc_test targets with bp2build." 2022-09-01 17:00:45 +00:00
Alix Espino
ad7eb00814 Merge "Exporting MakeBazelTarget() in testing.go" 2022-09-01 16:48:15 +00:00
Alix
e06d75be5d Exporting MakeBazelTarget() in testing.go
Since we are putting conversion tests in the same
package as the module being converted from now on

Test: m bp2build
Change-Id: Ied53589d497fef70bfa11d8f6067459c9a50cd72
2022-09-01 16:47:58 +00:00
Treehugger Robot
75c724cc8b Merge "Revert "DoNotConvert tzdata nor tz_version"" 2022-09-01 16:41:20 +00:00
Chris Parsons
19ab9a455f Remove USE_BAZEL and its dead code
This environment variable has been out of use for some time. It used to
control Bazel-as-executor, which has been removed from Bazel for several
releases.

Bug: 243077098
Test: Treehugger
Change-Id: I4edfb5f3574c369a16547ea06ba780293c37ecb3
2022-09-01 11:33:02 -04:00
Jingwen Chen
f061600d64 bp2build: allowlist //system/logging/... and deps.
```
$ b test --config=linux_x86_64 //system/logging/... --test_output=errors
//system/logging/logd:logd-unit-tests                           (cached) PASSED in 1.3s
```

Also builds:

- logcat
- liblogd
- auditctl
- logd
- liblogwrap
- logwrapper
- and various device tests

Test: b build //system/...
Test: b test //system/... --config=linux_x86_64
Test: bp2build.sh
Bug: 243025934
Change-Id: Id94460c1148b76af05e4ff1f4de9aa32f2626085
2022-09-01 15:00:15 +00:00
Jingwen Chen
537242c6f1 Convert cc_test targets with bp2build.
Starting with libutils_test, adb_test, libcutils_test, (and ~47 other host_supported tests).

Test: $ b build --config=android_x86_64 //system/core/libutils:libutils_test && adb push bazel-bin/system/core/libutils/. /data/tmp/libutils_test_files/ && adb shell /data/tmp/libutils_test_files/libutils_test
Test: presubmits with newly converted cc_test targets
Test: $ b test //system/... --config=linux_x86_64 --verbose_failures --test_output=errors --keep_going --build_tests_only

Fixes: 242038415

Change-Id: I10051aadb880c3aabeba6d7fb079523e6fb4ac43
2022-09-01 14:59:15 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
1867ae73d1 Revert "DoNotConvert tzdata nor tz_version"
This reverts commit bff2e88a85.

Reason for revert:
The reason for excluding them has been resolved; the files no longer conflict with the target names.

Test: mixed_libc.sh shows conversion of tzdata & tz_version

Change-Id: Ibcecfb2a65bb51a89dbc358ebd248209f3eb45b8
2022-09-01 14:42:10 +00:00
Treehugger Robot
bf9c26c364 Merge changes I1270e8d0,I61731a5e
* changes:
  Move function PathForVndkRefAbiDump to Prevent unnecessary exports in paths.go
  Change the type of parameter prevVersion to int in sourceAbiDump
2022-09-01 06:37:20 +00:00
Treehugger Robot
7b181b332e Merge "Define cc_api_headers module" 2022-09-01 05:28:40 +00:00
Cole Faust
c05e28c306 Merge "Remove old BUILD file merging code" 2022-09-01 03:21:35 +00:00
Kiyoung Kim
22e6b50ac2 Export API imported library list to Makefile
Export API imported library list to Makefile, so it can be used to
replace dependency for modules defined in Makefile.

Bug: 243736650
Test: 'ALLOW_MISSING_DEPENDENCIES=true m halutil' succeeded
Change-Id: I0540681b4b8129a37b4a83eed9b09218839e364e
2022-09-01 11:24:38 +09:00
Kiyoung Kim
51279d3a7b Define cc_api_headers module
Define cc_api_headers module to import from API surfaces and replace
existing header definition if needed.

Tested with :
cc_api_headers {
  name: "libc_headers",
  export_system_include_dirs: [
    "include",
  ],
  min_sdk_version: "1",
  sdk_version: "1",
  vendor_available: true,
  native_bridge_supported: true,
  ...
}

Bug: 236087698
Test: ALLOW_MISSING_DEPENDENCIES=true m -j vendorimage succeeded
Change-Id: I2c3294fe19a272453a168d8c7beeee9859bd4583
2022-09-01 11:24:35 +09:00
Steven Moreland
e66fe04484 Merge "Avoid dereferencing ANDROID_BUILD_TOP" 2022-09-01 02:09:53 +00:00
Treehugger Robot
2da00a8471 Merge "Add a property in ndk_library for header contributions" 2022-09-01 01:08:39 +00:00
Florian Mayer
d8434a4f3d Revert "Revert "[soong] Add memtag-stack sanitizer, switch to li..."
Revert submission 2201105-revert-2096883-memtag-stack-IGUQFVKYTS

Reason for revert: Reland with fix
Reverted Changes:
I0dac2a6a6:Revert "memtag_stack tests."
I3967151d9:Revert "[soong] Add memtag-stack sanitizer, switch...

Change-Id: Ib827fb8d48192f9e2accc97931e272f713d6cbd0
2022-08-31 15:20:25 -07:00
Cole Faust
ea602c5a41 Remove old BUILD file merging code
It's not needed anymore since aosp/2197837,
it should've been removed in that cl but I forgot.

Bug: 234167862
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I3d67a6e1894ad401525070ad37d3158708898306
2022-08-31 15:12:47 -07:00