Skip to content

Commit

Permalink
SwiftCompilerSources: workaround a crash in the LoadableByAddress pas…
Browse files Browse the repository at this point in the history
…s when building on Windows
  • Loading branch information
eeckstein committed Apr 25, 2024
1 parent 4de2baf commit 6ae7846
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SwiftCompilerSources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ function(add_swift_compiler_modules_library name)
"\\1/Platforms/\\2/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift"
resource_dir "${ALS_WIFT_EXEC}")
list(APPEND sdk_option "-resource-dir" "${resource_dir}")

# Workaround a crash in the LoadableByAddress pass
# https://github.com/apple/swift/issues/73254
list(APPEND swift_compile_options "-Xllvm" "-sil-disable-pass=loadable-address")
else()
list(APPEND sdk_option "-I" "${swift_exec_bin_dir}/../lib" "-I" "${sdk_path}/usr/lib")
endif()
Expand Down

0 comments on commit 6ae7846

Please sign in to comment.