Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Runtimes/Core/cmake/modules/PlatformInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ set(module_triple_command "${CMAKE_Swift_COMPILER}" -print-target-info)
if(CMAKE_Swift_COMPILER_TARGET)
list(APPEND module_triple_command -target ${CMAKE_Swift_COMPILER_TARGET})
endif()
execute_process(COMMAND ${module_triple_command} OUTPUT_VARIABLE target_info_json)
execute_process(COMMAND ${module_triple_command}
OUTPUT_VARIABLE target_info_json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're improving the failure path, can we also get the ERROR_VARIABLE and output what the error was, either in the CONFIGURE_LOG or as part of the fatal error if it exists.

RESULT_VARIABLE lastexitcode)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, but not a huge fan of carcrashcase.

if(lastexitcode)
message(FATAL_ERROR "'${module_triple_command}' returned non-zero exit code ${lastexitcode}")
endif()
message(CONFIGURE_LOG "Swift target info: ${module_triple_command}\n"
"${target_info_json}")

Expand Down