{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift/pulls/comments/89799395","pull_request_review_id":10333332,"id":89799395,"diff_hunk":"@@ -84,7 +84,7 @@ add_swift_library(swiftRuntime OBJECT_LIBRARY TARGET_LIBRARY\n   C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}\n   LINK_FLAGS ${swift_runtime_linker_flags}\n   INSTALL_IN_COMPONENT never_install\n-  TARGET_SDKS ANDROID CYGWIN FREEBSD LINUX)\n+  TARGET_SDKS ANDROID CYGWIN FREEBSD LINUX WINDOWS)","path":"stdlib/public/runtime/CMakeLists.txt","position":5,"original_position":5,"commit_id":"3b809bc359d478cdd6e2272030ae4a77cc8d2748","original_commit_id":"3b809bc359d478cdd6e2272030ae4a77cc8d2748","user":{"login":"hughbe","id":1275900,"avatar_url":"https://avatars.githubusercontent.com/u/1275900?v=3","gravatar_id":"","url":"https://api.github.com/users/hughbe","html_url":"https://github.com/hughbe","followers_url":"https://api.github.com/users/hughbe/followers","following_url":"https://api.github.com/users/hughbe/following{/other_user}","gists_url":"https://api.github.com/users/hughbe/gists{/gist_id}","starred_url":"https://api.github.com/users/hughbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughbe/subscriptions","organizations_url":"https://api.github.com/users/hughbe/orgs","repos_url":"https://api.github.com/users/hughbe/repos","events_url":"https://api.github.com/users/hughbe/events{/privacy}","received_events_url":"https://api.github.com/users/hughbe/received_events","type":"User","site_admin":false},"body":"Take a look at: https://github.com/apple/swift/pull/5942","created_at":"2016-11-28T15:10:54Z","updated_at":"2016-11-28T15:10:54Z","html_url":"https://github.com/apple/swift/pull/5904#discussion_r89799395","pull_request_url":"https://api.github.com/repos/apple/swift/pulls/5904","_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/comments/89799395"},"html":{"href":"https://github.com/apple/swift/pull/5904#discussion_r89799395"},"pull_request":{"href":"https://api.github.com/repos/apple/swift/pulls/5904"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/5904","id":94867374,"html_url":"https://github.com/apple/swift/pull/5904","diff_url":"https://github.com/apple/swift/pull/5904.diff","patch_url":"https://github.com/apple/swift/pull/5904.patch","issue_url":"https://api.github.com/repos/apple/swift/issues/5904","number":5904,"state":"open","locked":false,"title":"Add support and instructions for building Swift on Windows with MSVC","user":{"login":"hughbe","id":1275900,"avatar_url":"https://avatars.githubusercontent.com/u/1275900?v=3","gravatar_id":"","url":"https://api.github.com/users/hughbe","html_url":"https://github.com/hughbe","followers_url":"https://api.github.com/users/hughbe/followers","following_url":"https://api.github.com/users/hughbe/following{/other_user}","gists_url":"https://api.github.com/users/hughbe/gists{/gist_id}","starred_url":"https://api.github.com/users/hughbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughbe/subscriptions","organizations_url":"https://api.github.com/users/hughbe/orgs","repos_url":"https://api.github.com/users/hughbe/repos","events_url":"https://api.github.com/users/hughbe/events{/privacy}","received_events_url":"https://api.github.com/users/hughbe/received_events","type":"User","site_admin":false},"body":"## Caveat\r\nPlease note: this PR on its own does not constitute actual support for building on Windows upon merging this PR.\r\n\r\nFor this, apple/swift-clang#45 and apple/swift-llvm#33 will have to be merged.\r\nAfter this, I will break up my branch: https://github.com/hughbe/swift/tree/improve-win-instructions (that has a fully building Swift compiler) into multiple PRs (20 or so - 1 for each sub-project) and submit them.\r\n\r\nIf this is merged and you try to build Swift on Windows with MSVC, expect many thousands of build errors - many are duplicates, and all have been addressed in my branch above.\r\n\r\nThis could take a while, so hold your horses :)\r\n\r\n## Instructions/build-script\r\nThe instructions are pretty lengthy, and may deserve their own PR (up to the reviewers). Unfortunately we can't support the bash build-script natively on Windows, so we will need to write one for Windows.\r\nPerhaps this could be part of an effort to move build-script-impl into Python.\r\nHowever, I've focused my time on the actual compiler, and a build-script will come, but in the future.\r\n\r\n## Discussion\r\n- We get linker errors (unresolved external symbol _TMps16TextOutputStream) linking swiftPrivate.dll. For now building swiftPrivate is disabled in order to get the stdlib all building. This will need to be fixed at some point!\r\n- We get \"no such module 'ucrt'\" errors building stdlib/public/platform. For now building swiftMSVCRT is disabled in order to get the stdlib all building. This will need to be fixed at some point!\r\n- Building, editing and building is a bit annoying, as you have to delete the swiftc/swift-format/swift-autolink-extract etc. Unfortunately, cmake's `IF EXISTS` doesn't support symlinks so we'll need an external script to fix this\r\n- For some reason, the swift module files of the stdlib are set as readonly and can't be modified. This means that recompilation of the stdlib requires a clean stdlib (i.e. empty lib/swift/windows/x86_64 directory). Not sure how to get around this (we might need to do the Windows equivilent of `chmod`)\r\n\r\nI look forward to your comments\r\n","created_at":"2016-11-22T18:04:52Z","updated_at":"2016-11-28T15:10:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4d3e41daf38507252fd12fcdd067255839b5175","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift/pulls/5904/commits","review_comments_url":"https://api.github.com/repos/apple/swift/pulls/5904/comments","review_comment_url":"https://api.github.com/repos/apple/swift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift/issues/5904/comments","statuses_url":"https://api.github.com/repos/apple/swift/statuses/3b809bc359d478cdd6e2272030ae4a77cc8d2748","head":{"label":"hughbe:windows-cmake","ref":"windows-cmake","sha":"3b809bc359d478cdd6e2272030ae4a77cc8d2748","user":{"login":"hughbe","id":1275900,"avatar_url":"https://avatars.githubusercontent.com/u/1275900?v=3","gravatar_id":"","url":"https://api.github.com/users/hughbe","html_url":"https://github.com/hughbe","followers_url":"https://api.github.com/users/hughbe/followers","following_url":"https://api.github.com/users/hughbe/following{/other_user}","gists_url":"https://api.github.com/users/hughbe/gists{/gist_id}","starred_url":"https://api.github.com/users/hughbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughbe/subscriptions","organizations_url":"https://api.github.com/users/hughbe/orgs","repos_url":"https://api.github.com/users/hughbe/repos","events_url":"https://api.github.com/users/hughbe/events{/privacy}","received_events_url":"https://api.github.com/users/hughbe/received_events","type":"User","site_admin":false},"repo":{"id":52473012,"name":"swift","full_name":"hughbe/swift","owner":{"login":"hughbe","id":1275900,"avatar_url":"https://avatars.githubusercontent.com/u/1275900?v=3","gravatar_id":"","url":"https://api.github.com/users/hughbe","html_url":"https://github.com/hughbe","followers_url":"https://api.github.com/users/hughbe/followers","following_url":"https://api.github.com/users/hughbe/following{/other_user}","gists_url":"https://api.github.com/users/hughbe/gists{/gist_id}","starred_url":"https://api.github.com/users/hughbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughbe/subscriptions","organizations_url":"https://api.github.com/users/hughbe/orgs","repos_url":"https://api.github.com/users/hughbe/repos","events_url":"https://api.github.com/users/hughbe/events{/privacy}","received_events_url":"https://api.github.com/users/hughbe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hughbe/swift","description":"The Swift Programming Language","fork":true,"url":"https://api.github.com/repos/hughbe/swift","forks_url":"https://api.github.com/repos/hughbe/swift/forks","keys_url":"https://api.github.com/repos/hughbe/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hughbe/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hughbe/swift/teams","hooks_url":"https://api.github.com/repos/hughbe/swift/hooks","issue_events_url":"https://api.github.com/repos/hughbe/swift/issues/events{/number}","events_url":"https://api.github.com/repos/hughbe/swift/events","assignees_url":"https://api.github.com/repos/hughbe/swift/assignees{/user}","branches_url":"https://api.github.com/repos/hughbe/swift/branches{/branch}","tags_url":"https://api.github.com/repos/hughbe/swift/tags","blobs_url":"https://api.github.com/repos/hughbe/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hughbe/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hughbe/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/hughbe/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hughbe/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/hughbe/swift/languages","stargazers_url":"https://api.github.com/repos/hughbe/swift/stargazers","contributors_url":"https://api.github.com/repos/hughbe/swift/contributors","subscribers_url":"https://api.github.com/repos/hughbe/swift/subscribers","subscription_url":"https://api.github.com/repos/hughbe/swift/subscription","commits_url":"https://api.github.com/repos/hughbe/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/hughbe/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/hughbe/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/hughbe/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/hughbe/swift/contents/{+path}","compare_url":"https://api.github.com/repos/hughbe/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hughbe/swift/merges","archive_url":"https://api.github.com/repos/hughbe/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hughbe/swift/downloads","issues_url":"https://api.github.com/repos/hughbe/swift/issues{/number}","pulls_url":"https://api.github.com/repos/hughbe/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/hughbe/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/hughbe/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hughbe/swift/labels{/name}","releases_url":"https://api.github.com/repos/hughbe/swift/releases{/id}","deployments_url":"https://api.github.com/repos/hughbe/swift/deployments","created_at":"2016-02-24T20:42:27Z","updated_at":"2016-02-24T20:42:53Z","pushed_at":"2016-11-28T10:55:53Z","git_url":"git://github.com/hughbe/swift.git","ssh_url":"git@github.com:hughbe/swift.git","clone_url":"https://github.com/hughbe/swift.git","svn_url":"https://github.com/hughbe/swift","homepage":"https://swift.org/","size":131344,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"301f6f617920bf04b4acb3fffa2cf790ebde7e78","user":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44838949,"name":"swift","full_name":"apple/swift","owner":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift","description":"The Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift","forks_url":"https://api.github.com/repos/apple/swift/forks","keys_url":"https://api.github.com/repos/apple/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift/teams","hooks_url":"https://api.github.com/repos/apple/swift/hooks","issue_events_url":"https://api.github.com/repos/apple/swift/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift/events","assignees_url":"https://api.github.com/repos/apple/swift/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift/tags","blobs_url":"https://api.github.com/repos/apple/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift/languages","stargazers_url":"https://api.github.com/repos/apple/swift/stargazers","contributors_url":"https://api.github.com/repos/apple/swift/contributors","subscribers_url":"https://api.github.com/repos/apple/swift/subscribers","subscription_url":"https://api.github.com/repos/apple/swift/subscription","commits_url":"https://api.github.com/repos/apple/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift/merges","archive_url":"https://api.github.com/repos/apple/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift/downloads","issues_url":"https://api.github.com/repos/apple/swift/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift/deployments","created_at":"2015-10-23T21:15:07Z","updated_at":"2016-11-28T14:58:13Z","pushed_at":"2016-11-28T12:02:52Z","git_url":"git://github.com/apple/swift.git","ssh_url":"git@github.com:apple/swift.git","clone_url":"https://github.com/apple/swift.git","svn_url":"https://github.com/apple/swift","homepage":"https://swift.org/","size":204229,"stargazers_count":35342,"watchers_count":35342,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5114,"mirror_url":null,"open_issues_count":122,"forks":5114,"open_issues":122,"watchers":35342,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/5904"},"html":{"href":"https://github.com/apple/swift/pull/5904"},"issue":{"href":"https://api.github.com/repos/apple/swift/issues/5904"},"comments":{"href":"https://api.github.com/repos/apple/swift/issues/5904/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift/pulls/5904/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift/pulls/5904/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift/statuses/3b809bc359d478cdd6e2272030ae4a77cc8d2748"}}}}
{"actor":{"display_login":"hughbe"}}