Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Gervase Markham
On 08/09/16 16:08, Lars Bergstrom wrote:
> That said, I know that there are a few benefits on the mingw side:

(4) Build Servo on Windows using only free software?

(Or is that not true?)

Gerv
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


[dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Lars Bergstrom
Now that Vlad has landed the amazing support for compiling with Visual
C++ instead of the mingw gcc toolchain, I'd like to propose that we
remove mingw from our automation, documentation, and support. There
are a few reasons:
1) Python is a total crazy mess. Users get messed up with the three
(3) different pythons installed, and we even have to ask them to
globally rename one of them.
2) Tracking mingw versions is pretty rough. The recent gcc update ICEs
in spidermonkey. They keep adding / removing / changing their launch
shortcuts, bitrotting our documentation.
3) Packaging. Figuring out which set of curiously-licenesed DLLs we
need to package up in our Windows installer is a challenge (much
easier in the MSVC case b/c we can merge in the usual MSM or point at
a different MSI & check for the installed product).

That said, I know that there are a few benefits on the mingw side:
1) Better gcc.
2) Contributors to the build / automation stuff can "fake it until
they make it" and hope that the macOS/Linux scripts they write just
happen to work on Windows in mingw.
3) Somebody might have a real mingw {something} that wants to include
Servo bits, and if we aren't testing mingw, it will almost definitely
break in the future.

Do people have opinions one way or another on this? I'm not dead-set
on removing it, and could definitely be convinced to just switch the
default to MSVC and hide the mingw documentation but keep testing it
if there are compelling reasons to do so.
- Lars
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Jack Moffitt
> Do people have opinions one way or another on this? I'm not dead-set
> on removing it, and could definitely be convinced to just switch the
> default to MSVC and hide the mingw documentation but keep testing it
> if there are compelling reasons to do so.

I'm in favor of removing it, but don't we still need at least msys to
build? Or has this work progressed to the point where we can just use
cmd.exe + official windows python?

jack.
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Nathan Froyd
On Thu, Sep 8, 2016 at 11:11 AM, Gervase Markham  wrote:
> On 08/09/16 16:08, Lars Bergstrom wrote:
>> That said, I know that there are a few benefits on the mingw side:
> 
> (4) Build Servo on Windows using only free software?

At least for the compiler side of the MSVC build, you can use clang-cl
instead; I don't know whether you can do code-signing, generating
installers, etc. etc. with free software.

-Nathan
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Nick Fitzgerald
It would be nice to do one less set of bindings to need to generate when
doing a smup.

On Thu, Sep 8, 2016 at 8:08 AM, Lars Bergstrom  wrote:

> Now that Vlad has landed the amazing support for compiling with Visual
> C++ instead of the mingw gcc toolchain, I'd like to propose that we
> remove mingw from our automation, documentation, and support. There
> are a few reasons:
> 1) Python is a total crazy mess. Users get messed up with the three
> (3) different pythons installed, and we even have to ask them to
> globally rename one of them.
> 2) Tracking mingw versions is pretty rough. The recent gcc update ICEs
> in spidermonkey. They keep adding / removing / changing their launch
> shortcuts, bitrotting our documentation.
> 3) Packaging. Figuring out which set of curiously-licenesed DLLs we
> need to package up in our Windows installer is a challenge (much
> easier in the MSVC case b/c we can merge in the usual MSM or point at
> a different MSI & check for the installed product).
>
> That said, I know that there are a few benefits on the mingw side:
> 1) Better gcc.
> 2) Contributors to the build / automation stuff can "fake it until
> they make it" and hope that the macOS/Linux scripts they write just
> happen to work on Windows in mingw.
> 3) Somebody might have a real mingw {something} that wants to include
> Servo bits, and if we aren't testing mingw, it will almost definitely
> break in the future.
>
> Do people have opinions one way or another on this? I'm not dead-set
> on removing it, and could definitely be convinced to just switch the
> default to MSVC and hide the mingw documentation but keep testing it
> if there are compelling reasons to do so.
> - Lars
> ___
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
>
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Gregory Szorc
On Thu, Sep 8, 2016 at 8:40 AM, Nathan Froyd  wrote:

> On Thu, Sep 8, 2016 at 11:11 AM, Gervase Markham  wrote:
> > On 08/09/16 16:08, Lars Bergstrom wrote:
> >> That said, I know that there are a few benefits on the mingw side:
> > 
> > (4) Build Servo on Windows using only free software?
>
> At least for the compiler side of the MSVC build, you can use clang-cl
> instead; I don't know whether you can do code-signing, generating
> installers, etc. etc. with free software.
>

