Swift port to Windows : Offering help!

windows

(Joel Van Eenwyk) #1

Hi all,

I'm a very new user of Swift and interested in finding ways to contribute
to the project. I can happily work with the Linux port of the project, but
I have a lot of Windows development experience and would probably be most
useful there. Where can I find information about the current status of a
Windows port (if any)? Perhaps I'm blind but finding any 'official'
information about a Windows version has been quite tricky. :slight_smile:

For background on me, I'm primarily a game programmer and the company I
work for (Havok) recently got acquired by Microsoft. Working on some open
source projects is just something I'm interested in exploring in my free
time.

All the best,

--Joel


(Dmitri Gribenko) #2

CC'ing Han, the maintainer of the Cygwin port.

···

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev <swift-dev@swift.org> wrote:

Hi all,

I'm a very new user of Swift and interested in finding ways to contribute to
the project. I can happily work with the Linux port of the project, but I
have a lot of Windows development experience and would probably be most
useful there. Where can I find information about the current status of a
Windows port (if any)? Perhaps I'm blind but finding any 'official'
information about a Windows version has been quite tricky. :slight_smile:

For background on me, I'm primarily a game programmer and the company I work
for (Havok) recently got acquired by Microsoft. Working on some open source
projects is just something I'm interested in exploring in my free time.

All the best,

--Joel

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/


(Chris Lattner) #3

I don’t know anything about modern windows issues, but I just wanted to say - it would be awesome to see great support for Swift on Windows!

-Chris

···

On Apr 20, 2016, at 10:59 PM, Joel Van Eenwyk via swift-dev <swift-dev@swift.org> wrote:

Hi all,

I'm a very new user of Swift and interested in finding ways to contribute to the project. I can happily work with the Linux port of the project, but I have a lot of Windows development experience and would probably be most useful there. Where can I find information about the current status of a Windows port (if any)? Perhaps I'm blind but finding any 'official' information about a Windows version has been quite tricky. :)


(Han Sang-jin) #4

I'm writing code for Windows/Cygwin port on my free time. There is no well
documented information about that. Instead I'll give you some information
and several links for you.

1. Cygwin port
  Cygwin is a POSIX environment on Windows. Porting to Cygwin is relatively
easer than Windows native. This is x86_64-unknown-windows-cygwin in llvm
target name.

  Currently, you can build the swift compiler and standard library if you
applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the
autolink-extract module, passing failed test code, etc.

2. Window port
  This is x86_64-pc-windows-msvc in llvm target name, so I call this
'Windows with MSVC library' when confusing with Cygwin - Windows with
Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses
C++11 standard with some POSIX functions, GNU extension functions as well
as platform specific codes for OS X or Linux, and the build script for
Swift supposed to run on BASH shell. To compile the Swift source, we should
use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles
Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for
DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

···

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev > <swift-dev@swift.org> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to
contribute to
> the project. I can happily work with the Linux port of the project, but I
> have a lot of Windows development experience and would probably be most
> useful there. Where can I find information about the current status of a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company I
work
> for (Havok) recently got acquired by Microsoft. Working on some open
source
> projects is just something I'm interested in exploring in my free time.
>
> All the best,
>
> --Joel
>
> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/


(SimonKnight) #5

Hi All,
I have also just started to figure out how to contribute and found the following:
https://github.com/tinysun212/swift-windows
https://github.com/tinysun212/swift-windows-bin

···

-----Original Message-----
From: swift-dev-bounces@swift.org [mailto:swift-dev-bounces@swift.org] On Behalf Of Chris Lattner via swift-dev
Sent: Monday, 25 April 2016 6:59 AM
To: Joel Van Eenwyk <joel.vaneenwyk@gmail.com>
Cc: swift-dev@swift.org
Subject: Re: [swift-dev] Swift port to Windows : Offering help!

On Apr 20, 2016, at 10:59 PM, Joel Van Eenwyk via swift-dev <swift-dev@swift.org> wrote:

Hi all,

I'm a very new user of Swift and interested in finding ways to contribute to the project. I can happily work with the Linux port of the project, but I have a lot of Windows development experience and would probably be most useful there. Where can I find information about the current status of a Windows port (if any)? Perhaps I'm blind but finding any 'official' information about a Windows version has been quite tricky. :slight_smile:

I don’t know anything about modern windows issues, but I just wanted to say - it would be awesome to see great support for Swift on Windows!

-Chris

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Joel Van Eenwyk) #6

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these
changes? I'd love to be able to test this out and contribute if you think
that could help you out. I can get started on testing what you have now as
soon as tomorrow.

Cheers,

--Joel

···

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev < swift-dev@swift.org> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no well
documented information about that. Instead I'll give you some information
and several links for you.

1. Cygwin port
  Cygwin is a POSIX environment on Windows. Porting to Cygwin is
relatively easer than Windows native. This is x86_64-unknown-windows-cygwin
in llvm target name.

  Currently, you can build the swift compiler and standard library if you
applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the
autolink-extract module, passing failed test code, etc.

2. Window port
  This is x86_64-pc-windows-msvc in llvm target name, so I call this
