File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -87,11 +87,18 @@ endif()
87
87
string (REGEX MATCH "[0-9]+\\ .[0-9]+(\\ .[0-9]+)?" CLANG_VERSION
88
88
"${LLVM_PACKAGE_VERSION} " )
89
89
if (NOT SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER )
90
- execute_process (COMMAND ${CMAKE_C_COMPILER} -print-resource-dir
91
- OUTPUT_VARIABLE clang_headers_location
92
- OUTPUT_STRIP_TRAILING_WHITESPACE
93
- ERROR_QUIET )
94
- message (STATUS "using clang resource directory: ${clang_headers_location} " )
90
+ if (SWIFT_COMPILER_IS_MSVC_LIKE )
91
+ execute_process (COMMAND ${CMAKE_C_COMPILER} /clang:-print-resource-dir
92
+ OUTPUT_VARIABLE clang_headers_location
93
+ OUTPUT_STRIP_TRAILING_WHITESPACE
94
+ ERROR_QUIET )
95
+ else ()
96
+ execute_process (COMMAND ${CMAKE_C_COMPILER} -print-resource-dir
97
+ OUTPUT_VARIABLE clang_headers_location
98
+ OUTPUT_STRIP_TRAILING_WHITESPACE
99
+ ERROR_QUIET )
100
+ endif ()
101
+ message (STATUS "Using clang Resource Directory: ${clang_headers_location} " )
95
102
else ()
96
103
set (clang_headers_location "${LLVM_LIBRARY_OUTPUT_INTDIR} /clang/${CLANG_VERSION} " )
97
104
endif ()
You can’t perform that action at this time.
0 commit comments