Skip to content

Commit f32c6e7

Browse files
committed
[CMAKE] Fix compiling 32-bit targets on 64-bit clang-cl
With help of @tkreuzer and @julenuri I got x86_64-pc-windows-msvc flavor of LLVM 13.0.1 compiling 32-bit ReactOS.
1 parent b114e3a commit f32c6e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

toolchain-msvc.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ if(USE_CLANG_CL)
4343
set(CMAKE_CXX_COMPILER_TARGET "i686-pc-windows-msvc")
4444
endif()
4545

46+
if (ARCH STREQUAL "arm" OR ARCH STREQUAL "i386")
47+
set(CMAKE_C_FLAGS "-m32")
48+
set(CMAKE_CXX_FLAGS "-m32")
49+
endif()
50+
4651
# Avoid wrapping RC compiler with cmcldeps utility for clang-cl.
4752
# Otherwise it breaks cross-compilation (32bit ReactOS cannot be compiled by 64bit LLVM),
4853
# target architecture is not passed properly

0 commit comments

Comments
 (0)