'Windows with MSVC library' when confusing with Cygwin - Windows with
Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses
C++11 standard with some POSIX functions, GNU extension functions as well
as platform specific codes for OS X or Linux, and the build script for
Swift supposed to run on BASH shell. To compile the Swift source, we should
use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles
Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for
DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev >> <swift-dev@swift.org> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to
contribute to
> the project. I can happily work with the Linux port of the project, but
I
> have a lot of Windows development experience and would probably be most
> useful there. Where can I find information about the current status of a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company I
work
> for (Havok) recently got acquired by Microsoft. Working on some open
source
> projects is just something I'm interested in exploring in my free time.
>
> All the best,
>
> --Joel
>
> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Han Sang-jin) #7

Hi Joel,

I list some URLs.

Bug/Feature report in http://bugs.swift.org

···

-------------------------------------------
SR-34 Port Swift to Windows (https://bugs.swift.org/browse/SR-34)
SR-612 In Cygwin port, print() crashed at hook (
https://bugs.swift.org/browse/SR-612)
SR-1128 autolink extraction does not work on Cygwin (
https://bugs.swift.org/browse/SR-1128)
SR-1131 Build script for MSVC on Windows (
https://bugs.swift.org/browse/SR-1131)

Pull Requsts in http://github.com/apple/swift
---------------------------------------------
[stdlib/msvc] Runtime with MSVC library (
https://github.com/apple/swift/pull/1918)
-- Currently working on. Waiting passing PR #1950.

[swiftc/msvc] Compiling with MSVC library (
https://github.com/apple/swift/pull/1516)
-- Waiting some more opinions or reviews.

[runtime] enhanced and refactored recently added Mutex abstraction (
https://github.com/apple/swift/pull/1950)
-- This is not about porting, but it enhances portability by removing POSIX
pthread. After merging, PR #1918 will be more simpler.

IRGen: add support for DLL Storage semantics (
https://github.com/apple/swift/pull/2080)
-- I think this is the most important topic for Windows/MSVC porting, but
not Cygwin port.

Issues in Mailing list
----------------------
Subject: "swift (ABI) and Windows" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/subject.html
and
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160411/subject.html

Subject: "long double usage in swift" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160321/subject.html

My Repo for Patch
-----------------
Repository:
https://github.com/tinysun212/swift-windows/tree/upstream-with-windows
binary for MSVC:
https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418
binary for Cygwin:
https://github.com/tinysun212/swift-windows-bin/tree/master/swift-cygwin

Help
----
If you are also interested in Cygwin port, it is also very helpful to
verify/check the build manual (it is placed at /BUILD-CYGWIN-64.md in root
of my repo), so that we make a PR for master, and everyone build the Cygwin
port without my forked repo.

For building MSVC port, it will be better waiting several days until I
prepare a draft build manual - current build description is too dirty
(/misc/Build_msvc.txt).

If you once run the compilers, you can see they are lack compared to Linux
or OS X.

All of that is only on swift port. For swift-lldb,
swift-corelibs-foundation, swift-corelibs-libdispatch, I have not touched
at all.

Han Sangjin

2016-04-22 8:20 GMT+09:00 Joel Van Eenwyk <joel.vaneenwyk@gmail.com>:

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these
changes? I'd love to be able to test this out and contribute if you think
that could help you out. I can get started on testing what you have now as
soon as tomorrow.

Cheers,

--Joel

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev < > swift-dev@swift.org> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no
well documented information about that. Instead I'll give you some
information and several links for you.

1. Cygwin port
  Cygwin is a POSIX environment on Windows. Porting to Cygwin is
relatively easer than Windows native. This is x86_64-unknown-windows-cygwin
in llvm target name.

  Currently, you can build the swift compiler and standard library if you
applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the
autolink-extract module, passing failed test code, etc.

2. Window port
  This is x86_64-pc-windows-msvc in llvm target name, so I call this
'Windows with MSVC library' when confusing with Cygwin - Windows with
Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses
C++11 standard with some POSIX functions, GNU extension functions as well
as platform specific codes for OS X or Linux, and the build script for
Swift supposed to run on BASH shell. To compile the Swift source, we should
use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles
Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for
DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev >>> <swift-dev@swift.org> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to
contribute to
> the project. I can happily work with the Linux port of the project,
but I
> have a lot of Windows development experience and would probably be most
> useful there. Where can I find information about the current status of
a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company
I work
> for (Havok) recently got acquired by Microsoft. Working on some open
source
> projects is just something I'm interested in exploring in my free time.
>
> All the best,
>
> --Joel
>
> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Joel Van Eenwyk) #8

Hi Han,

Thanks for all the details and links! I'll pull these down today and give
the Cygwin port a shot to start with. Please let me know when the MSVC port
is in a good place to start hammering on it.

As for the JIRA tickets, are you alright with me updating some of those to
include more details and active progress so that it's easier for others to
find it? I use JIRA daily and find great pleasure in cleaning up tickets. I
agree with your comments on https://bugs.swift.org/browse/SR-34 that there
should be separate issues for each variant. If nobody disagrees, I can get
those created and linked up properly.

Cheers,

--Joel

···

On Thu, Apr 21, 2016 at 7:18 PM, Sangjin Han <tinysun.net@gmail.com> wrote:

Hi Joel,

I list some URLs.

Bug/Feature report in http://bugs.swift.org
-------------------------------------------
SR-34 Port Swift to Windows (https://bugs.swift.org/browse/SR-34)
SR-612 In Cygwin port, print() crashed at hook (
https://bugs.swift.org/browse/SR-612)
SR-1128 autolink extraction does not work on Cygwin (
https://bugs.swift.org/browse/SR-1128)
SR-1131 Build script for MSVC on Windows (
https://bugs.swift.org/browse/SR-1131)

Pull Requsts in http://github.com/apple/swift
---------------------------------------------
[stdlib/msvc] Runtime with MSVC library (
https://github.com/apple/swift/pull/1918)
-- Currently working on. Waiting passing PR #1950.

[swiftc/msvc] Compiling with MSVC library (
https://github.com/apple/swift/pull/1516)
-- Waiting some more opinions or reviews.

[runtime] enhanced and refactored recently added Mutex abstraction (
https://github.com/apple/swift/pull/1950)
-- This is not about porting, but it enhances portability by removing
POSIX pthread. After merging, PR #1918 will be more simpler.

IRGen: add support for DLL Storage semantics (
https://github.com/apple/swift/pull/2080)
-- I think this is the most important topic for Windows/MSVC porting, but
not Cygwin port.

Issues in Mailing list
----------------------
Subject: "swift (ABI) and Windows" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/subject.html
and
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160411/subject.html

Subject: "long double usage in swift" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160321/subject.html

My Repo for Patch
-----------------
Repository:
https://github.com/tinysun212/swift-windows/tree/upstream-with-windows
binary for MSVC:
https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418
binary for Cygwin:
https://github.com/tinysun212/swift-windows-bin/tree/master/swift-cygwin

Help
----
If you are also interested in Cygwin port, it is also very helpful to
verify/check the build manual (it is placed at /BUILD-CYGWIN-64.md in root
of my repo), so that we make a PR for master, and everyone build the Cygwin
port without my forked repo.

For building MSVC port, it will be better waiting several days until I
prepare a draft build manual - current build description is too dirty
(/misc/Build_msvc.txt).

If you once run the compilers, you can see they are lack compared to Linux
or OS X.

All of that is only on swift port. For swift-lldb,
swift-corelibs-foundation, swift-corelibs-libdispatch, I have not touched
at all.

Han Sangjin

2016-04-22 8:20 GMT+09:00 Joel Van Eenwyk <joel.vaneenwyk@gmail.com>:

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these
changes? I'd love to be able to test this out and contribute if you think
that could help you out. I can get started on testing what you have now as
soon as tomorrow.

Cheers,

--Joel

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev < >> swift-dev@swift.org> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no
well documented information about that. Instead I'll give you some
information and several links for you.

1. Cygwin port
  Cygwin is a POSIX environment on Windows. Porting to Cygwin is
relatively easer than Windows native. This is x86_64-unknown-windows-cygwin
in llvm target name.

  Currently, you can build the swift compiler and standard library if
you applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the
autolink-extract module, passing failed test code, etc.

2. Window port
  This is x86_64-pc-windows-msvc in llvm target name, so I call this
'Windows with MSVC library' when confusing with Cygwin - Windows with
Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses
C++11 standard with some POSIX functions, GNU extension functions as well
as platform specific codes for OS X or Linux, and the build script for
Swift supposed to run on BASH shell. To compile the Swift source, we should
use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles
Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for
DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev >>>> <swift-dev@swift.org> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to
contribute to
> the project. I can happily work with the Linux port of the project,
but I
> have a lot of Windows development experience and would probably be
most
> useful there. Where can I find information about the current status
of a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company
I work
> for (Havok) recently got acquired by Microsoft. Working on some open
source
> projects is just something I'm interested in exploring in my free
time.
>
> All the best,
>
> --Joel
>
> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Shawn Erickson) #9

Trying to get back on PR1950 today.. fighting to get things building again
after a recent update-checkout.

-Shawn

···

On Thu, Apr 21, 2016 at 7:18 PM Sangjin Han via swift-dev < swift-dev@swift.org> wrote:

Hi Joel,

I list some URLs.

Bug/Feature report in http://bugs.swift.org
-------------------------------------------
SR-34 Port Swift to Windows (https://bugs.swift.org/browse/SR-34)
SR-612 In Cygwin port, print() crashed at hook (
https://bugs.swift.org/browse/SR-612)
SR-1128 autolink extraction does not work on Cygwin (
https://bugs.swift.org/browse/SR-1128)
SR-1131 Build script for MSVC on Windows (
https://bugs.swift.org/browse/SR-1131)

Pull Requsts in http://github.com/apple/swift
---------------------------------------------
[stdlib/msvc] Runtime with MSVC library (
https://github.com/apple/swift/pull/1918)
-- Currently working on. Waiting passing PR #1950.

[swiftc/msvc] Compiling with MSVC library (
https://github.com/apple/swift/pull/1516)
-- Waiting some more opinions or reviews.

[runtime] enhanced and refactored recently added Mutex abstraction (
https://github.com/apple/swift/pull/1950)
-- This is not about porting, but it enhances portability by removing
POSIX pthread. After merging, PR #1918 will be more simpler.

IRGen: add support for DLL Storage semantics (
https://github.com/apple/swift/pull/2080)
-- I think this is the most important topic for Windows/MSVC porting, but
not Cygwin port.

Issues in Mailing list
----------------------
Subject: "swift (ABI) and Windows" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/subject.html
and
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160411/subject.html

Subject: "long double usage in swift" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160321/subject.html

My Repo for Patch
-----------------
Repository:
https://github.com/tinysun212/swift-windows/tree/upstream-with-windows
binary for MSVC:
https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418
binary for Cygwin:
https://github.com/tinysun212/swift-windows-bin/tree/master/swift-cygwin

Help
----
If you are also interested in Cygwin port, it is also very helpful to
verify/check the build manual (it is placed at /BUILD-CYGWIN-64.md in root
of my repo), so that we make a PR for master, and everyone build the Cygwin
port without my forked repo.

For building MSVC port, it will be better waiting several days until I
prepare a draft build manual - current build description is too dirty
(/misc/Build_msvc.txt).

If you once run the compilers, you can see they are lack compared to Linux
or OS X.

All of that is only on swift port. For swift-lldb,
swift-corelibs-foundation, swift-corelibs-libdispatch, I have not touched
at all.

Han Sangjin

2016-04-22 8:20 GMT+09:00 Joel Van Eenwyk <joel.vaneenwyk@gmail.com>:

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these
changes? I'd love to be able to test this out and contribute if you think
that could help you out. I can get started on testing what you have now as
soon as tomorrow.

Cheers,

--Joel

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev < >> swift-dev@swift.org> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no
well documented information about that. Instead I'll give you some
information and several links for you.

1. Cygwin port
  Cygwin is a POSIX environment on Windows. Porting to Cygwin is
relatively easer than Windows native. This is x86_64-unknown-windows-cygwin
in llvm target name.

  Currently, you can build the swift compiler and standard library if
you applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the
autolink-extract module, passing failed test code, etc.

2. Window port
  This is x86_64-pc-windows-msvc in llvm target name, so I call this
'Windows with MSVC library' when confusing with Cygwin - Windows with
Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses
C++11 standard with some POSIX functions, GNU extension functions as well
as platform specific codes for OS X or Linux, and the build script for
Swift supposed to run on BASH shell. To compile the Swift source, we should
use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles
Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for
DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev >>>> <swift-dev@swift.org> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to
contribute to
> the project. I can happily work with the Linux port of the project,
but I
> have a lot of Windows development experience and would probably be
most
> useful there. Where can I find information about the current status
of a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company
I work
> for (Havok) recently got acquired by Microsoft. Working on some open
source
> projects is just something I'm interested in exploring in my free
time.
>
> All the best,
>
> --Joel
>
> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Joel Van Eenwyk) #10

Hi Han,

I’ve synced and ready to help out on this.

“For building MSVC port, it will be better waiting several days until I
prepare a draft build manual - current build description is too dirty (/misc
/Build_msvc.txt).‚ÄĚ

Any updates on this?

--Joel

···

*From:* Shawn Erickson [mailto:shawnce@gmail.com]
*Sent:* Friday, April 22, 2016 8:27 AM
*To:* Sangjin Han <tinysun.net@gmail.com>; Joel Van Eenwyk <
joel.vaneenwyk@gmail.com>
*Cc:* swift-dev <swift-dev@swift.org>
*Subject:* Re: [swift-dev] Swift port to Windows : Offering help!

Trying to get back on PR1950 today.. fighting to get things building again
after a recent update-checkout.

-Shawn

On Thu, Apr 21, 2016 at 7:18 PM Sangjin Han via swift-dev < swift-dev@swift.org> wrote:

Hi Joel,

I list some URLs.

Bug/Feature report in http://bugs.swift.org

-------------------------------------------

SR-34 Port Swift to Windows (https://bugs.swift.org/browse/SR-34)

SR-612 In Cygwin port, print() crashed at hook (
https://bugs.swift.org/browse/SR-612)

SR-1128 autolink extraction does not work on Cygwin (
https://bugs.swift.org/browse/SR-1128)

SR-1131 Build script for MSVC on Windows (
https://bugs.swift.org/browse/SR-1131)

Pull Requsts in http://github.com/apple/swift

---------------------------------------------

[stdlib/msvc] Runtime with MSVC library (
https://github.com/apple/swift/pull/1918)

-- Currently working on. Waiting passing PR #1950.

[swiftc/msvc] Compiling with MSVC library (
https://github.com/apple/swift/pull/1516)

-- Waiting some more opinions or reviews.

[runtime] enhanced and refactored recently added Mutex abstraction (
https://github.com/apple/swift/pull/1950)

-- This is not about porting, but it enhances portability by removing POSIX
pthread. After merging, PR #1918 will be more simpler.

IRGen: add support for DLL Storage semantics (
https://github.com/apple/swift/pull/2080)

-- I think this is the most important topic for Windows/MSVC porting, but
not Cygwin port.

Issues in Mailing list

----------------------

Subject: "swift (ABI) and Windows" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/subject.html
and
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160411/subject.html

Subject: "long double usage in swift" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160321/subject.html

My Repo for Patch

-----------------

Repository:
https://github.com/tinysun212/swift-windows/tree/upstream-with-windows

binary for MSVC:
https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418

binary for Cygwin:
https://github.com/tinysun212/swift-windows-bin/tree/master/swift-cygwin

Help

----

If you are also interested in Cygwin port, it is also very helpful to
verify/check the build manual (it is placed at /BUILD-CYGWIN-64.md in root
of my repo), so that we make a PR for master, and everyone build the Cygwin
port without my forked repo.

For building MSVC port, it will be better waiting several days until I
prepare a draft build manual - current build description is too dirty
(/misc/Build_msvc.txt).

If you once run the compilers, you can see they are lack compared to Linux
or OS X.

All of that is only on swift port. For swift-lldb,
swift-corelibs-foundation, swift-corelibs-libdispatch, I have not touched
at all.

Han Sangjin

2016-04-22 8:20 GMT+09:00 Joel Van Eenwyk <joel.vaneenwyk@gmail.com>:

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these
changes? I'd love to be able to test this out and contribute if you think
that could help you out. I can get started on testing what you have now as
soon as tomorrow.

Cheers,

--Joel

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev < swift-dev@swift.org> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no well
documented information about that. Instead I'll give you some information
and several links for you.

1. Cygwin port

  Cygwin is a POSIX environment on Windows. Porting to Cygwin is relatively
easer than Windows native. This is x86_64-unknown-windows-cygwin in llvm
target name.

  Currently, you can build the swift compiler and standard library if you
applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the
autolink-extract module, passing failed test code, etc.

2. Window port

  This is x86_64-pc-windows-msvc in llvm target name, so I call this
'Windows with MSVC library' when confusing with Cygwin - Windows with
Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses
C++11 standard with some POSIX functions, GNU extension functions as well
as platform specific codes for OS X or Linux, and the build script for
Swift supposed to run on BASH shell. To compile the Swift source, we should
use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles
Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for
DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev <swift-dev@swift.org> wrote:

Hi all,

I'm a very new user of Swift and interested in finding ways to contribute

to

the project. I can happily work with the Linux port of the project, but I
have a lot of Windows development experience and would probably be most
useful there. Where can I find information about the current status of a
Windows port (if any)? Perhaps I'm blind but finding any 'official'
information about a Windows version has been quite tricky. :slight_smile:

For background on me, I'm primarily a game programmer and the company I

work

for (Havok) recently got acquired by Microsoft. Working on some open

source

projects is just something I'm interested in exploring in my free time.

All the best,

--Joel

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Han Sang-jin) #11

I was busy. Before cleaning build procedure, I merged recent snapshot, and resolving conflict, followed up some bug, modified and checked Cygwin build. Now in cleaning build procedure for MSVC, I decided to change the cmake generator to Ninja from MSBuild - it is more faster when recompiling.

It will be finished in soon. But don't expect too much, ... you should use hexa editor to build the static library.

- Han Sangjin

2016. 4. 28. 6:09 Joel Van Eenwyk <joel.vaneenwyk@gmail.com> :

···

Hi Han,

I’ve synced and ready to help out on this.

‚ÄúFor building MSVC port, it will be better waiting several days until I prepare a draft build manual - current build description is too dirty (/misc/Build_msvc.txt).‚ÄĚ

Any updates on this?

--Joel

From: Shawn Erickson [mailto:shawnce@gmail.com]
Sent: Friday, April 22, 2016 8:27 AM
To: Sangjin Han <tinysun.net@gmail.com>; Joel Van Eenwyk <joel.vaneenwyk@gmail.com>
Cc: swift-dev <swift-dev@swift.org>
Subject: Re: [swift-dev] Swift port to Windows : Offering help!

Trying to get back on PR1950 today.. fighting to get things building again after a recent update-checkout.

-Shawn

On Thu, Apr 21, 2016 at 7:18 PM Sangjin Han via swift-dev <swift-dev@swift.org> wrote:

Hi Joel,

I list some URLs.

Bug/Feature report in http://bugs.swift.org

-------------------------------------------

SR-34 Port Swift to Windows (https://bugs.swift.org/browse/SR-34)

SR-612 In Cygwin port, print() crashed at hook (https://bugs.swift.org/browse/SR-612)

SR-1128 autolink extraction does not work on Cygwin (https://bugs.swift.org/browse/SR-1128)

SR-1131 Build script for MSVC on Windows (https://bugs.swift.org/browse/SR-1131)

Pull Requsts in http://github.com/apple/swift

---------------------------------------------

[stdlib/msvc] Runtime with MSVC library (https://github.com/apple/swift/pull/1918)

-- Currently working on. Waiting passing PR #1950.

[swiftc/msvc] Compiling with MSVC library (https://github.com/apple/swift/pull/1516)

-- Waiting some more opinions or reviews.

[runtime] enhanced and refactored recently added Mutex abstraction (https://github.com/apple/swift/pull/1950)

-- This is not about porting, but it enhances portability by removing POSIX pthread. After merging, PR #1918 will be more simpler.

IRGen: add support for DLL Storage semantics (https://github.com/apple/swift/pull/2080)

-- I think this is the most important topic for Windows/MSVC porting, but not Cygwin port.

Issues in Mailing list

----------------------

Subject: "swift (ABI) and Windows" in https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/subject.html and https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160411/subject.html

Subject: "long double usage in swift" in https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160321/subject.html

My Repo for Patch

-----------------

Repository: https://github.com/tinysun212/swift-windows/tree/upstream-with-windows

binary for MSVC: https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418

binary for Cygwin: https://github.com/tinysun212/swift-windows-bin/tree/master/swift-cygwin

Help

----

If you are also interested in Cygwin port, it is also very helpful to verify/check the build manual (it is placed at /BUILD-CYGWIN-64.md in root of my repo), so that we make a PR for master, and everyone build the Cygwin port without my forked repo.

For building MSVC port, it will be better waiting several days until I prepare a draft build manual - current build description is too dirty (/misc/Build_msvc.txt).

If you once run the compilers, you can see they are lack compared to Linux or OS X.

All of that is only on swift port. For swift-lldb, swift-corelibs-foundation, swift-corelibs-libdispatch, I have not touched at all.

Han Sangjin

2016-04-22 8:20 GMT+09:00 Joel Van Eenwyk <joel.vaneenwyk@gmail.com>:

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these changes? I'd love to be able to test this out and contribute if you think that could help you out. I can get started on testing what you have now as soon as tomorrow.

Cheers,

--Joel

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev <swift-dev@swift.org> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no well documented information about that. Instead I'll give you some information and several links for you.

1. Cygwin port

  Cygwin is a POSIX environment on Windows. Porting to Cygwin is relatively easer than Windows native. This is x86_64-unknown-windows-cygwin in llvm target name.

  Currently, you can build the swift compiler and standard library if you applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the autolink-extract module, passing failed test code, etc.

2. Window port

  This is x86_64-pc-windows-msvc in llvm target name, so I call this 'Windows with MSVC library' when confusing with Cygwin - Windows with Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses C++11 standard with some POSIX functions, GNU extension functions as well as platform specific codes for OS X or Linux, and the build script for Swift supposed to run on BASH shell. To compile the Swift source, we should use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev > <swift-dev@swift.org> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to contribute to
> the project. I can happily work with the Linux port of the project, but I
> have a lot of Windows development experience and would probably be most
> useful there. Where can I find information about the current status of a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company I work
> for (Havok) recently got acquired by Microsoft. Working on some open source
> projects is just something I'm interested in exploring in my free time.
>
> All the best,
>
> --Joel
>

> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Erica Sadun) #12

Please whoever is doing the windows port, please drop me an email and let me know how things are going, what challenges you're facing etc. I'd like to get you a little publicity. (Also happy to write about any other dev-specific challenges for the language, not just Windows.)

Cheers, -- Erica

···

On Apr 27, 2016, at 6:25 PM, Han via swift-dev <swift-dev@swift.org> wrote:

I was busy. Before cleaning build procedure, I merged recent snapshot, and resolving conflict, followed up some bug, modified and checked Cygwin build. Now in cleaning build procedure for MSVC, I decided to change the cmake generator to Ninja from MSBuild - it is more faster when recompiling.

It will be finished in soon. But don't expect too much, ... you should use hexa editor to build the static library.

- Han Sangjin

2016. 4. 28. 6:09 Joel Van Eenwyk <joel.vaneenwyk@gmail.com <mailto:joel.vaneenwyk@gmail.com>> :

Hi Han,

I’ve synced and ready to help out on this.

‚ÄúFor building MSVC port, it will be better waiting several days until I prepare a draft build manual - current build description is too dirty (/misc/Build_msvc.txt).‚ÄĚ

Any updates on this?

<>
--Joel <>

From: <> Shawn Erickson [mailto:shawnce@gmail.com <mailto:shawnce@gmail.com>]
Sent: Friday, April 22, 2016 8:27 AM
To: Sangjin Han <tinysun.net@gmail.com <mailto:tinysun.net@gmail.com>>; Joel Van Eenwyk <joel.vaneenwyk@gmail.com <mailto:joel.vaneenwyk@gmail.com>>
Cc: swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>>
Subject: Re: [swift-dev] Swift port to Windows : Offering help!

Trying to get back on PR1950 today.. fighting to get things building again after a recent update-checkout.

-Shawn

On Thu, Apr 21, 2016 at 7:18 PM Sangjin Han via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hi Joel,

I list some URLs.

Bug/Feature report in http://bugs.swift.org <http://bugs.swift.org/>
-------------------------------------------

SR-34 Port Swift to Windows (https://bugs.swift.org/browse/SR-34)

SR-612 In Cygwin port, print() crashed at hook (https://bugs.swift.org/browse/SR-612)

SR-1128 autolink extraction does not work on Cygwin (https://bugs.swift.org/browse/SR-1128)

SR-1131 Build script for MSVC on Windows (https://bugs.swift.org/browse/SR-1131)

Pull Requsts in http://github.com/apple/swift

---------------------------------------------

[stdlib/msvc] Runtime with MSVC library (https://github.com/apple/swift/pull/1918)

-- Currently working on. Waiting passing PR #1950.

[swiftc/msvc] Compiling with MSVC library (https://github.com/apple/swift/pull/1516)

-- Waiting some more opinions or reviews.

[runtime] enhanced and refactored recently added Mutex abstraction (https://github.com/apple/swift/pull/1950)

-- This is not about porting, but it enhances portability by removing POSIX pthread. After merging, PR #1918 will be more simpler.

IRGen: add support for DLL Storage semantics (https://github.com/apple/swift/pull/2080)

-- I think this is the most important topic for Windows/MSVC porting, but not Cygwin port.

Issues in Mailing list

----------------------

Subject: "swift (ABI) and Windows" in https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/subject.html and https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160411/subject.html

Subject: "long double usage in swift" in https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160321/subject.html

My Repo for Patch

-----------------

Repository: https://github.com/tinysun212/swift-windows/tree/upstream-with-windows
binary for MSVC: https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418
binary for Cygwin: https://github.com/tinysun212/swift-windows-bin/tree/master/swift-cygwin

Help

----

If you are also interested in Cygwin port, it is also very helpful to verify/check the build manual (it is placed at /BUILD-CYGWIN-64.md in root of my repo), so that we make a PR for master, and everyone build the Cygwin port without my forked repo.

For building MSVC port, it will be better waiting several days until I prepare a draft build manual - current build description is too dirty (/misc/Build_msvc.txt).

If you once run the compilers, you can see they are lack compared to Linux or OS X.

All of that is only on swift port. For swift-lldb, swift-corelibs-foundation, swift-corelibs-libdispatch, I have not touched at all.

Han Sangjin

2016-04-22 8:20 GMT+09:00 Joel Van Eenwyk <joel.vaneenwyk@gmail.com <mailto:joel.vaneenwyk@gmail.com>>:

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these changes? I'd love to be able to test this out and contribute if you think that could help you out. I can get started on testing what you have now as soon as tomorrow.

Cheers,

--Joel

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no well documented information about that. Instead I'll give you some information and several links for you.

1. Cygwin port

  Cygwin is a POSIX environment on Windows. Porting to Cygwin is relatively easer than Windows native. This is x86_64-unknown-windows-cygwin in llvm target name.

  Currently, you can build the swift compiler and standard library if you applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the autolink-extract module, passing failed test code, etc.

2. Window port

  This is x86_64-pc-windows-msvc in llvm target name, so I call this 'Windows with MSVC library' when confusing with Cygwin - Windows with Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses C++11 standard with some POSIX functions, GNU extension functions as well as platform specific codes for OS X or Linux, and the build script for Swift supposed to run on BASH shell. To compile the Swift source, we should use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com <mailto:gribozavr@gmail.com>>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev >> <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to contribute to
> the project. I can happily work with the Linux port of the project, but I
> have a lot of Windows development experience and would probably be most
> useful there. Where can I find information about the current status of a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company I work
> for (Havok) recently got acquired by Microsoft. Working on some open source
> projects is just something I'm interested in exploring in my free time.
>
> All the best,
>
> --Joel
>

> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org <mailto:swift-dev@swift.org>
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com <mailto:gribozavr@gmail.com>>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev_______________________________________________

swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


(Han Sang-jin) #13

Hi, Joel.

These are procedures to build the Swift compiler/library in Cygwin and in
Windows (MSVC). It has some interim workaround to resolve problems.

I think you will take time to build these. If you failed at some steps or
have any questions, let me know them.

https://github.com/tinysun212/swift-windows/blob/swift-msvc-20160428/BUILD-WINDOWS.md

https://github.com/tinysun212/swift-windows/blob/swift-cygwin-20160428/BUILD-CYGWIN-64.md

- Han Sanjign

···

2016-04-28 11:55 GMT+09:00 Erica Sadun <erica@ericasadun.com>:

Please whoever is doing the windows port, please drop me an email and let
me know how things are going, what challenges you're facing etc. I'd like
to get you a little publicity. (Also happy to write about any other
dev-specific challenges for the language, not just Windows.)

Cheers, -- Erica

On Apr 27, 2016, at 6:25 PM, Han via swift-dev <swift-dev@swift.org> > wrote:

I was busy. Before cleaning build procedure, I merged recent snapshot, and
resolving conflict, followed up some bug, modified and checked Cygwin
build. Now in cleaning build procedure for MSVC, I decided to change the
cmake generator to Ninja from MSBuild - it is more faster when recompiling.

It will be finished in soon. But don't expect too much, ... you should use
hexa editor to build the static library.

- Han Sangjin

2016. 4. 28. 6:09 Joel Van Eenwyk <joel.vaneenwyk@gmail.com> :

Hi Han,

I’ve synced and ready to help out on this.

“For building MSVC port, it will be better waiting several days until I
prepare a draft build manual - current build description is too dirty (/
misc/Build_msvc.txt).‚ÄĚ

Any updates on this?

--Joel

*From:* Shawn Erickson [mailto:shawnce@gmail.com]
*Sent:* Friday, April 22, 2016 8:27 AM
*To:* Sangjin Han <tinysun.net@gmail.com>; Joel Van Eenwyk <
joel.vaneenwyk@gmail.com>
*Cc:* swift-dev <swift-dev@swift.org>
*Subject:* Re: [swift-dev] Swift port to Windows : Offering help!

Trying to get back on PR1950 today.. fighting to get things building again
after a recent update-checkout.

-Shawn

On Thu, Apr 21, 2016 at 7:18 PM Sangjin Han via swift-dev < > swift-dev@swift.org> wrote:

Hi Joel,

I list some URLs.

Bug/Feature report in http://bugs.swift.org

-------------------------------------------

SR-34 Port Swift to Windows (https://bugs.swift.org/browse/SR-34)

SR-612 In Cygwin port, print() crashed at hook (
https://bugs.swift.org/browse/SR-612)

SR-1128 autolink extraction does not work on Cygwin (
https://bugs.swift.org/browse/SR-1128)

SR-1131 Build script for MSVC on Windows (
https://bugs.swift.org/browse/SR-1131)

Pull Requsts in http://github.com/apple/swift

---------------------------------------------

[stdlib/msvc] Runtime with MSVC library (
https://github.com/apple/swift/pull/1918)

-- Currently working on. Waiting passing PR #1950.

[swiftc/msvc] Compiling with MSVC library (
https://github.com/apple/swift/pull/1516)

-- Waiting some more opinions or reviews.

[runtime] enhanced and refactored recently added Mutex abstraction (
https://github.com/apple/swift/pull/1950)

-- This is not about porting, but it enhances portability by removing
POSIX pthread. After merging, PR #1918 will be more simpler.

IRGen: add support for DLL Storage semantics (
https://github.com/apple/swift/pull/2080)

-- I think this is the most important topic for Windows/MSVC porting, but
not Cygwin port.

Issues in Mailing list

----------------------

Subject: "swift (ABI) and Windows" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/subject.html
and
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160411/subject.html

Subject: "long double usage in swift" in
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160321/subject.html

My Repo for Patch

-----------------

Repository:
https://github.com/tinysun212/swift-windows/tree/upstream-with-windows

binary for MSVC:
https://github.com/tinysun212/swift-windows/releases/tag/swift-msvc-20160418

binary for Cygwin:
https://github.com/tinysun212/swift-windows-bin/tree/master/swift-cygwin

Help

----

If you are also interested in Cygwin port, it is also very helpful to
verify/check the build manual (it is placed at /BUILD-CYGWIN-64.md in root
of my repo), so that we make a PR for master, and everyone build the Cygwin
port without my forked repo.

For building MSVC port, it will be better waiting several days until I
prepare a draft build manual - current build description is too dirty
(/misc/Build_msvc.txt).

If you once run the compilers, you can see they are lack compared to Linux
or OS X.

All of that is only on swift port. For swift-lldb,
swift-corelibs-foundation, swift-corelibs-libdispatch, I have not touched
at all.

Han Sangjin

2016-04-22 8:20 GMT+09:00 Joel Van Eenwyk <joel.vaneenwyk@gmail.com>:

Hi Han,

Thanks for the details! Do you have a custom fork or branch with these
changes? I'd love to be able to test this out and contribute if you think
that could help you out. I can get started on testing what you have now as
soon as tomorrow.

Cheers,

--Joel

On Thu, Apr 21, 2016 at 4:15 PM, Sangjin Han via swift-dev < > swift-dev@swift.org> wrote:

I'm writing code for Windows/Cygwin port on my free time. There is no well
documented information about that. Instead I'll give you some information
and several links for you.

1. Cygwin port

  Cygwin is a POSIX environment on Windows. Porting to Cygwin is
relatively easer than Windows native. This is x86_64-unknown-windows-cygwin
in llvm target name.

  Currently, you can build the swift compiler and standard library if you
applying my 'informal' hacked patch and build manual.

  To-be tasks are verifying and sharing the build manual, porting the
autolink-extract module, passing failed test code, etc.

2. Window port

  This is x86_64-pc-windows-msvc in llvm target name, so I call this
'Windows with MSVC library' when confusing with Cygwin - Windows with
Cygwin DLL. Porting to Windows is harder than Cygwin. Swift source uses
C++11 standard with some POSIX functions, GNU extension functions as well
as platform specific codes for OS X or Linux, and the build script for
Swift supposed to run on BASH shell. To compile the Swift source, we should
use the Clang compiler for clang specific feature.

  Currently, there is a 'informal' compiler that barely compiles
Hello.swift.

  To-be tasks are the solving problems, dllimport/dllexport problem for
DLL, build script problem, plus all tasks of Cygwin's.

I'll give you related links in next post.

Han Sangjin

2016-04-22 3:29 GMT+09:00 Dmitri Gribenko <gribozavr@gmail.com>:

CC'ing Han, the maintainer of the Cygwin port.

On Wed, Apr 20, 2016 at 10:59 PM, Joel Van Eenwyk via swift-dev > <swift-dev@swift.org> wrote:
> Hi all,
>
> I'm a very new user of Swift and interested in finding ways to
contribute to
> the project. I can happily work with the Linux port of the project, but I
> have a lot of Windows development experience and would probably be most
> useful there. Where can I find information about the current status of a
> Windows port (if any)? Perhaps I'm blind but finding any 'official'
> information about a Windows version has been quite tricky. :slight_smile:
>
> For background on me, I'm primarily a game programmer and the company I
work
> for (Havok) recently got acquired by Microsoft. Working on some open
source
> projects is just something I'm interested in exploring in my free time.
>
> All the best,
>
> --Joel
>

> _______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev