News for hackers. Stuff that matters.
Re:LLVM 8.0.0 Release by slacka on Wednesday March 20, 2019 @10:14AM (#19442364)
There truly is nothing to it. I just built it for the first time on this fresh install of Ubuntu. You can just copy and paste the lines from the getting started page.[1] Here's my .bash_history:

  $ git clone https://github.com/llvm/llvm-project.git
  $ cd llvm-project
  $ mkdir build && cd build
  $ cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm
  $ make -j4 
Took < 40 min on an old laptop.

[1] https://clang.llvm.org/get_started.html

Re:LLVM 8.0.0 Release by atq2119 on Wednesday March 20, 2019 @12:59PM (#19444155)
It doesn't matter much when you build only once, but more people need to be aware of Ninja for builds. Both cmake and meson can target it, and it is much faster for incremental builds.
Re:LLVM 8.0.0 Release by RantyDave on Wednesday March 20, 2019 @04:46PM (#19446683)
I never understand this. Surely 'make' itself uses an almost irrelevantly low amount of CPU compared to compiling?

That being said: have used Ninja with Cmake. Damn fast.

Re:LLVM 8.0.0 Release by atq2119 on Thursday March 21, 2019 @10:24AM (#19452668)
The problem is with how make checks which files have changed and the related I/O latency, plus the fact that pretty much everybody uses recursive make. The overhead of recursive make initialization plus the forced serialisation of builds is the main cause of slow make.

Consider the Linux kernel as a contrast, which doesn't suffer from slow make because a lot of investment was made into a non-recursive make system.

The fact that makefile generators like CMake tend to generate recursive makefiles is a shame.

Re:LLVM 8.0.0 Release by maccam912 on Wednesday March 20, 2019 @06:47PM (#19447772)
It's not so much how much CPU each takes up, but that 'make' will waste some time recompiling stuff that doesn't need to be recompiled. Ninja is better about reusing stuff compiled the first time to make the second compilation faster but still accurate.
Re:LLVM 8.0.0 Release by coherentpony on Wednesday March 20, 2019 @10:39PM (#19448869)
Isn't the point of `make` that it doesn't build stuff that doesn't need to be rebuilt? Am I missing something?
Re:LLVM 8.0.0 Release by swuecho on Wednesday March 20, 2019 @11:05PM (#19448971)
I guess make and ninjia use different algorithm to compute the targets that does not beed to rebuild.
Re:LLVM 8.0.0 Release by monocasa on Wednesday March 20, 2019 @05:32PM (#19447172)
Last time I tried on a not super new laptop, it couldn't link. It really needs 8GB of RAM last time I tried.
Re:LLVM 8.0.0 Release by slacka on Thursday March 21, 2019 @08:03PM (#19458541)
Something was wrong with your setup. I've built clang in the past on a VM with only 3GB physical + 3GB of virtual RAM/swap allocated.
Re:LLVM 8.0.0 Release by monocasa on Friday March 22, 2019 @03:58PM (#19466308)
Recently? It was a 4GB laptop that ran out of memory while linking back in Oct '18.