[SR-6489] SwiftPrivate fails to link on Windows #49039
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
swift 4.0
Windows
Platform: Windows
Environment
Tested building for Windows x86_64.
Additional Detail from JIRA
md5: 9e3c64f8ec53dee4e31427808c7c54b2
Issue Description:
When trying to build the standard library for Windows, SwiftPrivate must currently be disabled due to linker errors.
More specifically, the current issue is that the mangled name of TextOutputStream can't be found.
I believe @compnerd has some ideas on how to fix this; I'm filing this bug to track the completion of this task.
Example output:
Linking CXX shared library lib/swift/windows/x86_64/swiftSwiftPrivate.dll
FAILED: : && /mnt/c/swift-source/build/Ninja-ReleaseAssert/llvm-linux-x86_64/./bin/clang++ -fPIC -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections -Werror=switch -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -fno-sanitize=all -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1 -O3 -target x86_64-unknown-windows-msvc -nostdlib -fuse-ld=lld "-L/mnt/c/swift-source/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/windows/x86_64" "-L/mnt/c/swift-source/build/Ninja-ReleaseAssert/swift-linux-x86_64/./bin/../lib/swift/windows/x86_64" "-L/mnt/c/swift-source/build/Ninja-ReleaseAssert/swift-linux-x86_64/./bin/../lib/swift/windows" "-L/mnt/c/swift-source/VCToolsInstallDir/Lib/x64" "-L/mnt/c/swift-source/Windows Kits/10/Lib/10.0.10586.0/ucrt/x64" "-L/mnt/c/swift-source/Windows Kits/10/Lib/10.0.10586.0/um/x64" "-L/mnt/c/swift-source/windows-icu/lib64/icuuc.lib" "-L/mnt/c/swift-source/windows-icu/lib64/icuin.lib" -shared -o lib/swift/windows/x86_64/swiftSwiftPrivate.dll stdlib/private/SwiftPrivate/windows/x86_64/SwiftPrivate.o -L/mnt/c/swift-source/build/Ninja-ReleaseAssert/llvm-linux-x86_64/./lib ./lib/swift/windows/x86_64/swiftCore.lib &&
/usr/bin/lld-link: error: stdlib/private/swiftprivate/windows/x86_64/swiftprivate.o: undefined symbol: _T0s16TextOutputStreamMp
clang-5.0: error: linker command failed with exit code 1
The text was updated successfully, but these errors were encountered: