Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-cl CI #1161

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion extern/crashpad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion extern/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand Down