Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl exclusively on Windows

2024-05-08 Thread Alex Christensen via webkit-dev
Herb, if you run “git log --grep MSVC” in a git checkout of WebKit, you’ll find 
many quirks we’ve done in our code to get it to compile with MSVC.  Here are 
some of the most recent ones:

https://commits.webkit.org/272595@main
https://commits.webkit.org/271031@main
Some warning differences in https://commits.webkit.org/276799@main and 
https://commits.webkit.org/277563@main
The COMPILER(MSVC) addition necessary in https://commits.webkit.org/265366@main 
puzzled me a lot for a while, but I stopped looking into it.

And many more.  I don’t have a strong opinion about WebKit’s use of MSVC, but 
WebKit is certainly a wealth of real-world code that has worked around compiler 
differences over the last few decades that could be analyzed by the MSVC team 
if you’re interested.

> On May 2, 2024, at 3:49 PM, Olmstead, Don via webkit-dev 
>  wrote:
> 
> Hey Herb,
>  
> Not everyone whose embedding WebKit on Windows announces to us that they’re 
> using it so unsure if someone is still compiling using MSVC. All the 
> documentation we have points to clang-cl being the preferred way. The ones we 
> know of Bun, https://bun.sh/ , and Playwright, https://playwright.dev/ , have 
> switched to clang-cl.
>  
> I was personally keeping the dream alive and would compile out WebKit with 
> MSVC. WebKit on Windows doesn’t have the highest tier JITs because we don’t 
> have anyone working on it for Windows and the maintenance costs around MSVC 
> are centered around that. If MSVC had the functionality that helps the JSC 
> folks make the VM run fast we wouldn’t be in this situation. If that 
> functionality is added to the roadmap then we’d definitely reconsider at that 
> time.
>  
> Don
>  
> From: Herb Sutter  
> Sent: Thursday, May 2, 2024 1:28 PM
> To: Olmstead, Don ; 'Jean-Yves Avenard' 
> 
> Cc: 'WebKit-Dev Development' 
> Subject: RE: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
> exclusively on Windows
>  
> Thank you, Jean-Yves and Don!
>  
> One followup: I don’t know WebKit well but was surprised that it was being 
> built with MSVC, and Yusuke mentioned Windows projects that build with 
> clang-cl instead. Are there known users/products who are building with WebKit 
> that are important not to break, so that we (Microsoft) should be thinking 
> about doing work so you can keep using MSVC, or is this really an unused 
> configuration that it makes sense to just drop?
>  
> Herb
>  
>  
> From: Olmstead, Don mailto:don.olmst...@sony.com>>
> Sent: Thursday, May 2, 2024 12:06 PM
> To: Jean-Yves Avenard  <mailto:jean-yves.aven...@apple.com>>; Herb Sutter  <mailto:herb.sut...@gmail.com>>
> Cc: WebKit-Dev Development (webkit-dev@lists.webkit.org 
> <mailto:webkit-dev@lists.webkit.org>)  <mailto:webkit-dev@lists.webkit.org>>
> Subject: RE: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
> exclusively on Windows
>  
> Hi Herb
>  
> If you grep around the WebKit codebase for COMPILER(MSVC) there are a number 
> of workarounds hanging out. Some may have been fixed over time but the 
> workaround wasn’t removed.
>  
> Biggest issue was around the JIT and some other low level features the JSC 
> folks utilize that isn’t present in MSVC. The lion’s share of JSC development 
> is done using Clang and those working on it don’t have a Windows box handy so 
> we have seen the JIT break on Windows. Yusuke I’m sure has a list of feature 
> requests that would improve the quality of MSVC for people developing VMs.
>  
> MSVC has definitely caught some issues in the code and compiler mono-culture 
> isn’t great but realistically we don’t have the resources to keep MSVC up and 
> running.
>  
> Regards,
> Don
>  
> From: Jean-Yves Avenard via webkit-dev  <mailto:webkit-dev@lists.webkit.org>>
> Sent: Wednesday, May 1, 2024 5:10 PM
> To: Herb Sutter mailto:herb.sut...@gmail.com>>
> Cc: Webkit Development List  <mailto:webkit-dev@lists.webkit.org>>
> Subject: Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
> exclusively on Windows
>  
> Hi
>  
> 
> On 2 May 2024, at 10:07 am, Herb Sutter via webkit-dev 
> mailto:webkit-dev@lists.webkit.org>> wrote:
>  
>  
> We’ve had full C++20 including concepts for a couple of years so I wasn’t 
> sure what problem you were running into… are you encountering bugs in those 
> features? or you can’t turn on /std:c++20 for some reason? or are you using 
> an older pre-concepts (pre-VS2022 17.0) compiler?
>  
> Thanks for any feedback you have time to share.
>  
> Herb
>  
>  
> We’ve had issues where some use of concepts made the latest MSVC compiler 
> crash
> See https://searchfox.org/wubkat/source

Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl exclusively on Windows

