Skip to content

Commit a3d2a07

Browse files
committed
32 bit build fixes
1 parent 94f31f1 commit a3d2a07

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

CMakeLists.txt

+12-2
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ if (WIN32 AND (NOT MSVC) AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
154154
string(REGEX MATCH "x86_64-.*" _clang_is_x86 ${CLANG_TRIPLE})
155155
if (CLANG_TRIPLE MATCHES "x86_64")
156156
set(CMAKE_SYSTEM_PROCESSOR "amd64")
157+
message(STATUS "Clang detected as x86_64")
157158
else()
158159
set(CMAKE_SYSTEM_PROCESSOR "arm64")
160+
message(STATUS "Clang detected as arm64")
159161
endif()
160162
endif()
161163

@@ -815,6 +817,8 @@ if (WIN32)
815817
else()
816818
include(FindMsys)
817819
endif()
820+
set(MSYS64_CMD ${MSYS_CMD} -here -mingw64 -no-start -defterm -c)
821+
set(MSYS32_CMD ${MSYS_CMD} -here -mingw32 -no-start -defterm -c)
818822
endif()
819823

820824
find_library(SSP_LIBRARY libssp)
@@ -987,6 +991,12 @@ set(HAVE_CRASH_REPORT OFF)
987991
set(HAVE_CRASHPAD OFF)
988992

989993
if (WITH_CRASHPAD)
994+
if (MINGW)
995+
if (NOT "$ENV{MSYSTEM}" STREQUAL "CLANG64")
996+
message(FATAL_ERROR "Crashpad requires MINGW Clang64")
997+
endif()
998+
endif()
999+
9901000
FetchContent_Declare_Logged(
9911001
crashpad
9921002
"A crash-reporting system"
@@ -1014,15 +1024,15 @@ if (WITH_CRASHPAD)
10141024
FetchContent_Declare(
10151025
dump_syms
10161026
GIT_REPOSITORY https://github.com/mozilla/dump_syms.git
1017-
GIT_TAG v2.2.1
1027+
GIT_TAG v2.3.4
10181028
)
10191029
FetchContent_MakeAvailable(dump_syms)
10201030

10211031
set(DUMP_SYMS ${dump_syms_SOURCE_DIR}/target/release/dump_syms.exe)
10221032
add_custom_target(dump_syms ALL DEPENDS ${DUMP_SYMS})
10231033
add_custom_command(
10241034
OUTPUT ${DUMP_SYMS}
1025-
COMMAND ${CARGO} build --release
1035+
COMMAND ${MSYS_CMD} -here -mingw64 -no-start -defterm -c "cargo build --release"
10261036
WORKING_DIRECTORY ${dump_syms_SOURCE_DIR}
10271037
)
10281038

libs/crash/test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (HAVE_CRASHPAD AND HAVE_TESTS)
1111
if (MINGW)
1212
if (DUMP_SYMS)
1313
add_custom_command(TARGET crash POST_BUILD
14-
COMMAND ${DUMP_SYMS} $<TARGET_FILE:crash> -o ${CMAKE_BINARY_DIR}/crash.sym)
14+
COMMAND ${MSYS64_CMD} "${DUMP_SYMS} $<TARGET_FILE:crash> -o ${CMAKE_BINARY_DIR}/crash.sym")
1515
add_dependencies(crash dump_syms)
1616
endif()
1717

po/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ foreach (po_file ${POFILES})
4949
TARGET update-po
5050
POST_BUILD
5151
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --no-wrap --backup=none -s ${po_file} ${POTFILE}
52-
DEPENDS ${POTFILE}
5352
VERBATIM
5453
)
55-
54+
5655
add_custom_command(
5756
OUTPUT ${gmo_file}
5857
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} ${OPT_USE_FUZZY} -c -o ${gmo_file} ${po_file}

ui/app/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ if (MINGW)
217217

218218
if (DUMP_SYMS)
219219
add_custom_command(TARGET workrave POST_BUILD
220-
COMMAND ${DUMP_SYMS} $<TARGET_FILE:workrave> -o ${CMAKE_BINARY_DIR}/workrave.sym)
220+
COMMAND ${MSYS64_CMD} "${DUMP_SYMS} $<TARGET_FILE:workrave> -o ${CMAKE_BINARY_DIR}/workrave.sym")
221221
add_dependencies(workrave dump_syms)
222222
endif()
223223

0 commit comments

Comments
 (0)