Skip to content

Instantly share code, notes, and snippets.

@enkiusz
Last active February 3, 2026 14:20
Show Gist options
  • Select an option

  • Save enkiusz/caccf2a77f3fe7daf5af097b75c3dc6d to your computer and use it in GitHub Desktop.

Select an option

Save enkiusz/caccf2a77f3fe7daf5af097b75c3dc6d to your computer and use it in GitHub Desktop.
Test cross-compilation of libdatachannel in https://github.com/project-chip/connectedhomeip
set -x
for target_cpu in arm arm64; do
echo "CROSS clang -> $target_cpu: ----------------------------"
rm -rf out/; rm -rf third_party/libdatachannel/repo/build; rm tls.cpp.o
gn gen out/libdatachannel_test --args='chip_support_webrtc_python_bindings=true target_cpu="'$target_cpu'" is_clang=true'
ninja -C out/libdatachannel_test/ 'libdatachannel'
ar x /workspaces/connectedhomeip/third_party/libdatachannel/scripts/../repo/build/$target_cpu-clang/libdatachannel.a tls.cpp.o
file tls.cpp.o
done
echo HOST clang: ----------------------------
rm -rf out/; rm -rf third_party/libdatachannel/repo/build; rm tls.cpp.o
gn gen out/libdatachannel_test --args='chip_support_webrtc_python_bindings=true is_clang=true'
ninja -C out/libdatachannel_test/ 'libdatachannel'
ar x /workspaces/connectedhomeip/third_party/libdatachannel/scripts/../repo/build/x64-clang/libdatachannel.a tls.cpp.o
file tls.cpp.o
echo HOST gcc: ----------------------------
rm -rf out/; rm -rf third_party/libdatachannel/repo/build; rm tls.cpp.o
gn gen out/libdatachannel_test --args='chip_support_webrtc_python_bindings=true'
ninja -C out/libdatachannel_test/ 'libdatachannel'
ar x /workspaces/connectedhomeip/third_party/libdatachannel/scripts/../repo/build/x64-gcc/libdatachannel.a tls.cpp.o
file tls.cpp.o
set +x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment