Skip to content

Commit

Permalink
Disable --dependency-file; Newer versions of CMake seems to enable th…
Browse files Browse the repository at this point in the history
…at automatically, but it breaks building PE files
  • Loading branch information
ilmmatias committed Jan 9, 2025
1 parent 16b64e0 commit 7ff1f7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/sdk/cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ set(CMAKE_CXX_STANDARD 23)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
set(CMAKE_RC_FLAGS "--target=${TARGET_${ARCH}}-w64-mingw32")

set(CMAKE_LINK_DEF_FILE_FLAG "")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

add_link_options(-nostdlib -nodefaultlibs)
14 changes: 8 additions & 6 deletions src/sdk/cmake/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ set(CMAKE_SYSTEM_NAME Palladium)
set(CMAKE_SYSTEM_PROCESSOR ${ARCH})

set(CMAKE_C_COMPILER clang)
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER clang)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_ASM_COMPILER clang)
set(CMAKE_RC_COMPILER llvm-windres)
set(CMAKE_AR llvm-ar)

# We're missing a message compiler for now (probably just build the one from binutils?)
set(CMAKE_RC_COMPILER llvm-windres)
set(CMAKE_RC_FLAGS --target=${TARGET_${ARCH}}-w64-mingw32)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(CMAKE_C_COMPILER_WORKS 1)

# Disable --dependency-file, it's not supported for .exe (PE) targets
set(CMAKE_C_LINKER_DEPFILE_SUPPORTED FALSE)
set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED FALSE)

0 comments on commit 7ff1f7e

Please sign in to comment.