2024-05-02 Thread Olmstead, Don via webkit-dev
Hey Herb,

Not everyone whose embedding WebKit on Windows announces to us that they’re 
using it so unsure if someone is still compiling using MSVC. All the 
documentation we have points to clang-cl being the preferred way. The ones we 
know of Bun, https://bun.sh/ , and Playwright, https://playwright.dev/ , have 
switched to clang-cl.

I was personally keeping the dream alive and would compile out WebKit with 
MSVC. WebKit on Windows doesn’t have the highest tier JITs because we don’t 
have anyone working on it for Windows and the maintenance costs around MSVC are 
centered around that. If MSVC had the functionality that helps the JSC folks 
make the VM run fast we wouldn’t be in this situation. If that functionality is 
added to the roadmap then we’d definitely reconsider at that time.

Don

From: Herb Sutter 
Sent: Thursday, May 2, 2024 1:28 PM
To: Olmstead, Don ; 'Jean-Yves Avenard' 

Cc: 'WebKit-Dev Development' 
Subject: RE: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
exclusively on Windows

Thank you, Jean-Yves and Don!

One followup: I don’t know WebKit well but was surprised that it was being 
built with MSVC, and Yusuke mentioned Windows projects that build with clang-cl 
instead. Are there known users/products who are building with WebKit that are 
important not to break, so that we (Microsoft) should be thinking about doing 
work so you can keep using MSVC, or is this really an unused configuration that 
it makes sense to just drop?

Herb


From: Olmstead, Don mailto:don.olmst...@sony.com>>
Sent: Thursday, May 2, 2024 12:06 PM
To: Jean-Yves Avenard 
mailto:jean-yves.aven...@apple.com>>; Herb Sutter 
mailto:herb.sut...@gmail.com>>
Cc: WebKit-Dev Development 
(webkit-dev@lists.webkit.org<mailto:webkit-dev@lists.webkit.org>) 
mailto:webkit-dev@lists.webkit.org>>
Subject: RE: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
exclusively on Windows

Hi Herb

If you grep around the WebKit codebase for COMPILER(MSVC) there are a number of 
workarounds hanging out. Some may have been fixed over time but the workaround 
wasn’t removed.

Biggest issue was around the JIT and some other low level features the JSC 
folks utilize that isn’t present in MSVC. The lion’s share of JSC development 
is done using Clang and those working on it don’t have a Windows box handy so 
we have seen the JIT break on Windows. Yusuke I’m sure has a list of feature 
requests that would improve the quality of MSVC for people developing VMs.

MSVC has definitely caught some issues in the code and compiler mono-culture 
isn’t great but realistically we don’t have the resources to keep MSVC up and 
running.

Regards,
Don

From: Jean-Yves Avenard via webkit-dev 
mailto:webkit-dev@lists.webkit.org>>
Sent: Wednesday, May 1, 2024 5:10 PM
To: Herb Sutter mailto:herb.sut...@gmail.com>>
Cc: Webkit Development List 
mailto:webkit-dev@lists.webkit.org>>
Subject: Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
exclusively on Windows

Hi

On 2 May 2024, at 10:07 am, Herb Sutter via webkit-dev 
mailto:webkit-dev@lists.webkit.org>> wrote:


We’ve had full C++20 including concepts for a couple of years so I wasn’t sure 
what problem you were running into… are you encountering bugs in those 
features? or you can’t turn on /std:c++20 for some reason? or are you using an 
older pre-concepts (pre-VS2022 17.0) compiler?

Thanks for any feedback you have time to share.

Herb


We’ve had issues where some use of concepts made the latest MSVC compiler crash
See 
https://searchfox.org/wubkat/source/Source/WTF/wtf/TypeTraits.h#145-172<https://searchfox.org/wubkat/source/Source/WTF/wtf/TypeTraits.h#145-172>

See 
https://bugs.webkit.org/show_bug.cgi?id=261598<https://bugs.webkit.org/show_bug.cgi?id=261598>

Jean-Yves
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl exclusively on Windows

2024-05-02 Thread Fujii Hironori via webkit-dev
On Fri, May 3, 2024 at 5:28 AM Herb Sutter via webkit-dev <
webkit-dev@lists.webkit.org> wrote:

