File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,21 @@ target_link_libraries(swift-frontend
1313 swiftSymbolGraphGen
1414 LLVMBitstreamReader)
1515
16+ # Generate and install supported feature JSON file to the toolchain.
17+ if (NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" )
18+ set (DUMMY_SWIFT_INPUT "${SWIFT_RUNTIME_OUTPUT_INTDIR} /dummyInput.swift" )
19+ set (INT_FEATURE_FILE "${SWIFT_RUNTIME_OUTPUT_INTDIR} /SupportedFeatures.json" )
20+ add_custom_command (TARGET swift-frontend POST_BUILD
21+ COMMAND "${CMAKE_COMMAND} " "-E" "touch" "${DUMMY_SWIFT_INPUT} "
22+ COMMAND "${SWIFT_RUNTIME_OUTPUT_INTDIR} /swift-frontend"
23+ "-emit-supported-features" "-o"
24+ "${INT_FEATURE_FILE} "
25+ "${DUMMY_SWIFT_INPUT} " )
26+ swift_install_in_component(FILES "${INT_FEATURE_FILE} "
27+ DESTINATION "bin"
28+ COMPONENT compiler)
29+ endif ()
30+
1631swift_create_post_build_symlink(swift-frontend
1732 SOURCE "swift-frontend${CMAKE_EXECUTABLE_SUFFIX} "
1833 DESTINATION "swift${CMAKE_EXECUTABLE_SUFFIX} "
You can’t perform that action at this time.
0 commit comments