File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ if(TEST_SUITE_FORTRAN)
3737 mark_as_advanced (CLEAR CMAKE_Fortran_COMPILER)
3838endif ()
3939
40+ if (CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_SIMULATE_ID MATCHES "MSVC" )
41+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /FIstdio.h" )
42+ endif ()
43+
4044# The files in cmake/caches often want to pass along additional flags to select
4145# the target architecture. Note that you should still use
4246# CMAKE_OSX_ARCHITECTURES and CMAKE_C_COMPILER_TARGET where possible.
@@ -299,6 +303,12 @@ mark_as_advanced(TEST_SUITE_LIT TEST_SUITE_LIT_FLAGS)
299303mark_as_advanced (TEST_SUITE_LIT)
300304
301305add_subdirectory (tools)
306+
307+ # Turn on ignore whitespacing on WIN32 to avoid line-ending mismatch
308+ if (TARGET_OS STREQUAL "Windows" )
309+ set (FP_IGNOREWHITESPACE ON )
310+ endif ()
311+
302312# Shortcut for the path to the fpcmp executable
303313set (FPCMP fpcmp-target )
304314if (TEST_SUITE_USER_MODE_EMULATION)
Original file line number Diff line number Diff line change @@ -16,10 +16,17 @@ function(llvm_copy target to from)
1616 )
1717endfunction ()
1818
19+ # On Windows create_symlink requires special permissions. Use copy_if_different instead.
20+ if (CMAKE_HOST_WIN32 )
21+ set (_link_or_copy copy_if_different)
22+ else ()
23+ set (_link_or_copy create_symlink)
24+ endif ()
25+
1926function (llvm_create_symlink target to from)
2027 add_custom_command (
2128 TARGET ${target} POST_BUILD
22- COMMAND ${CMAKE_COMMAND} -E create_symlink ${from} ${to}
29+ COMMAND ${CMAKE_COMMAND} -E ${_link_or_copy} ${from} ${to}
2330 )
2431endfunction ()
2532
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ function(llvm_test_executable_no_test target)
6565
6666 if (TEST_SUITE_LLVM_SIZE)
6767 add_custom_command (TARGET ${target} POST_BUILD
68- COMMAND ${TEST_SUITE_LLVM_SIZE} --format=sysv $<TARGET_FILE:${target} >
69- > $<TARGET_FILE:${target} >.size)
68+ COMMAND ${TEST_SUITE_LLVM_SIZE} --format=sysv $<SHELL_PATH:$< TARGET_FILE:${target} > >
69+ > $<SHELL_PATH:$< TARGET_FILE:${target} > >.size)
7070 endif ()
7171endfunction ()
7272
You can’t perform that action at this time.
0 commit comments