[LLVMdev] Problems with make
Csaba Raduly
rcsaba at gmail.com
Mon Jun 30 01:10:07 PDT 2014
Hi all,
On Thu, Jun 12, 2014 at 2:37 PM, Armin Steinhoff wrote:
> Dan Liew wrote:
>
> If you want things to go faster
>
> * Use the -jN flag with make to build in parallel where N is the maximum
> number of jobs run in parallel. E.g.
>
> $ make -j4
>
>
> This could be critical if you have 4 or less GigaBytes of memory. If you run
> "make -j2" it makes sure that no swapping happens ... mostly :)
>
I use the following hack to ensure that at most one linker process runs:
~/workspace/LLVM/llvm $ svn diff Makefile.rules
Index: Makefile.rules
===================================================================
--- Makefile.rules (revision 212018)
+++ Makefile.rules (working copy)
@@ -767,7 +767,7 @@
Preprocess.CXX= $(Compile.Wrapper) \
$(CXX) $(CPP.Flags) $(TargetCommonOpts) $(CPPFLAGS) \
$(CompileCommonOpts) $(CXX.Flags) -E
-Link = $(Compile.Wrapper) \
+Link = $(Compile.Wrapper) ${FLOCK_COMMAND} \
$(CXX) $(CXXFLAGS) $(LD.Flags) $(LDFLAGS) \
$(TargetCommonOpts) $(Strip)
and the following command line:
$ make -j 8 FLOCK_COMMAND='flock /tmp/linker.lock'
This is more or less required on my 8-processor/8GB RAM machine when
building the debug version :(
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
More information about the llvm-dev
mailing list