Skip to content

Commit c1ef992

Browse files
committed
Disable ASTGen runtime-compat libs
The runtime compat 5.6 library is not available in current toolchains. The stage-0 compiler builds fine since the builder compiler is not aware of the 5.6 library, but the stage-1 compiler will not link since the builder libraries don't have the compat 5.6 library, while the stage-0 compiler is aware of the library and attempts to link it into the built products. The issue is that the bootstrap goes and uses the libraries off of the builder instead of the things that actually match the compiler. This is currently safe because the 5.6 compat library only contains concurrency runtime fixes and the compiler frontend does not use concurrency yet. If this changes, we will need to re-enable this and make the bootstrap use the libraries correctly.
1 parent 97806c9 commit c1ef992

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/ASTGen/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ if (SWIFT_SWIFT_PARSER)
3232
Sources/ASTGen/Types.swift
3333
)
3434

35+
# The compat56 library is not available in current toolchains. The stage-0
36+
# compiler will build fine since the builder compiler is not aware of the 56
37+
# compat library, but the stage-1 and subsequent stage compilers will fail as
38+
# the stage-0 compiler is aware and will attempt to include the appropriate
39+
# compatibility library. We should turn this back on once we are building the
40+
# compiler correctly.
41+
# Note: This is safe at the moment because the 5.6 compat library only
42+
# contains concurrency runtime fixes, and the compiler frontend does not
43+
# use concurrency at the moment.
44+
target_compile_options(swiftASTGen PRIVATE
45+
$<$<COMPILE_LANGUAGE:Swift>:-runtime-compatibility-version>
46+
$<$<COMPILE_LANGUAGE:Swift>:none>)
47+
3548
# Set the appropriate target triple.
3649
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
3750
set(DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")

0 commit comments

Comments
 (0)