Commit Graph

8997 Commits

Author SHA1 Message Date
Treehugger Robot
d18adf146f Merge "Remove versioned_ndk_headers module type." into main 2024-09-05 20:24:56 +00:00
Priyanka Advani (xWF)
a46053f612 Merge "Revert "Enable -Wfortify-source"" into main 2024-09-05 18:29:06 +00:00
Priyanka Advani (xWF)
435c4ed4a9 Revert "Enable -Wfortify-source"
This reverts commit 492e81bd0e.

Reason for revert: Droidmonitor created revert due to b/364912148.

Change-Id: Ic487ca2f4b5e650b70cfb87889d8bd112bec32c6
2024-09-05 18:24:53 +00:00
Aditya Kumar
d33323c9ed Merge "Enable -Wfortify-source" into main 2024-09-05 17:37:12 +00:00
Krzysztof Kosiński
918d265a06 Add ARMv9.2-a arch option.
Bug: 364383722
Test: presubmit
Change-Id: Ica7266f6dbac490836f94f7e19685383aba2749f
2024-09-04 21:25:05 +00:00
Aditya Kumar
492e81bd0e Enable -Wfortify-source
Bug: 315245071
Change-Id: I06ced7e599dea83a6dbd68b89c996a3127c318ae
2024-09-04 21:24:12 +00:00
Steven Moreland
56aed2b0e8 Merge changes from topic "libbinder_ndk-remove-cpp-headers" into main
* changes:
  ndk_library: limit exports
  Reland "Truely re-export export_header_libs from ndk_library"
  ndk_library depends on the correct arch variant of cc_library_headers
2024-09-04 18:23:19 +00:00
Treehugger Robot
2b5dd203d4 Merge "Revert^2 "Add an explanation to ndk_library."" into main 2024-09-04 16:31:05 +00:00
Colin Cross
a158a71d25 Revert^2 "Add an explanation to ndk_library."
This reverts commit a27204273d.

Reason for revert: unrelated to breakage

Change-Id: Ic7cb64acd72ee8502e608609c0e197fba6a27bf2
2024-09-04 15:33:04 +00:00
Pechetty Sravani (xWF)
53aaadff61 Merge "Revert "Add an explanation to ndk_library."" into main 2024-09-04 06:30:57 +00:00
Pechetty Sravani (xWF)
a27204273d Revert "Add an explanation to ndk_library."
This reverts commit ba9f9262a3.

Reason for revert: DroidMonitor created revert due to b/364440900.

Change-Id: I8661cdce1a1187459b6a0acde4c64a5aa70dcc87
2024-09-04 04:47:25 +00:00
Treehugger Robot
28b190bc83 Merge "Add an explanation to ndk_library." into main 2024-09-04 01:14:59 +00:00
Dan Albert
ba9f9262a3 Add an explanation to ndk_library.
Bug: http://b/357711733
Test: None
Change-Id: I56fde036f7fe49ccf8b3a47a4eaaa4abac008fc7
2024-09-03 23:05:46 +00:00
Steven Moreland
bedc997c40 Reland "Truely re-export export_header_libs from ndk_library"
This reverts commit 7f1ae59d94.

Reason for revert: b/357711733, reland with allowlist

Bug: 357711733
Change-Id: I11864eb2168c4333ad5759d0d057fda8529da24e
Test: build
2024-09-03 21:52:29 +00:00
Jiyong Park
f8fab9b8c6 ndk_library depends on the correct arch variant of cc_library_headers
Previously before aosp/3249712, ndk_library was assumed to depend only
on ndk_headers, which do not have any variants.

As ndk_library can now depend on cc_library_headers which has many
variants for arch, sdk, and more, the previous assumption no longer
holds.

Therefore, when ndk_library makes a dependency to its
export_lib_headers, it now uses either AddFarVariationDependency with
(for ndk_headers) or AddVariationDependency (for others) depending on
which module type it depends on.

Bug: 357711733
Test: build with  https://r.android.com/q/topic:%22no-cpp-in-ndk-2%22
Change-Id: Id0957e82736bd458e15674ffc45ca32b1e3a7250
2024-09-03 21:52:12 +00:00
Dan Albert
7f1ae59d94 Revert "Truely re-export export_header_libs from ndk_library"
This reverts commit 88c768dd7f.

Reason for revert: not how this module type is supposed to be used

Change-Id: Iced1ad336c5fe5d630bb8e268b08d652e80f262d
2024-09-03 19:55:06 +00:00
Jiyong Park
88c768dd7f Truely re-export export_header_libs from ndk_library
Bug: 357711733
Test: m CtsNdkBinderTestCases
Change-Id: If498f42cb93904c117129cd96286b437607d6b0a
2024-08-30 11:41:45 +09:00
Pirama Arumuga Nainar
7bab95be6c Merge "Revert^2 "Enable -Wsingle-bit-bitfield-constant-conversion"" into main 2024-08-29 20:49:57 +00:00
Pirama Arumuga Nainar
65087c3588 Revert^2 "Enable -Wsingle-bit-bitfield-constant-conversion"
This reverts commit e64573b0c0.

Reason for revert: re-submit after fixing build breaks.