I would favor going the Clang route for supporting building with OSS on
Windows. MinGW for better or worse is not just a toolchain: it's a mini
UNIX install on your machine. From my experience, all that extra surface
area just introduces heaps of problems and headaches for build system
maintainers.

Of course, you still require msys2 (a MinGW distribution) to build. But
removing MinGW from the equation is still a win given its complexities.
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Lars Bergstrom
On Thu, Sep 8, 2016 at 11:01 AM, Gregory Szorc  wrote:
>
> I would favor going the Clang route for supporting building with OSS on
> Windows. MinGW for better or worse is not just a toolchain: it's a mini
> UNIX install on your machine. From my experience, all that extra surface
> area just introduces heaps of problems and headaches for build system
> maintainers.

In your opinion, does also building with Clang in Windows "just work?"
Should we add an additional builder configuration? If so, should we
also run (possibly some subset) of the tests on it? I'm generally of
the pessimistic opinion that nothing we tests will continue to work,
but I have zero experience with that codepath.

> Of course, you still require msys2 (a MinGW distribution) to build. But
> removing MinGW from the equation is still a win given its complexities.

Yes, certainly, and Vlad has done a great job of packaging up the
little bit that is required for SpiderMonkey (from mozillabuild.exe)
into something that we can kinda hide from the developer, since the
vast majority of people will never need to tweak that code. TBH, if SM
were available as a prebuilt static lib, we'd probably consider just
using that in the Servo build in order to save a bunch of build time
and avoid the msys2 dependency.
- Lars
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Nick Fitzgerald
On Thu, Sep 8, 2016 at 10:32 AM, Lars Bergstrom 
wrote:

>  TBH, if SM
> were available as a prebuilt static lib, we'd probably consider just
> using that in the Servo build in order to save a bunch of build time
> ​​
> and avoid the msys2 dependency.
>

​This should be possible soon-ish.​

​My understanding is possible now that we don't use NSPR threading anymore,
and can statically link the few bits of NSPR we still use into
spidermonkey, but I don't know the nitty gritty build details. The final
kinks are being straightened out by build folks.
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Gregory Szorc
On Thu, Sep 8, 2016 at 10:32 AM, Lars Bergstrom 
wrote:

> On Thu, Sep 8, 2016 at 11:01 AM, Gregory Szorc  wrote:
> >
> > I would favor going the Clang route for supporting building with OSS on
> > Windows. MinGW for better or worse is not just a toolchain: it's a mini
> > UNIX install on your machine. From my experience, all that extra surface
> > area just introduces heaps of problems and headaches for build system
> > maintainers.
>
> In your opinion, does also building with Clang in Windows "just work?"
> Should we add an additional builder configuration? If so, should we
> also run (possibly some subset) of the tests on it? I'm generally of
> the pessimistic opinion that nothing we tests will continue to work,
> but I have zero experience with that codepath.
>

I can't speak for Servo. For Firefox, my understanding is Clang on Windows
is still a work in progress - bug 752004 tracks. Apparently we passed the
"it builds Firefox" milestone yesterday. That's a bit different from
"gotten it to run correctly." My understanding is ehsan and jrmuizel are
driving efforts. We obviously want to support building with Clang on
Windows so we can get ASAN, TSAN, etc. And if Clang's performance ever
caught up or came near to MSVC's PGO performance, we'd be seriously tempted
to ship a Firefox built with Clang.

While Clang has a path forward on Windows, MinGW does not. I don't see
Firefox formally supporting MinGW as a Tier-1 platform unless there is a
major change that would make it compelling.


>
> > Of course, you still require msys2 (a MinGW distribution) to build. But
> > removing MinGW from the equation is still a win given its complexities.
>
> Yes, certainly, and Vlad has done a great job of packaging up the
> little bit that is required for SpiderMonkey (from mozillabuild.exe)
> into something that we can kinda hide from the developer, since the
> vast majority of people will never need to tweak that code. TBH, if SM
> were available as a prebuilt static lib, we'd probably consider just
> using that in the Servo build in order to save a bunch of build time
> and avoid the msys2 dependency.
>

This is almost certainly doable from the perspective of Firefox's
automation making those bits available as a side-effect of builds. The
bigger question is whether we should support that. If SM and Servo agree to
do things that way, the Firefox build system / automation can make it
happen.

FWIW, the msys2 dependency does add some nice things, like a better
terminal emulator. cmd.exe is still awful. But being able to build in a
cmd.exe terminal without any UNIX ported executables is a huge win for
maintainability. I hope we can get there with Firefox someday.
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Nick Fitzgerald
On Thu, Sep 8, 2016 at 10:55 AM, Gregory Szorc  wrote:

