Skip to content

Commit 71706d8

Browse files
authored
Merge pull request #59102 from apple/egorzhdan/libswift-no-backport
[SwiftCompilerSources][build] Fix build with `SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT=NO`
2 parents 4c015bb + b07a0ab commit 71706d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ function(add_swift_compiler_modules_library name)
8787
list(APPEND swift_compile_options "-O" "-cross-module-optimization")
8888
endif()
8989

90+
if(NOT SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT)
91+
list(APPEND swift_compile_options "-Xfrontend" "-disable-legacy-type-info")
92+
endif()
93+
9094
get_bootstrapping_path(build_dir ${CMAKE_CURRENT_BINARY_DIR} "${ALS_BOOTSTRAPPING}")
9195

9296
set(sdk_option "")
@@ -267,7 +271,7 @@ else()
267271
list(APPEND b1_deps copy-libstdcxx-modulemap-bootstrapping1 copy-libstdcxx-header-bootstrapping1)
268272
endif()
269273
endif()
270-
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
274+
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS AND SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT)
271275
set(platform ${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR})
272276
set(compatibility_libs
273277
"swiftCompatibility50-${platform}"

0 commit comments

Comments
 (0)