Rebuilding libc++ for ARM64 Cross-Compilation

32 views
Skip to first unread message

Franck TALBART

unread,
Sep 24, 2025, 3:47:59 AM (yesterday) Sep 24
to discuss-webrtc

Hi,

I'm trying to cross-compile WebRTC with the following build arguments:

  • is_clang=true
  • use_sysroot=true
  • target_cpu="arm64"
  • is_debug=false

Previously, I was using the system's libc++, but since the use_custom_libcxx flag is being deprecated, I've removed it and am now trying to link against the custom libc++.a and libc++abi.a that are built with the project.

Unfortunately, it appears that the custom libc++ is not being cross-compiled for ARM64. When I inspect the built library, I see that the objects are for x86-64:


objdump -a ./out_Release/clang_x64/obj/buildtools/third_party/libc++/libc++.a | grep format
[...] 
./out_Release/clang_x64/obj/buildtools/third_party/libc++/libc++/bind.o: file format elf64-x86-64 
[...]

What am I missing here? Is there a specific build flag or configuration I need to set to ensure the custom libc++ is built for the correct architecture?

For reference, I'm on the following commit:

commit 93c79360be Author: webrtc-version-updater <webrtc-vers...@webrtc-ci.iam.gserviceaccount.com> Date: Tue Sep 23 21:10:45 2025 -0700

Thanks in advance for any help!

Reply all
Reply to author
Forward
0 new messages