> One followup: I don’t know WebKit well but was surprised that it was being
> built with MSVC, and Yusuke mentioned Windows projects that build with
> clang-cl instead. Are there known users/products who are building with
> WebKit that are important not to break, so that we (Microsoft) should be
> thinking about doing work so you can keep using MSVC, or is this really an
> unused configuration that it makes sense to just drop?
>

As far as I know, projects publicly distributing Windows WebKit and
JavaScriptCore are only Microsoft Playwright and Bun.
As Yusuke mentioned, they already switched to clang-cl.

> 4. Major third-parties using Windows WebKit (e.g. Bun.js, praywright
etc.) are using clang-cl, not MSVC.

Other browser engines, Chrome and Firefox, already switched to Clang. You
might be interested in their blogs.

Clang is now used to build Chrome for Windows - The LLVM Project Blog
https://blog.llvm.org/2018/03/clang-is-now-used-to-build-chrome-for.html

Building Firefox on Windows with clang-cl | Home Page
https://ehsanakhgari.org/blog/2014-06-26/building-firefox-on-windows-with-clang-cl/

an unexpected benefit of standardizing on clang-cl | Nathan's Blog
https://blog.mozilla.org/nfroyd/2019/04/25/an-unexpected-benefit-of-standardizing-on-clang-cl/

For someone worrying about compiler monoculture, it seems that some
QtWebKit users are using GCC (MinGW) on Windows.
https://github.com/qtwebkit/qtwebkit/issues/1102
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl exclusively on Windows

2024-05-02 Thread Herb Sutter via webkit-dev
Thank you, Jean-Yves and Don!

 

One followup: I don’t know WebKit well but was surprised that it was being 
built with MSVC, and Yusuke mentioned Windows projects that build with clang-cl 
instead. Are there known users/products who are building with WebKit that are 
important not to break, so that we (Microsoft) should be thinking about doing 
work so you can keep using MSVC, or is this really an unused configuration that 
it makes sense to just drop?

 

Herb

 

 

From: Olmstead, Don  
Sent: Thursday, May 2, 2024 12:06 PM
To: Jean-Yves Avenard ; Herb Sutter 

Cc: WebKit-Dev Development (webkit-dev@lists.webkit.org) 

Subject: RE: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
exclusively on Windows

 

Hi Herb

 

If you grep around the WebKit codebase for COMPILER(MSVC) there are a number of 
workarounds hanging out. Some may have been fixed over time but the workaround 
wasn’t removed.

 

Biggest issue was around the JIT and some other low level features the JSC 
folks utilize that isn’t present in MSVC. The lion’s share of JSC development 
is done using Clang and those working on it don’t have a Windows box handy so 
we have seen the JIT break on Windows. Yusuke I’m sure has a list of feature 
requests that would improve the quality of MSVC for people developing VMs.

 

MSVC has definitely caught some issues in the code and compiler mono-culture 
isn’t great but realistically we don’t have the resources to keep MSVC up and 
running.

 

Regards,

Don

 

From: Jean-Yves Avenard via webkit-dev mailto:webkit-dev@lists.webkit.org> > 
Sent: Wednesday, May 1, 2024 5:10 PM
To: Herb Sutter mailto:herb.sut...@gmail.com> >
Cc: Webkit Development List 
Subject: Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
exclusively on Windows

 

Hi

 

On 2 May 2024, at 10:07 am, Herb Sutter via webkit-dev 
mailto:webkit-dev@lists.webkit.org> > wrote:

 

 

We’ve had full C++20 including concepts for a couple of years so I wasn’t sure 
what problem you were running into… are you encountering bugs in those 
features? or you can’t turn on /std:c++20 for some reason? or are you using an 
older pre-concepts (pre-VS2022 17.0) compiler?

 

Thanks for any feedback you have time to share.

 

Herb

 

 

We’ve had issues where some use of concepts made the latest MSVC compiler crash

See https://searchfox.org/wubkat/source/Source/WTF/wtf/TypeTraits.h#145-172

 

See https://bugs.webkit.org/show_bug.cgi?id=261598

 

Jean-Yves

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


Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl exclusively on Windows

2024-05-02 Thread Olmstead, Don via webkit-dev
Hi Herb

If you grep around the WebKit codebase for COMPILER(MSVC) there are a number of 
workarounds hanging out. Some may have been fixed over time but the workaround 
wasn’t removed.

Biggest issue was around the JIT and some other low level features the JSC 
folks utilize that isn’t present in MSVC. The lion’s share of JSC development 
is done using Clang and those working on it don’t have a Windows box handy so 
we have seen the JIT break on Windows. Yusuke I’m sure has a list of feature 
requests that would improve the quality of MSVC for people developing VMs.

MSVC has definitely caught some issues in the code and compiler mono-culture 
isn’t great but realistically we don’t have the resources to keep MSVC up and 
running.

