Skip to content

[SR-6858] Swift Static-Stdlib on Windows doesn't build correctly #49407

Open
@troughton

Description

@troughton
Previous ID SR-6858
Radar None
Original Reporter @troughton
Type Bug
Environment

Windows 10

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CMake, Runtime, Swift4, Windows
Assignee @troughton
Priority Medium

md5: aba5ec98aaa977fb16b11c23fbad793b

relates to:

Issue Description:

For the static stdlib to build correctly on Windows, DLL storage needs to be disabled (within IRGen) and dllimport needs to be disabled.

This requires building the source files within the runtime twice, and also requires that IRGen has knowledge of whether modules will be linked statically or dynamically, since that affects what visibility symbols should have.

In addition, the static libraries are currently output as lib(library).a rather than (library).lib, and swiftCore.lib should be statically linked with ICU.

Metadata

Metadata

Assignees

Labels

WindowsPlatform: WindowsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.cmakecompilerThe Swift compiler itselfruntimeThe Swift Runtimeswift 4.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions