Commit f89f342
build(native): make NDK outputs path-stable (#7746)
Task/Issue URL:
https://app.asana.com/1/137249556945/task/1213227245294013
### Description
NDK Debug C/C++ builds were producing location-dependent .so files.
Absolute source/build paths were embedded in debug metadata and
linker-generated GNU build IDs varied by build location, which changed
JNI artifacts between equivalent checkouts.
Apply target-specific reproducibility flags in both native modules: add
-fdebug-prefix-map for CMAKE_SOURCE_DIR/CMAKE_BINARY_DIR and set
-Wl,--build-id=none.
Updated targets: crash-ndk (anrs-impl) and https-bloom-lib
(httpsupgrade-impl). This stabilizes stripped native library bytes
across checkout paths and prevents downstream lint/local AAR input drift
that triggers cache misses.
Thanks for the contribution, @ribafish !
### Steps to test this PR
- QA optional
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Build-system-only changes limited to native CMake flags; main risk is
unexpected toolchain/linker incompatibility or debugging metadata
differences.
>
> **Overview**
> Ensures Android NDK shared libraries are *path-stable/reproducible*
across different checkout locations.
>
> Updates both native modules (`crash-ndk` and `https-bloom-lib`) to
normalize source/build paths embedded in debug metadata via
`-fdebug-prefix-map`, and disables linker-generated build IDs with
`-Wl,--build-id=none` to prevent location-dependent `.so` byte
differences.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
09e85f8. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Gasper Kojek <gkojek@gradle.com>1 parent cae5f14 commit f89f342
2 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| 42 | + | |
34 | 43 | | |
35 | | - | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| 51 | + | |
43 | 52 | | |
44 | | - | |
| 53 | + | |
0 commit comments