Regards,
Don

From: Jean-Yves Avenard via webkit-dev 
Sent: Wednesday, May 1, 2024 5:10 PM
To: Herb Sutter 
Cc: Webkit Development List 
Subject: Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl 
exclusively on Windows

Hi


On 2 May 2024, at 10:07 am, Herb Sutter via webkit-dev 
mailto:webkit-dev@lists.webkit.org>> wrote:


We’ve had full C++20 including concepts for a couple of years so I wasn’t sure 
what problem you were running into… are you encountering bugs in those 
features? or you can’t turn on /std:c++20 for some reason? or are you using an 
older pre-concepts (pre-VS2022 17.0) compiler?

Thanks for any feedback you have time to share.

Herb


We’ve had issues where some use of concepts made the latest MSVC compiler crash
See 
https://searchfox.org/wubkat/source/Source/WTF/wtf/TypeTraits.h#145-172<https://searchfox.org/wubkat/source/Source/WTF/wtf/TypeTraits.h#145-172>

See 
https://bugs.webkit.org/show_bug.cgi?id=261598<https://bugs.webkit.org/show_bug.cgi?id=261598>

Jean-Yves
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl exclusively on Windows

2024-05-01 Thread Jean-Yves Avenard via webkit-dev
Hi

> On 2 May 2024, at 10:07 am, Herb Sutter via webkit-dev 
>  wrote:
> 
>  
> We’ve had full C++20 including concepts for a couple of years so I wasn’t 
> sure what problem you were running into… are you encountering bugs in those 
> features? or you can’t turn on /std:c++20 for some reason? or are you using 
> an older pre-concepts (pre-VS2022 17.0) compiler?
>  
> Thanks for any feedback you have time to share.
>  
> Herb
> 

We’ve had issues where some use of concepts made the latest MSVC compiler crash
See https://searchfox.org/wubkat/source/Source/WTF/wtf/TypeTraits.h#145-172

See https://bugs.webkit.org/show_bug.cgi?id=261598

Jean-Yves___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Proposal: Dropping MSVC support and use clang-cl exclusively on Windows

2024-04-30 Thread Keith Miller via webkit-dev
+1 

Cheers,
Keith

> On Apr 30, 2024, at 10:06 AM, Yusuke Suzuki via webkit-dev 
>  wrote:
> 
> Hello WebKittens!
> 
> Right now, MSVC support is putting significant burden on JavaScriptCore. It 
> lacks many features for JSC development,
> as a result, we have so many workarounds for MSVC in JavaScriptCore (For 
> example, LLInt CLoop 16-bit opcode is disabled only for MSVC since MSVC 
> cannot compile it reasonably).
> 
> I talked with JSC team and Don at Sony, and now I would like to propose 
> dropping MSVC support on Windows port and using clang-cl exclusively on 
> Windows.
> 
> There are many motivating factors for this change.
> 
> 1. Post-commit testing bots (WinCairo) are using clang-cl. So literally, 
> there is zero test coverage on MSVC build right now.
> 2. On the other hand, EWS is using MSVC for build test. This discrepancy is 
> making maintenance of Windows ports harder and harder.
> 3. MSVC has various compilation issues which makes JSC lesser quality. Lack 
> of `__builtin_frame_address` support makes JSC bloating JIT code much. 
> CheckedArith has bunch of special code due to lack of overflow-detecting 
> `__builtin_add_overflow` like operations, and so on.  (but TBH, given there 
> is zero coverage, we even don't know whether it is working right now!)
> 4. Major third-parties using Windows WebKit (e.g. Bun.js, praywright etc.) 
> are using clang-cl, not MSVC.
> 
> Not only solving existing issues, using clang-cl opens significant code / 
> implementation quality improvements opportunities for Windows.
> 
> 1. MSVC does not support various C++20 features, so it is putting our C++20 
> adoption much behind (For example, we cannot use  concept). By using 
> clang-cl, we can start much newer set of C++20 features, improving code 
> quality, static checks etc.
> 2. This paves a way to make Windows JSC implementation super solid. clang-cl 
> offers sysv-abi feature for function attributes. This allows using Linux / 
> macOS amd64 ABI on certain annotated functions. This basically means that we 
> potentially unify our interpreter and JIT implementations completely in Linux 
> / macOS / Windows for x64, (which makes our LLInt / Wasm LLInt on Windows 
> super solid, plus, it paves a way to fully enable all JIT tiers on Windows 
> including FTL).
> 
> We already discussed with Don and we agreed on this.
> And now I would like to formally propose MSVC deprecation towards more 
> cleaner and solid Windows port.
> 
> Best regards,
> -Yusuke Suzuki
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

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