File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 11if (SWIFT_SWIFT_PARSER)
2+ # Ensure that we do not link the _StringProcessing module. But we can
3+ # only pass this flag for new-enough compilers that support it.
4+ file (WRITE "${CMAKE_BINARY_DIR} /tmp/empty-check-string-processing.swift" "" )
5+ execute_process (
6+ COMMAND
7+ "${CMAKE_Swift_COMPILER} "
8+ -Xfrontend -disable-implicit-string -processing-module-import
9+ -c - -o /dev/null
10+ INPUT_FILE
11+ "${CMAKE_BINARY_DIR} /tmp/empty-check-string-processing.swift"
12+ OUTPUT_QUIET ERROR_QUIET
13+ RESULT_VARIABLE
14+ SWIFT_SUPPORTS_DISABLE_IMPLICIT_STRING_PROCESSING_MODULE_IMPORT)
15+ if (NOT SWIFT_SUPPORTS_DISABLE_IMPLICIT_STRING_PROCESSING_MODULE_IMPORT)
16+ add_compile_options (
17+ $<$<COMPILE_LANGUAGE:Swift>:-Xfrontend>
18+ $<$<COMPILE_LANGUAGE:Swift>:-disable-implicit-string -processing-module-import>)
19+ endif ()
20+
221 add_library (swiftASTGen STATIC
322 Sources /ASTGen/ASTGen.swift
423 Sources /ASTGen/Decls.swift
You can’t perform that action at this time.
0 commit comments