alibaba--zvec
e91b7802f3
feat(ci): enable sccache on Windows and propagate compiler launcher to ExternalProject Windows CI builds were ~6-9x slower than other platforms (35-40 min vs 4-7 min) due to missing compiler cache. This commit enables sccache for Windows and ensures all ExternalProject_Add dependencies (Arrow, lz4) receive the compiler launcher on every platform. Changes: MSVC /Zi → /Z7 compatibility: - Replace /Zi with /Z7 in root CMakeLists.txt for DEBUG and RELWITHDEBINFO configurations (MSVC cache variable level) - Patch rocksdb, antlr4, and googletest source CMakeLists to replace hardcoded /Zi with /Z7 at the source, eliminating D9025 warnings - Clear COMPILE_PDB_NAME on googletest targets to prevent CMake from adding /Fd<path>, which causes sccache to look for nonexistent .pdb - Remove /FS (forced synchronous PDB writes) from Arrow ExternalProject MSVC flags — unnecessary with /Z7 Windows CI workflow: - Add mozilla-actions/sccache-action@v0.0.10 - Set SCCACHE_GHA_ENABLED=true to use GitHub Actions Cache backend - Pass CMAKE_C/CXX_COMPILER_LAUNCHER=sccache via --config-settings Compiler launcher propagation: - Propagate CMAKE_C/CXX_COMPILER_LAUNCHER to Arrow ExternalProject on all platforms (Windows, Linux, macOS, Android, iOS) - Propagate to lz4 ExternalProject on Windows via CMAKE_ARGS, using CMP0141=NEW + CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded for /Z7
15 行
805 B
Diff
15 行
805 B
Diff
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
|
|
index 1234567..abcdefg 100644
|
|
--- a/googletest/cmake/internal_utils.cmake
|
|
+++ b/googletest/cmake/internal_utils.cmake
|
|
@@ -72,7 +72,7 @@ macro(config_compiler_and_linker)
|
|
fix_default_compiler_settings_()
|
|
if (MSVC)
|
|
# Newlines inside flags variables break CMake's NMake generator.
|
|
# TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
|
|
- set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi")
|
|
+ set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J /Z7")
|
|
set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
|
|
set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
|
|
set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
|