Use MacOS system clang instead of brew's
I don't know why current CI scripts try to use brew's LLVM instead of Apple's, but it turns out that simply switching to Apple's seems to fix the compilation issue that we've been having for months!
PS: Is there a plan of having some of these CI upload the artefacts to a proper GitHub Release, so that they do not expire? It is useful when using Dawn to be able to freeze the version that we rely on, but it is not reasonable to freeze to a binary artifact that won't last.
This is an imported pull request from
https://github.com/google/dawn/pull/21
GITHUB_PR_HEAD_SHA=d4f5d515d907850130b2f39b619af3cd9307ca79
ORIGINAL_AUTHOR=Elie Michel <eliemichel@users.noreply.github.com>
GitOrigin-RevId: bf40e7aa5459dde6699b04d69e8014ecf77bb20f
Change-Id: I62d70daf1b92307ee6e2f12a91720ecd52b54c5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/207137
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: dan sinclair <dsinclair@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c845150..1246f3f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,17 +23,26 @@
# 2. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Debug, latest GCC compiler toolchain in the container, default generator>
# 4. <Linux, Release, latest GCC compiler toolchain in the container, default generator>
- # 5. <MacOS, Debug, latest Clang compiler toolchain on the default runner image, default generator>
- # 6. <MacOS, Release, latest Clang compiler toolchain on the default runner image, default generator>
+ # 5. <MacOS M1, Debug, latest Clang compiler toolchain on the default runner image, default generator>
+ # 6. <MacOS M1, Release, latest Clang compiler toolchain on the default runner image, default generator>
+ # 7. <MacOS x64, Debug, latest Clang compiler toolchain on the default runner image, default generator>
+ # 8. <MacOS x64, Release, latest Clang compiler toolchain on the default runner image, default generator>
matrix:
- os: [macos-latest, ubuntu-latest, windows-latest]
+ os: [windows-latest, ubuntu-latest, macos-latest, macos-13]
build_type: [Debug, Release]
toolchain: [gcc, clang, msvc]
include:
- os: macos-latest
toolchain: clang
- c_compiler: $(brew --prefix llvm@15)/bin/clang
- cpp_compiler: $(brew --prefix llvm@15)/bin/clang++
+ c_compiler: clang
+ cpp_compiler: clang++
+ env:
+ MACOSX_DEPLOYMENT_TARGET: "11.0"
+ container: null
+ - os: macos-13
+ toolchain: clang
+ c_compiler: clang
+ cpp_compiler: clang++
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
container: null
@@ -54,6 +63,10 @@
toolchain: msvc
- os: macos-latest
toolchain: gcc
+ - os: macos-13
+ toolchain: msvc
+ - os: macos-13
+ toolchain: gcc
- os: ubuntu-latest
toolchain: msvc
- os: ubuntu-latest
diff --git a/src/cmake/DawnLibrary.cmake b/src/cmake/DawnLibrary.cmake
index 870c4a1..6793d19 100644
--- a/src/cmake/DawnLibrary.cmake
+++ b/src/cmake/DawnLibrary.cmake
@@ -179,6 +179,13 @@
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
+ # When building in debug mode with MSVC, install PDB files together with binaries
+ if (MSVC)
+ get_target_property(target_type "${name}" TYPE)
+ if ((target_type STREQUAL "STATIC_LIBRARY") OR (target_type STREQUAL "SHARED_LIBRARY") OR (target_type STREQUAL "EXECUTABLE"))
+ install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
+ endif()
+ endif (MSVC)
foreach(header IN LISTS arg_HEADERS)
# Starting from CMake 3.20 there is the cmake_path command that could simplify this code.
# Compute the install subdirectory for the header by stripping out the path to