> ​
> This is almost certainly doable from the perspective of Firefox's
> automation making those bits available as a side-effect of builds.



​I think we would want to make SM-tc(pkg) a static build -- it already is
uploading​ the (currently shared) library as an artifact, among other
things.
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Ehsan Akhgari
On 2016-09-08 1:32 PM, Lars Bergstrom wrote:
> On Thu, Sep 8, 2016 at 11:01 AM, Gregory Szorc  wrote:
>>
>> I would favor going the Clang route for supporting building with OSS on
>> Windows. MinGW for better or worse is not just a toolchain: it's a mini
>> UNIX install on your machine. From my experience, all that extra surface
>> area just introduces heaps of problems and headaches for build system
>> maintainers.
> 
> In your opinion, does also building with Clang in Windows "just work?"
> Should we add an additional builder configuration? If so, should we
> also run (possibly some subset) of the tests on it? I'm generally of
> the pessimistic opinion that nothing we tests will continue to work,
> but I have zero experience with that codepath.

clang-cl  which is
clang's MSVC compatible driver aims to be a drop-in replacement for
cl.exe, so in theory if you do the equivalent of export CC=clang-cl
CXX=clang-cl| you should build Servo successfully unless if you run into
clang-cl bugs.  These days clang-cl is mature enough that it may even
work out of the box.

However, especially with larger code bases, there's always going to be
the possibility of something breaking clang-cl builds but not MSVC
builds, so if the goal is to keep clang-cl builds working, you'd want to
do them on the CI.

That all being said, clang-cl actually doesn't enable a free software
toolchain on Windows.  clang-cl relies on an existing MSVC installation
for tools such as the linker, the resource compiler, SDK and MSVCRT head
and libraries, and so on.  While the LLVM project is also working on a
linker replacement (lld), the rest of this toolchain will remain
non-free.  I'm not aware of any ongoing effort on the free toolchain on
Windows problem unfortunately.

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Proposal: remove mingw Servo builds in favor of msvc

2016-09-08 Thread Vladimir Vukicevic
I think we need to separate out being able to build for the pc-windows-gnu 
target vs. using the entire msys2/mingw64 environment.

We need to continue to be able to build for pc-windows-gnu because the 
debugging story with rust+msvc is still not great.  We have the beginnings of 
local variables etc. with the llvm update, but there's still type information 
that needs a lot of work.  With the gnu target, gdb, along with all the python 
rust helpers work.  (Even more fun: we'll want to have msys2 as a better 
supported firefox build target so that we can debug things with gdb there too!)

We *should* be able to make everything work using the native windows python, 
and only that.  mach can make sure that's the one it uses to create its 
virtualenv.  That removes the python issue.  For gcc version, we could (and 
probably should) just switch to clang -- or specify an exact package version 
that are known good.  The dependencies are the same as on other platforms -- 
openssl, etc.

So, I don't think we should kill it off any time soon, but we should switch the 
default to MSVC and limit the amount of msys2 dependencies we have.. but we 
should still be able to build.

- Vlad

On Thursday, September 8, 2016 at 11:08:17 AM UTC-4, Lars Bergstrom wrote:
> Now that Vlad has landed the amazing support for compiling with Visual
> C++ instead of the mingw gcc toolchain, I'd like to propose that we
> remove mingw from our automation, documentation, and support. There
> are a few reasons:
> 1) Python is a total crazy mess. Users get messed up with the three
> (3) different pythons installed, and we even have to ask them to
> globally rename one of them.
> 2) Tracking mingw versions is pretty rough. The recent gcc update ICEs
> in spidermonkey. They keep adding / removing / changing their launch
> shortcuts, bitrotting our documentation.
> 3) Packaging. Figuring out which set of curiously-licenesed DLLs we
> need to package up in our Windows installer is a challenge (much
> easier in the MSVC case b/c we can merge in the usual MSM or point at
> a different MSI & check for the installed product).
> 
> That said, I know that there are a few benefits on the mingw side:
> 1) Better gcc.
> 2) Contributors to the build / automation stuff can "fake it until
> they make it" and hope that the macOS/Linux scripts they write just
> happen to work on Windows in mingw.
> 3) Somebody might have a real mingw {something} that wants to include
> Servo bits, and if we aren't testing mingw, it will almost definitely
> break in the future.
> 
> Do people have opinions one way or another on this? I'm not dead-set
> on removing it, and could definitely be convinced to just switch the
> default to MSVC and hide the mingw documentation but keep testing it
> if there are compelling reasons to do so.
> - Lars

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo