Live data from Hacker News

Clang Is Now Used to Build Chrome for Windows

blog.llvm.org

81–90 of 105 posts

Re: Clang Is Now Used to Build Chrome for Windows

#81
post #80
post #78

Earlier quoted context omitted.

They have officially abandoned Clang/C2. https://blogs.msdn.microsoft.com/vcblog/2017/05/10/c17-featu...

if a comment on a blog post counts as official

Do you know who Andrew Pardoe is?

It is as official as Google and Apple devs doing blog posts on Medium.

Re: Clang Is Now Used to Build Chrome for Windows

#82
post #79
post #77

Earlier quoted context omitted.

They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++. > We do not plan to support ISO C features that are not part of either C90 or ISO C++. https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... All the updates regarding C99 and C11 in Visual C++ are related to ANSI/ISO C++ requirements regarding C compatibility, as Herb states. Regarding legacy, Visua…

Microsoft backpedaled not longer afterwards. See, e.g., https://blogs.msdn.microsoft.com/vcblog/2013/06/28/c1114-stl... and https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-libra... They even added C99 compound literals and designated initializers: https://msdn.microsoft.com/en-us/library/hh409293(v=vs.120).... Compound literals could never be added to C++ because the syntax and semantics conflict with existing…

[deleted]

Re: Clang Is Now Used to Build Chrome for Windows

#83
post #79
post #77

Earlier quoted context omitted.

They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++. > We do not plan to support ISO C features that are not part of either C90 or ISO C++. https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... All the updates regarding C99 and C11 in Visual C++ are related to ANSI/ISO C++ requirements regarding C compatibility, as Herb states. Regarding legacy, Visua…

Microsoft backpedaled not longer afterwards. See, e.g., https://blogs.msdn.microsoft.com/vcblog/2013/06/28/c1114-stl... and https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-libra... They even added C99 compound literals and designated initializers: https://msdn.microsoft.com/en-us/library/hh409293(v=vs.120).... Compound literals could never be added to C++ because the syntax and semantics conflict with existing…

C99 and C11 library support is required by ANSI/ISO C++.

As for the minor language changes, there was a blog post that I cannot locate now, stating it was to the extent required for porting well known projects to Windows, the remaining features would depend on key customers feedback.

Re: Clang Is Now Used to Build Chrome for Windows

#84
post #74

Earlier quoted context omitted.

> edited to add: to be fair, it's not ABI compatible with MSVC. But it deserves a mention and it's an easier option than MSVC-style build systems for many open source projects. Pretty sure this is significant in Chrome's case.

Why, though? What does Chrome do that calls into C++ code compiled by anyone but Google?

on Windows the native ABI (or the default ABI I should say) explicitly reserves space for C++ stack unwinding on a per call basis.

A lot of the windows API can (ab)use this so it’s best to follow it, despite it being C (ish).

Re: Clang Is Now Used to Build Chrome for Windows

#85
post #77
post #53

With Microsoft producing MSVC/C2 compiler with Clang frontend, I am surprised they did not abandon the MSVC at all - they have a hard times even at supporting C99, not to mention modern C++ technologies. And all those tools and plugins built around Clang/LLVM. MSVC is a legacy of XX century and should be abandoned for good.

They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++. > We do not plan to support ISO C features that are not part of either C90 or ISO C++. https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... All the updates regarding C99 and C11 in Visual C++ are related to ANSI/ISO C++ requirements regarding C compatibility, as Herb states. Regarding legacy, Visua…

> They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++.

If that's the case then Microsoft should get its corporate ass out of C's standardization committee. It makes no sense to waste their time forcing requirements onto a standard that they refuse to comply with.

Re: Clang Is Now Used to Build Chrome for Windows

#86
post #32

Earlier quoted context omitted.

mingw-w64 llvm maintainer/developer here. Over the past 2-3 years, with great help from a few other LLVM devs I have slowly pushed for native clang support for mingw-w64. With the current in tree HEAD you can now build and bootstrap mingw-w64 with a llvm-only toolchain (no binutils or gcc, thus no disregard of the PECOFF SPEC) The stack is as follows. LLVM+CLANG+LLD+COMPILER-RT+LIBCXX+LIBCXXABI+LIBUNWIND+MINGW-W64. T…

Great work! We with Nixpkgs/NixOS have over the past year overhauled cross compilation, culminating recently with a bunch of parallel efforts recently including Windows cross compilation. People have built Nix with cygwin in the past, it would be nice to get it working in MSYS2/mingw-w64 too.

Are you targeting Linux, building on Windows?

Re: Clang Is Now Used to Build Chrome for Windows

#87
post #77

Earlier quoted context omitted.

They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++. > We do not plan to support ISO C features that are not part of either C90 or ISO C++. https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... All the updates regarding C99 and C11 in Visual C++ are related to ANSI/ISO C++ requirements regarding C compatibility, as Herb states. Regarding legacy, Visua…

> They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++. If that's the case then Microsoft should get its corporate ass out of C's standardization committee. It makes no sense to waste their time forcing requirements onto a standard that they refuse to comply with.

They don't have anyone on JTC1/SC22/WG14, where did you imagine that?

Re: Clang Is Now Used to Build Chrome for Windows

#88
post #77

Earlier quoted context omitted.

They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++. > We do not plan to support ISO C features that are not part of either C90 or ISO C++. https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... All the updates regarding C99 and C11 in Visual C++ are related to ANSI/ISO C++ requirements regarding C compatibility, as Herb states. Regarding legacy, Visua…

> They don't have any hard time supporting C99, from Microsoft point of view C is done, time to move on to C++. If that's the case then Microsoft should get its corporate ass out of C's standardization committee. It makes no sense to waste their time forcing requirements onto a standard that they refuse to comply with.

I’m sure you won’t like this comment, but doesn’t Microsoft have a vested interest in keeping C as unchanged as possible? If C were to run away in unorthodox directions, that would hurt compatibility with C++ and hence Visual Studio. So from their perspective it may make perfect sense to stay on the committee to keep it as conservative as possible. Why voluntarily give up soft power?

Re: Clang Is Now Used to Build Chrome for Windows

#89
post #74

Earlier quoted context omitted.

> edited to add: to be fair, it's not ABI compatible with MSVC. But it deserves a mention and it's an easier option than MSVC-style build systems for many open source projects. Pretty sure this is significant in Chrome's case.

Why, though? What does Chrome do that calls into C++ code compiled by anyone but Google?

File dialogs (to save/load web pages, to upload files), print support, TCP sockets… all of these involve calling into system code.
Post reply on HN