File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,19 @@ if(SWIFT_STDLIB_HAS_COMMANDLINE)
347347 list (APPEND swift_core_incorporate_object_libraries swiftCommandLineSupport)
348348endif ()
349349
350+ # Backward deployment of Span on Apple platforms is implemented via the
351+ # libswiftCompatibilitySpan.dylib shim.
352+ #
353+ # This flag ensures we emit the correct $ld$previous$ symbols in the standard
354+ # library. When building a binary for an older deployment target, we
355+ # pretend certain symbols are actually in libswiftCompatibilitySpan.dylib.
356+ #
357+ # Further discussion of libswiftCompatibilitySpan.dylib appears below.
358+ #
359+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
360+ list (APPEND swift_stdlib_compile_flags "-Xfrontend" "-previous-module-installname-map-file" "-Xfrontend" "${CMAKE_CURRENT_SOURCE_DIR} /PreviousModuleInstallName.json" )
361+ endif ()
362+
350363set (swiftCore_common_options
351364 IS_STDLIB IS_STDLIB_CORE
352365 ${SWIFTLIB_SOURCES}
@@ -424,9 +437,6 @@ add_swift_target_library(swiftCore
424437 zippered
425438 )
426439
427- # Backward deployment of Span on Apple platforms is implemented via the
428- # libswiftCompatibilitySpan.dylib shim.
429- #
430440# When a binary built with an older deployment target is run with a new
431441# standard library, the symbols that were previously in the backward
432442# compatibility shim are now in the standard library. To ensure the
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "module" : " CompatibilitySpan" ,
4+ "install_name" : " /usr/lib/swift/libswiftCompatibilitySpan.dylib"
5+ }
6+ ]
You can’t perform that action at this time.
0 commit comments