[SETUPLIB][REACTOS][USETUP] Re-organize the setup state variables and some helpers.
[reactos.git] / toolchain-clang.cmake
index 930dafc..5bc72d9 100644 (file)
@@ -40,18 +40,18 @@ set(CMAKE_SYSTEM_PROCESSOR i686)
 
 # Which tools to use
 set(CMAKE_C_COMPILER clang)
 
 # Which tools to use
 set(CMAKE_C_COMPILER clang)
-set(CMAKE_CXX_COMPILER clang++)
+set(CMAKE_CXX_COMPILER ${MINGW_TOOLCHAIN_PREFIX}g++${MINGW_TOOLCHAIN_SUFFIX})
 set(CMAKE_ASM_COMPILER ${MINGW_TOOLCHAIN_PREFIX}gcc${MINGW_TOOLCHAIN_SUFFIX})
 set(CMAKE_ASM_COMPILER_ID "GNU")
 set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc)
 set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres)
 set(CMAKE_DLLTOOL ${MINGW_TOOLCHAIN_PREFIX}dlltool)
 
 set(CMAKE_ASM_COMPILER ${MINGW_TOOLCHAIN_PREFIX}gcc${MINGW_TOOLCHAIN_SUFFIX})
 set(CMAKE_ASM_COMPILER_ID "GNU")
 set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc)
 set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres)
 set(CMAKE_DLLTOOL ${MINGW_TOOLCHAIN_PREFIX}dlltool)
 
-if(NOT LTCG)
-    set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
-else()
-    set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+if(CMAKE_HOST_WIN32)
+    set(CMAKE_AR ar)
 endif()
 endif()
+
+set(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_AR} crT <TARGET> <LINK_FLAGS> <OBJECTS>")
 set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 
 set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})