Couldn't lookup symbols: __swift_FORCE_LOAD_$_swiftXCTest

I've built Swift-preview-6 from source on Darwin. It generally appears to work, but a simple "import XCTest" fails:

$ swift
warning: (x86_64) /Library/Developer/Toolchains/caffeinated-swift-3.0-PREVIEW-6.xctoolchain/System/Library/PrivateFrameworks/LLDB.framework/Resources/repl_swift empty dSYM file detected, dSYM was created with an executable with no debug info.
Welcome to Apple Swift version 3.0 (swift-3.0-PREVIEW-6). Type :help for assistance.
1> import XCTest
warning: (x86_64) /Library/Developer/Toolchains/caffeinated-swift-3.0-PREVIEW-6.xctoolchain/usr/lib/swift/macosx/libswiftCoreImage.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
error: Couldn't lookup symbols:
__swift_FORCE_LOAD_$_swiftXCTest

1>
Looking in libSwiftXCTest.dylib does turn up such a symbol:

0000000000023e98 g 0f SECT 22 0000 [__DATA.__common] __swift_FORCE_LOAD_$_swiftXCTest
so why swift is unable to load it is a bit of a mystery.