Live data from Hacker News

Clang Is Now Used to Build Chrome for Windows

blog.llvm.org

11–20 of 105 posts

Re: Clang Is Now Used to Build Chrome for Windows

#12
post #10
post #7

> if your project is Windows-only, you can get a second compiler’s opinion on your code, and Clang’s warnings might find bugs GCC (mingw.org and mingw-w64 triples) has existed and been able to do this, including and especially cross-compiling, for a long time. No need to manually download a Windows SDK either. edited to add: to be fair, it's not ABI compatible with MSVC. But it deserves a mention and it's an easier o…

Apple hired developers of Clang and started supporting Clang around the time GPLv3 was being pushed by FSF, Apple at the time was using GCC in their development and feared that GPLv3 would taint their code. other than technical merits, permissible license of Clang is attractive for some developers/businesses

I thought Apple didn’t just “hire” the developers of clang. They started the clang project in-house before eventually open sourcing it.

Re: Clang Is Now Used to Build Chrome for Windows

#15
post #8

And why not use mingw gcc? Do they find somthing wrong with it? Edit Mingw-w64 its quite nice and includes gcc without all stuff cgwin does.

Why use it? llvm is the future anyway and lots of players have a stake in it and contribute to it.

In fact, there are way too many c++ compilers if you ask me. I would gladly accept a world where clang is the one and only.

Re: Clang Is Now Used to Build Chrome for Windows

#16
post #12
post #10

Earlier quoted context omitted.

Apple hired developers of Clang and started supporting Clang around the time GPLv3 was being pushed by FSF, Apple at the time was using GCC in their development and feared that GPLv3 would taint their code. other than technical merits, permissible license of Clang is attractive for some developers/businesses

I thought Apple didn’t just “hire” the developers of clang. They started the clang project in-house before eventually open sourcing it.

Yes; Clang was started internally to Apple. They did "just hire" the developer of LLVM.

Re: Clang Is Now Used to Build Chrome for Windows

#17
post #7

> if your project is Windows-only, you can get a second compiler’s opinion on your code, and Clang’s warnings might find bugs GCC (mingw.org and mingw-w64 triples) has existed and been able to do this, including and especially cross-compiling, for a long time. No need to manually download a Windows SDK either. edited to add: to be fair, it's not ABI compatible with MSVC. But it deserves a mention and it's an easier o…

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

Re: Clang Is Now Used to Build Chrome for Windows

#18

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.

Re: Clang Is Now Used to Build Chrome for Windows

#19
post #4

I didn't realize that clang is mostly a drop in replacement for cl, and matches the C++ abi. That in of itself is awesome.

clang isn't. clang-cl is (after years of work by the clang-cl team at Google). They had to do a lot of work, especially around PDB (symbol-file) generation.

Re: Clang Is Now Used to Build Chrome for Windows

#20
post #7

> if your project is Windows-only, you can get a second compiler’s opinion on your code, and Clang’s warnings might find bugs GCC (mingw.org and mingw-w64 triples) has existed and been able to do this, including and especially cross-compiling, for a long time. No need to manually download a Windows SDK either. edited to add: to be fair, it's not ABI compatible with MSVC. But it deserves a mention and it's an easier o…

Does this option give you full debug information? My impression was that it does not. I require full debug information for debugging and profiling, and with clang-cl I get that (context: I work on Chromium)
Post reply on HN