From 7f6d4825cf8e7aa5c33cfc12462e640a5b1a0de2 Mon Sep 17 00:00:00 2001 From: TIN TUN AUNG <62133983+rayguo17@users.noreply.github.com> Date: Wed, 23 Jul 2025 12:54:21 +0800 Subject: [PATCH] Ohos: include build id in ohos built binary (#38215) add link-arg for ohos to include build id in its ELF binary. This could enable us to do debugging and size checking more easily. Testing: No test needed. Fixes: N/A cc @jschwe Signed-off-by: rayguo17 --- python/servo/platform/build_target.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/servo/platform/build_target.py b/python/servo/platform/build_target.py index 4c855d89a8c..9c21363d12b 100644 --- a/python/servo/platform/build_target.py +++ b/python/servo/platform/build_target.py @@ -374,7 +374,12 @@ class OpenHarmonyTarget(CrossBuildTarget): # rustc linker env[f"CARGO_TARGET_{rust_target_triple.upper()}_LINKER"] = ndk_clang - link_args = ["-fuse-ld=lld", f"--target={clang_target_triple}", f"--sysroot={ohos_sysroot_posix}"] + link_args = [ + "-fuse-ld=lld", + f"--target={clang_target_triple}", + f"--sysroot={ohos_sysroot_posix}", + "-Wl,--build-id", + ] env["HOST_CFLAGS"] = "" env["HOST_CXXFLAGS"] = ""