Live data from Hacker News

Clang Is Now Used to Build Chrome for Windows

blog.llvm.org

61–70 of 105 posts

Re: Clang Is Now Used to Build Chrome for Windows

#61

Earlier quoted context omitted.

"it's simple": yep, so much so that you inevitably need a meta-build system. In the context of Chrome, the build system only offers 2 out of 3.

It's by design that you need a meta-build system. Ninja build files were not designed to be written by hand, not even ninja itself has hand written ninja files.

Yes, I understand that it's designed that way.

My point was that, in the context of Chrome using ninja, the claim that "Ninja is used because it's simple, multiplatform and very fast. The mainstream alternatives offer at most 2 out of 3." is a bit odd considering that the decision doesn't seem to be ninja vs mainstream alternatives but rather ninja+gn(or gyp or whatever else) vs alternatives.

Re: Clang Is Now Used to Build Chrome for Windows

#62

Interesting. It seems Google is moving away from anything gpl/gnu lately (fuchsia, etc...)

I doubt this is very relevant in the case of Chrome compilers. It's more about the huge investment/expertise in Clang- or LLVM-based dynamic analysis and development tooling.

It's just the better platform for writing these things. Heck, this is what is was built for in the first place. GCC is a solid, but also a very traditional compiler.

Re: Clang Is Now Used to Build Chrome for Windows

#63

Have seen a couple interesting articles[0][1] highlighting the weirdness of building Chromium on Windows, so hopefully this LLVM improvement will be a step towards a smoother process. [0] https://randomascii.wordpress.com/2018/02/25/compiler-bug-li... [1] https://randomascii.wordpress.com/2017/07/09/24-core-cpu-and...

Hey, those are mine! Those two issues (and this one: https://randomascii.wordpress.com/2018/02/11/zombie-processe... ) are equally problematic with clang. Two of them were problems with Windows, and one was a flaw in a Microsoft system management component. Luckily they are all mitigated, fixed, or being fixed, so my Chrome builds run much more smoothly now.

Thank you for chiming in! Your articles are wonderful!

Re: Clang Is Now Used to Build Chrome for Windows

#64
post #55
post #49

Earlier quoted context omitted.

Excellent work. I like to ignore visual studio completely and pretend it doesn't exist, but that's just me :) I've used cygwin's cross-compiler x86_64-w64-mingw32-clang package once in a while, though I find more projects' build systems choke on it and do the wrong thing (libgmp as a notable example) than with x86_64-w64-mingw32-gcc.

I tend to ignore both gcc and MSVC. Clang is really good at bootstrapping itself with this setup even when cross compiling without any real complexity. Without diverting into a cmake vs autotools battle I like that llvm and clang just work and bootstrap so easily. Gone are the days of messing around with gmp isl and co to bootstrap a toolchain.

Fair enough, but I actually need gmp more for runtime math, plus fortran deps like lapack and more obscure things. Maybe flang will be production-worthy some day - do you know if they're still outputting a textual representation of IR into string buffers?

Re: Clang Is Now Used to Build Chrome for Windows

#65
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.

There's a link in the article here, but sadly it sounds like they've abandoned Clang/C2. I guess they got normal MSVC up to speed on the C++1y/z they wanted to support, and Clang/LLVM was always better than both at complex numbers, inline assembly, and other C features.

Re: Clang Is Now Used to Build Chrome for Windows

#66

Have seen a couple interesting articles[0][1] highlighting the weirdness of building Chromium on Windows, so hopefully this LLVM improvement will be a step towards a smoother process. [0] https://randomascii.wordpress.com/2018/02/25/compiler-bug-li... [1] https://randomascii.wordpress.com/2017/07/09/24-core-cpu-and...

Hey, those are mine! Those two issues (and this one: https://randomascii.wordpress.com/2018/02/11/zombie-processe... ) are equally problematic with clang. Two of them were problems with Windows, and one was a flaw in a Microsoft system management component. Luckily they are all mitigated, fixed, or being fixed, so my Chrome builds run much more smoothly now.

Did you guys ever reverse-spec the name mangling?

Re: Clang Is Now Used to Build Chrome for Windows

#67

Have seen a couple interesting articles[0][1] highlighting the weirdness of building Chromium on Windows, so hopefully this LLVM improvement will be a step towards a smoother process. [0] https://randomascii.wordpress.com/2018/02/25/compiler-bug-li... [1] https://randomascii.wordpress.com/2017/07/09/24-core-cpu-and...

Hey, those are mine! Those two issues (and this one: https://randomascii.wordpress.com/2018/02/11/zombie-processe... ) are equally problematic with clang. Two of them were problems with Windows, and one was a flaw in a Microsoft system management component. Luckily they are all mitigated, fixed, or being fixed, so my Chrome builds run much more smoothly now.

Did Microsoft ever fix their kernel bug with process creation you wrote about?

Re: Clang Is Now Used to Build Chrome for Windows

#68

Earlier quoted context omitted.

To elaborate on that, if you want to build Chromium for Windows you currently still need to install Visual Studio. We don't use its compiler anymore but we use its linker and other tools, its header files, and its libraries. Many Chromium developers also use it for editing code, and for debugging code. Chrome is currently built using VS 2017 15.3 (that's update 3). Eventually we will probably upgrade to VS 2017 15.7…

You need the MSVC build tools and the Windows SDK. You don't need the entire Visual Studio.

Can you get the VS 2017 build tools separately any more?

Re: Clang Is Now Used to Build Chrome for Windows

#70

Who are the "we" they refer to in this blog? Are they Google's devs who build chrome, or are they clang's devs? If they are clang's dev, why are they building chrome? I am completely confused on this one.

Google employs a large number of clang devs. I would not be surprised if it was close to 50% of all clang (and LLVM) devs.
Post reply on HN