Skip to content

Commit 7d108e5

Browse files
committed
env2mfile: Add '-Wl,--build-id=sha1' link arg to Android
This is required that the debugger can find the library loaded by the remote device in the local filesystem.
1 parent 934a49d commit 7d108e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mesonbuild/scripts/env2mfile.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,12 @@ def process_ndk(self, ndk: pathlib.Path) -> None:
528528
for name, path in bin_mappings.items():
529529
ofile.write(f"{name} = '{path}'\n")
530530

531+
ofile.write('\n[built-in options]\n')
532+
ofile.write('c_args = []\n')
533+
ofile.write("c_link_args = ['-Wl,--build-id=sha1']\n")
534+
ofile.write('cpp_args = c_args\n')
535+
ofile.write('cpp_link_args = c_link_args\n')
536+
531537
ofile.write('\n[host_machine]\n')
532538
ofile.write("system = 'android'\n")
533539
ofile.write(f"cpu_family = '{ANDROID_CPU_TO_MESON_CPU_FAMILY[cpu]}'\n")

0 commit comments

Comments
 (0)