From 44a3b452df52265e3432416c3522ec1a35ee1c00 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 8 May 2022 17:48:12 -0300 Subject: [PATCH] clang-cl ci test --- .github/workflows/ci-workflow.yml | 9 +++++++++ extern/crashpad/CMakeLists.txt | 2 +- extern/curl/CMakeLists.txt | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index f5f7df4523..33de79b326 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -188,6 +188,7 @@ jobs: cfg: - { name: i386, arch: x86, ssl-dir: 'C:\Program Files (x86)\OpenSSL-Win32' } - { name: x64, arch: x64, ssl-dir: 'C:\Program Files\OpenSSL-Win64'} + - { name: x64_clang_cl, arch: x64, ssl-dir: 'C:\Program Files\OpenSSL-Win64'} name: "Windows ${{matrix.cfg.name}}" runs-on: windows-2019 @@ -227,6 +228,14 @@ jobs: if: ${{ matrix.cfg.arch == 'x64' }} run: choco install ninja nsis openssl curl -y + - name: Set clang-cl as compiler + if: ${{ matrix.cfg.name == 'x64_clang_cl' }} + run: | + echo "CC=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "CXX=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "CFLAGS=-m64" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "CXXFLAGS=-m64" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + - name: Configure MSBuild uses: ilammy/msvc-dev-cmd@v1 with: diff --git a/extern/crashpad/CMakeLists.txt b/extern/crashpad/CMakeLists.txt index 7c30a88607..49731a8001 100644 --- a/extern/crashpad/CMakeLists.txt +++ b/extern/crashpad/CMakeLists.txt @@ -102,7 +102,7 @@ endif() set(GN_WIN_LINK_FLAG "") # Dynamically link to C runtime library if(WIN32) - set(GN_WIN_LINK_FLAG /MT) # Dynamically link to C runtime library + set(GN_WIN_LINK_FLAG "/GL- /MT") # Dynamically link to C runtime library if(CMAKE_BUILD_TYPE STREQUAL Debug) #TODO: Fix for multi-config generators string(APPEND GN_WIN_LINK_FLAG d) endif() diff --git a/extern/curl/CMakeLists.txt b/extern/curl/CMakeLists.txt index 6e770bc83e..0992a1d580 100644 --- a/extern/curl/CMakeLists.txt +++ b/extern/curl/CMakeLists.txt @@ -1143,7 +1143,8 @@ endif() if(MSVC) # Disable default manifest added by CMake - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") + # Commented: This breaks clang-cl + #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) # if(CMAKE_C_FLAGS MATCHES "/W[0-4]")