Operations 30 min read

Tencent Meeting C++ Cross-Platform Compilation Acceleration Practice

By adopting a unified architecture and a pre‑compilation strategy that leverages CI, git‑diff module detection, version‑managed manifests, and platform‑specific build tools, Tencent Meeting cut its C++ cross‑platform compile times from minutes to seconds, achieving up to 99 % speedup across Windows, Android, iOS and macOS.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Tencent Meeting C++ Cross-Platform Compilation Acceleration Practice

As a naturally cross-platform product, Tencent Meeting adopted a homogeneous architecture approach from the first line of code—one unified architecture serving all scenarios. Over the past year, Tencent Meeting iterated and optimized 20,000 features, stably supporting hundreds of millions of users. The client alone has over 1 million lines of upper-layer business logic code. After optimization, compilation time on Windows has been reduced to as fast as 10 seconds, becoming a benchmark for C++ cross-platform projects in the industry.

The article details the compilation acceleration strategies: First, it analyzes two feasible approaches for module compilation exemption—module independent operation and module pre-compilation. The pre-compilation solution was chosen for higher feasibility. The key challenges addressed include: where to execute the build (using Coding CI), how to incrementally publish products (using git diff with pathspec to identify modified modules), where to upload pre-compiled products (Tencent Cloud Generic repository), and how to use pre-compiled products (automatic matching and source compilation switching).

The article further explains the implementation details: using Git commit ID as module version numbers for automatic version management, creating a manifest file (base_manifest.json) to record module product information, and implementing product/source compilation switching for different platforms (CMake for C++, Gradle for Android). For IDE integration, it covers automatic CMake regeneration on Windows, manual regeneration prompts for Xcode, and LLDB source mapping for breakpoint debugging.

Performance results show significant improvements: Android reduced from 17 minutes to 3 minutes (82% efficiency gain), Windows from 20 minutes to 10 seconds (99% gain), iOS from 12 minutes to 3 minutes (75% gain), and macOS from 16 minutes to 4 minutes (75% gain).

incremental buildDevOpsC++GradleCross-Platform DevelopmentcmakeCompilation OptimizationTencent Meeting
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.