Skip to content

Commit 8576fe9

Browse files
committed
[CMake] Avoid 'swiftc -parse' with stdin to check compiler capability
When the host compiler is built with assertions, `swiftc -parse -` hits an assertion failure, which fails the capability checks. (cherry picked from commit cdb8ae3)
1 parent 1d233d6 commit 8576fe9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cmake/modules/SwiftCompilerCapability.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
function(swift_supports_compiler_arguments out_var)
1515
file(WRITE "${CMAKE_BINARY_DIR}/tmp/dummy.swift" "")
1616
execute_process(
17-
COMMAND "${CMAKE_Swift_COMPILER}" -parse ${ARGN} -
18-
INPUT_FILE "${CMAKE_BINARY_DIR}/tmp/dummy.swift"
17+
COMMAND "${CMAKE_Swift_COMPILER}" -parse ${ARGN} "${CMAKE_BINARY_DIR}/tmp/dummy.swift"
1918
OUTPUT_QUIET ERROR_QUIET
2019
RESULT_VARIABLE result
2120
)

0 commit comments

Comments
 (0)