[wasm] Repair build for recent SwiftDriver linkage changes #73746
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BOOTSTRAPPING_MODE
toHOSTTOOLS
and it makesSwiftSource.cmake
setLD_LIBRARY_PATH
to load the Dispatch/Foundation from the just built toolchain (SWIFT_NATIVE_SWIFT_TOOLS_PATH).After f34d388, the EarlySwiftDriver always uses the corelibs of the old host toolchain, so setting
LD_LIBRARY_PATH
leads to loading incompatible corelibs of the old host toolchain, and the build fails.This change tells the CMake build system to use CROSSCOMPILE mode. We already built the toolchain for the current host from the revision being built for the target, so we don't need to inject the lib library of the old host toolchain.
This patch fixes the following CI failure:
https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/681/console
/home/build-user/swift-nightly-install/usr/bin/swiftc: symbol lookup error: /home/build-user/build/buildbot_linux/earlyswiftdriver-linux-x86_64/release/dependencies/swift-tools-support-core/lib/libTSCBasic.so: undefined symbol: $s8Dispatch0A5QueueC5async5group3qos5flags7executeyAA0A5GroupCSg_AA0A3QoSVAA0A13WorkItemFlagsVyyXBtF