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-1131] Build script for MSVC on Windows #43744

Closed
swift-ci opened this issue Apr 3, 2016 · 5 comments
Closed

[SR-1131] Build script for MSVC on Windows #43744

swift-ci opened this issue Apr 3, 2016 · 5 comments

Comments

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Apr 3, 2016

Previous ID SR-1131
Radar None
Original Reporter tinysun (JIRA User)
Type New Feature
Status Closed
Resolution Won't Do

Attachment: Download

Additional Detail from JIRA
Votes 1
Component/s
Labels New Feature, BuildScript, Windows
Assignee hughbe (JIRA)
Priority Medium

md5: c2969f9f4900e59969d5d0cc93513ed5

is duplicated by:

  • SR-9031 Make build-script multiplatform

relates to:

  • SR-34 Port Swift to Windows

Issue Description:

There is no build script for MSVC on Windows. Some problems that need to be solved:

  • build-script.sh is interpreted with Bash and doesn't work natively on Windows.

  • cmake output for clang has some problems.

    • To compile the compiler source, clang.exe or clang-cl.exe should be used. The CMake generator option -G "Visual Studio 14 2015 Win64" created many *.vcxproj files with unwanted options. They are unknown options such as -w14062 /Zc:inline /EHs-c- and -fms-compatibility. Currently a bash script running on Cygwin is used to patch .vcxproj files (see attachment), but the build process should be performed without this post-processing.
  • The command line is trimmed if it is over 8192 bytes.

    • The limited command line buffer size was problem when compiling Swift.obj. When generating Swift.obj, the line-directive script is used with full path list of stdlib/public/core/*.swift. It was nearly 15KB size.
@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Apr 27, 2016

Comment by Han Sangjin (JIRA)

-fms-compatibility is described in detail at MSVC compatibility.

I quote a swift committer said about this,
'-fms-extension should be fine, since that enables purely additive MSVC features, whereas -fms-compatibility causes Clang to deliberately emulate MSVC bugs. We'd prefer not to have to deal with the latter.'

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Oct 7, 2016

Comment by Kevin Choi (JIRA)

utils/build-script is python script which is fine and portable. build-script-impl is entirely in bash.

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Oct 12, 2016

Comment by Kevin Choi (JIRA)

Is there any plan/desire/request for porting build-script-impl to python? that would be much cleaner IMO.

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Feb 23, 2017

Comment by Hugh Bellamy (JIRA)

Second point is fixed - we don't include certain compiler/linker arguments with MSVC or clang-cl
Third point is fixed - we work around this by using response files

First is the next thing on my list to do

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Apr 17, 2019

Comment by Hugh Bellamy (JIRA)

Not pursuing MSVC anymore

@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
Projects
None yet
Development

No branches or pull requests

1 participant