Change-Id: Ia43b8ffa23355f14e656ce086b23e1ca0d3821ca
2024-08-29 16:44:10 +00:00
Dan Albert
afdf6ac6dd Remove versioned_ndk_headers module type.
No longer used.

Bug: None
Test: treehugger
Change-Id: I74e89ff2e7ffb7d81a0b123507df5a973f9400d4
2024-08-28 23:16:09 +00:00
Priyanka Advani (xWF)
3efbd354d7 Merge "Revert "Enable -Wsingle-bit-bitfield-constant-conversion"" into main 2024-08-28 21:52:30 +00:00
Priyanka Advani (xWF)
e64573b0c0 Revert "Enable -Wsingle-bit-bitfield-constant-conversion"
Revert submission 3238689-bitfield-warning-cleanup

Reason for revert: Droidmonitor created revert due to b/362819160.

Reverted changes: /q/submissionid:3238689-bitfield-warning-cleanup

Change-Id: I9a35a52a79145541bb6bb3880ae8de2d1c09c02e
2024-08-28 21:44:53 +00:00
Pirama Arumuga Nainar
ce531ba405 Merge "Enable -Wsingle-bit-bitfield-constant-conversion" into main 2024-08-28 20:24:04 +00:00
Treehugger Robot
4e3486b0ba Merge "cc: clearer OS mismatch error." into main 2024-08-28 00:32:32 +00:00
Steven Moreland
aaae81f5fd cc: clearer OS mismatch error.
Bugs: me
Test: clear error message, for instance:

    error: frameworks/native/libs/binder/ndk/Android.bp:252:1: module "libbinder_ndk.ndk" variant "android_x86_64_silvermont_sdk_shared_29": OS mismatch between "libbinder_ndk.ndk" (android) and "libbinder_headers_platform_shared" (linux_glibc)

Change-Id: Idfa6d27daeb89056781c93a893e4080e49b3fcb0
2024-08-27 23:30:31 +00:00
Spandan Das
a6f4b6b104 Merge changes from topic "cc_prebuilt_stubs" into main
* changes:
  Skip `-Wl,--version-script` on libclang_rt.* stubs (temp hack)
  Special case the stubgen args for bionic libs
  Add stub generation support to cc_prebuilt_library
2024-08-27 19:37:08 +00:00
Spandan Das
5922333d5c Skip -Wl,--version-script on libclang_rt.* stubs (temp hack)
The checked-in libclang_rt.* prebuilts do not contain versioned symbols,
but the autogenerated map.txt file for these libraries contain versions
e.g.
LIBCLANG_RT_ASAN {
  global:
...
}
```

This causes a discrepancy between the symbols in the stubs and impl
variants of these libraries. After https://r.android.com/3236596 is
submitted and a new set of libclang_rt.* prebuilts are generated, this
discrepancy will go away.

For now, skip `-Wl,version-script` when generating the stub
variants of these libraries to prevent link errors at build time.

Test: lunch aosp_panther_hwasan-trunk_staging-userdebug && m crash_dump
Bug: 3222365
Change-Id: Ic1e06cb58ec33b761136ac325f191da7ac900151
2024-08-26 19:43:31 +00:00
Priyanka Advani (xWF)
109e77abcd Revert "Enable -Wfortify-source"
This reverts commit 608779b224.

Reason for revert: Droidmonitor created revert due to build breakages in b/362287839.

Change-Id: I6ff96539ae714698692794209d8e76e6062378b0
2024-08-26 18:22:13 +00:00
Aditya Kumar
608779b224 Enable -Wfortify-source
Bug: 315245071
Change-Id: I6a75787f5244c5e89b188113839a2c95c805450e
2024-08-23 19:02:46 +00:00
Pirama Arumuga Nainar
a8d5a78d25 Enable -Wsingle-bit-bitfield-constant-conversion
... after selectively disabling it in external.

Bug: 243965903
Test: presubmit
Change-Id: I4c0e436e2e5314f3b4a236c195651af1cb2a312d
2024-08-23 05:52:40 +00:00
Treehugger Robot
6154ac62d6 Merge "Prevent duplicate dist rules for source and prebuilt C api cov" into main 2024-08-21 19:06:46 +00:00
Spandan Das
c27dd3393c Special case the stubgen args for bionic libs
IsNdk and NotInPlatform can return incorrect values in minimal branches
that do not contain the source bionic libraries. (e.g. in
aosp-master-art)

Bug: 275273834
Test: presbumits (which will build aosp-master-art)
Change-Id: I5e9216a40c0fd2d077bb6c53ba6628e311d99737
2024-08-21 17:59:36 +00:00
Yu Liu
fed2be9f98 Merge "Access output files thru providers in Soong tests." into main 2024-08-21 17:27:21 +00:00
Elliott Hughes
9423b3f784 Merge "Use -fno-omit-frame-pointer for host linux." into main 2024-08-21 12:25:30 +00:00
Yu Liu
51c2231eab Access output files thru providers in Soong tests.
The outputFiles field on ModuleBase will be removed next.

Bug: 358425833
Test: CI
Change-Id: I6d665ac13134d9278e5908f64c454366bc6bca5e
2024-08-21 00:03:50 +00:00
Treehugger Robot
800bde1021 Merge "Encode directly into file" into main 2024-08-20 19:36:46 +00:00
Elliott Hughes
8f977d2982 Merge "Use -fno-omit-frame-pointer for host windows." into main 2024-08-20 19:20:21 +00:00
Elliott Hughes
7ae6c16f51 Use -fno-omit-frame-pointer for host windows.
Helps with debugging/profiling.

Bug: http://b/245707217
Change-Id: I6c163c67a04ab53a0b8a00edb233e6d60404f0a4
2024-08-20 15:09:39 +00:00
Elliott Hughes
67612c37f1 Use -fno-omit-frame-pointer for host darwin.
Helps with debugging/profiling.

Bug: http://b/245707217
Change-Id: Ifbe2f6d05059d4ffee5c33ddec743188164100ef
2024-08-20 15:07:30 +00:00
Elliott Hughes
0b5dce6dae Use -fno-omit-frame-pointer for host linux.
Helps with debugging/profiling.

Bug: http://b/245707217
Change-Id: I6b2d4f73edbdbcdc36b3bf531341dd2dfb51a87c
2024-08-20 15:06:00 +00:00
Cole Faust
5b1a39a92a Merge "Make the WholeStatic/Static/Shared libs properties configurable" into main 2024-08-19 22:48:16 +00:00
Cole Faust
f0006e7137 Make the WholeStatic/Static/Shared libs properties configurable
So that you can use selects with them.

Bug: 342006386
Bug: 358377461
Test: m nothing --no-skip-soong-tests
Change-Id: I5a8350f670d51b7da411ad5c3cdbf5f2d6cdd63b
2024-08-19 14:39:19 -07:00
Yu Liu
d46e5ae670 Remove more internal fields from ModuleBase.
Bug: 358425833
Test: Manual compare the generated ninja and mk files and CI.
Change-Id: I4edd0dc646ac035594f47cd9044cc4eb5f710e64
2024-08-16 00:20:27 +00:00
Spandan Das
357ffcc146 Add stub generation support to cc_prebuilt_library
The `stubs` property in `cc_prebuilt_library` currently does not support
generating stubs from an API symbol file. Reverse dependencies are
always linked against the .so file listed in `srcs`. This CL adds
support to generate the shared library from the .map.txt symbol file of
the prebuilt library.

Implementation details:
1. Add a compiler. This will convert the .map.txt file to a stub .c file.
  The build rules for this are common to the compiler of the source cc_*
moudule types. This has been refactored into a new function named
`compileModuleLibApiStubs`
2. Update the linker to link the aforementioned stub.c file into a .so
  file. Since this happens only for stub variants, it is conditionally
called only when p.buildStubs is true.
3. Call `addStubDependencyProviders`. This will populate the impl
   variant of the library with Stub information. cc#ChooseStubOrImpl
will use this information to resolve rdeps to the stub .so file if the
dependency crosses an api domain boundary.

(2) requires some special casing for now, since the module sdk at HEAD
does not contain symbol files, so the stub.c files will be empty. Once
the symbol files are added to module sdk, the special casing will be
removed.

Test: m nothing --no-skip-soong-tests
Bug: 275273834
Change-Id: I57f5b0a97fac4dfc8c24e07b06a330015add977d
2024-08-15 22:18:48 +00:00
Spandan Das
24b3e534c3 Prevent duplicate dist rules for source and prebuilt C api cov
Adding stub generation support for C prebuilt libraries creates
duplicate dist rules for api coverage files
```
overriding commands for target `<out_dir>/../cc_apis/libc.xml', previously defined at
```

This CL hides the incorrect api coverage file using `IsModulePreferred`.

Bug: 275273834
Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" m droid dist
(no duplicate dist rules)

Change-Id: Id1caade7e80119ed1dfbbef638feb22adf116d63
2024-08-15 21:51:32 +00:00
Yu Liu
e89b6dd497 Merge "Remove installFiles from ModuleBase." into main 2024-08-15 17:23:59 +00:00
Yu Liu
ddc2833b7f Remove installFiles from ModuleBase.
This is to limit the direct accesses to the internal fields of a
module in order to better support incremental caching. To access
the install files data from singleton context or other modules'
context use providers thru the provided wrapper; to access it
from the same module inside GenerateBuildActions use ctx which is
short-lived only inside this method.

Bug: 358425833
Test: CI
Change-Id: I337b07a2ef95fb2a898ac2f9277160a3f76a603c
2024-08-14 22:56:30 +00:00
Dan Albert
61bd3d11e9 Merge "Revert^2 "Verify that ndk_headers headers are valid C."" into main 2024-08-14 22:25:10 +00:00
Treehugger Robot
67e25d144a Merge "Always generate PDB for Windows executable" into main 2024-08-14 21:26:48 +00:00
Fabien Sanglard
aa8020ac13 Always generate PDB for Windows executable
Test: NA
Bug: 350154912
Change-Id: I0a4ebfb62643eb2c8d2b20992e728bcb8b5219a9
2024-08-14 13:31:55 -07:00