diff options
| author | Juan Ramos <juan@lunarg.com> | 2023-10-27 13:00:31 -0600 |
|---|---|---|
| committer | Juan Ramos <114601453+juan-lunarg@users.noreply.github.com> | 2023-10-27 13:48:20 -0600 |
| commit | 6d82db744dd1dd2a81480658be3a291c616c5fa4 (patch) | |
| tree | 8b0a8fccc9fb163a77ada6b4a9616ba1fd01263a | |
| parent | b7ce1695084d772d973f2f8146951cc48c57ff4a (diff) | |
| download | usermoji-6d82db744dd1dd2a81480658be3a291c616c5fa4.tar.xz | |
build: Fix MinGW build
Removed /guard:cf from CMake build
Doesn't seem to actually be needed.
| -rw-r--r-- | .github/workflows/tools.yml | 27 | ||||
| -rw-r--r-- | cube/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | vulkaninfo/CMakeLists.txt | 5 |
3 files changed, 27 insertions, 12 deletions
diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index eeaebddf..8a0314b9 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -203,6 +203,33 @@ jobs: - name: Install run: cmake --install build --prefix /tmp + mingw: + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: mingw-ccache + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - uses: lukka/get-cmake@latest + - name: GCC Version + run: gcc --version # If this fails MINGW is not setup correctly + - name: Configure + run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release + env: + LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead. + CMAKE_C_COMPILER_LAUNCHER: ccache + CMAKE_CXX_COMPILER_LAUNCHER: ccache + CMAKE_GENERATOR: Ninja + - run: cmake --build build + - run: cmake --install build --prefix build/install + tools_codegen: runs-on: ubuntu-latest steps: diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt index 8ab409e9..4bb75b8e 100644 --- a/cube/CMakeLists.txt +++ b/cube/CMakeLists.txt @@ -84,13 +84,6 @@ endif() if(WIN32) add_definitions(-DVK_USE_PLATFORM_WIN32_KHR -DWIN32_LEAN_AND_MEAN) - if(MSVC AND NOT MSVC_VERSION LESS 1900) - # If MSVC, Enable control flow guard - message(STATUS "Building vkcube with control flow guard") - add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/guard:cf>") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf") - endif() elseif(ANDROID) add_definitions(-DVK_USE_PLATFORM_ANDROID_KHR) elseif(APPLE) diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt index 57f07bef..8a1742bc 100644 --- a/vulkaninfo/CMakeLists.txt +++ b/vulkaninfo/CMakeLists.txt @@ -121,11 +121,6 @@ if(WIN32) _CRT_SECURE_NO_WARNINGS VK_NO_PROTOTYPES ) - - message(STATUS "Building vulkaninfo with control flow guard") - target_compile_options(vulkaninfo PRIVATE /guard:cf) - target_link_options(vulkaninfo PRIVATE /guard:cf) - elseif(APPLE) target_compile_definitions(vulkaninfo PRIVATE VK_USE_PLATFORM_METAL_EXT) if (IOS) |
