link time issue

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

link time issue

Richard Smith via cfe-dev
Hello Clang devs!

I'm trying to build a plugin for clang. I followed the basic tutorial available on the Clang documentation. 

Everything works fine but recompiling the plugin takes about 25 seconds on a powerful PC.
Do you know a way to reduce this compilation time ?

Here is the verbose build command line:


time ninja -v -j$(nproc ) bin/plus-watcher                                                                                                                                                                                        
[1/2] /usr/lib/ccache/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/plus-watcher -I/home/dorian/clang-llvm/llvm/tools/clang/tools/extra/plus-watcher -I/home/dorian/clang-llvm/llvm/tools/clang/include -Itools/clang/include -I/usr/include/libxml2 -Iinclude -I/home/dorian/clang-llvm/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fno-common -Woverloaded-virtual -fno-strict-aliasing -g    -fno-exceptions -fno-rtti -MD -MT tools/clang/tools/extra/plus-watcher/CMakeFiles/plus-watcher.dir/PlusWatcher2.cpp.o -MF tools/clang/tools/extra/plus-watcher/CMakeFiles/plus-watcher.dir/PlusWatcher2.cpp.o.d -o tools/clang/tools/extra/plus-watcher/CMakeFiles/plus-watcher.dir/PlusWatcher2.cpp.o -c /home/dorian/clang-llvm/llvm/tools/clang/tools/extra/plus-watcher/PlusWatcher2.cpp
[2/2] : && /usr/lib/ccache/c++  -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fno-common -Woverloaded-virtual -fno-strict-aliasing -g  -Wl,-allow-shlib-undefined    -Wl,-rpath-link,/home/dorian/clang-llvm/build/./lib tools/clang/tools/extra/plus-watcher/CMakeFiles/plus-watcher.dir/PlusWatcher.cpp.o tools/clang/tools/extra/plus-watcher/CMakeFiles/plus-watcher.dir/PlusWatcher2.cpp.o  -o bin/plus-watcher  -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMSupport.a -lpthread lib/libclangTooling.a lib/libclangBasic.a lib/libclangASTMatchers.a lib/libclangFormat.a lib/libclangFrontend.a lib/libclangDriver.a lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangEdit.a lib/libclangAnalysis.a lib/libLLVMBitReader.a lib/libLLVMProfileData.a lib/libclangToolingCore.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMMC.a lib/libLLVMOption.a lib/libLLVMSupport.a -lz -lrt -ldl -ltinfo -lpthread -lm lib/libLLVMDemangle.a && :
ninja -v -j$(nproc ) bin/plus-watcher 23.91s

Do you see any option that I could remove ? I don't need any optimization at the moment.

Best regards,

--
Dorian Haglund

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev