From 37c6bb424cea77a296a210aeda511d990465e27e Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 11 Oct 2024 05:42:35 +0900 Subject: [PATCH] xxx --- .github/workflows/cpp.yml | 18 ++++++++++++------ cpp/cmake_modules/SetupCxxFlags.cmake | 8 ++++++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 93bc723cd4304..64f2f002925d2 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -283,12 +283,15 @@ jobs: strategy: fail-fast: false matrix: - os: - - windows-2019 include: - - os: windows-2019 + - compiler: msvc + os: windows-2019 simd-level: AVX2 - title: AMD64 Windows 2019 C++17 AVX2 + title: AMD64 Windows 2019 C++ MSVC AVX2 + - compiler: clang-cl + os: windows-2019 + simd-level: AVX2 + title: AMD64 Windows 2019 C++ clang-cl AVX2 env: ARROW_BOOST_USE_SHARED: OFF ARROW_BUILD_BENCHMARKS: ON @@ -354,8 +357,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.ccache-info.outputs.cache-dir }} - key: cpp-ccache-windows-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} - restore-keys: cpp-ccache-windows-${{ env.CACHE_VERSION }}- + key: cpp-ccache-windows-${{ matrix.compiler }}-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} + restore-keys: cpp-ccache-windows-${{ matrix.compiler }}-${{ env.CACHE_VERSION }}- env: # We can invalidate the current cache by updating this. CACHE_VERSION: "2022-09-13" @@ -363,6 +366,9 @@ jobs: shell: cmd run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + if ${{ matrix.compiler }}==clang-cl ( + set ARROW_CMAKE_ARGS=-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + ) bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build" - name: Test shell: bash diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index fd26dc7dd9c79..e5f910ec318ae 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -249,8 +249,12 @@ if(WIN32) endforeach() endif() - # Support large object code - set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /bigobj") + message("XXX: ${CMAKE_CXX_COMPILER_ID}") + if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # Support large object code. + # clang-cl doesn't support this. + set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /bigobj") + endif() # We may use UTF-8 in source code such as # cpp/src/arrow/compute/kernels/scalar_string_test.cc