Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-6489] SwiftPrivate fails to link on Windows #49039

Closed
troughton opened this issue Nov 29, 2017 · 3 comments
Closed

[SR-6489] SwiftPrivate fails to link on Windows #49039

troughton opened this issue Nov 29, 2017 · 3 comments
Assignees
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

Comments

@troughton
Copy link
Contributor

Previous ID SR-6489
Radar None
Original Reporter @troughton
Type Bug
Status Resolved
Resolution Done
Environment

Tested building for Windows x86_64.

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, Swift4, Windows
Assignee @compnerd
Priority Medium

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

@belkadan
Copy link
Contributor

Windows isn't a supported platform at this time, but we'll certainly take fixes that get it closer to working!

@compnerd
Copy link
Collaborator

Thanks to some help from @jckarter and @rjmccall, #14710 has a preliminary patch to help address this issue. It needs a bit more work to enhance it further, but, conceptually, should be possible to support. I think that this might be one of the last pieces missing to support doing a complete build on Windows. I think that once this is completed, asb (JIRA User) should be able to setup a Jenkins instance to run through the unit tests on a continuous basis (and eventually, pre-checkin).

@compnerd
Copy link
Collaborator

compnerd commented Mar 2, 2018

Adjusted the IRGen to generate a reference to the synthetic import symbol rather than trying to create the local equivalent needed for ELF/MachO.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants