On Mon, 2017-08-14 at 17:11 +0900, Michel Dänzer wrote: > On 11/08/17 02:13 AM, Jan Vesely wrote: > > On Thu, 2017-08-10 at 17:45 +0100, Emil Velikov wrote: > > > > > > Topic for another thread: > > > There's been a handful of issues reported with BUILD_SHARED_LIBS=ON. > > > Should we consider that unsupported setup and error out? > > I don't really see the point / gain in that. > > > > please no. > > BUILD_SHARED_LIBS=ON is a must for development setup > > debug build of clang + llvm takes 1.4GB, each. Having a ~2.8GB library, > > is a really bad idea for testing, > > Not sure what testing you're referring to exactly, but IME application > startup takes on the order of hundreds of ms longer when linking against > the individual shared libraries than when linking against the single > one. It's one reason why distros building with BUILD_SHARED_LIBS=ON is > just silly. > > > > not to mention linking time that goes well into minutes for even a > > minor change in LLVM. > > It can certainly take a long time, but I don't remember it taking > minutes. Are you counting the time for linking other libraries / tools > against libLLVM-*.0*.so as well? You can avoid that by explicitly > building only the library, e.g.: > > ninja [...] lib/libLLVM-6.0svn.so > > Also, using the gold or lld linker might help.
The problem is that setting both BUILD_SHARED_LIBS=ON LLVM_BUILD_LLVM_DYLIB=ON Does not work. BUILD_SHARED_LIBS=OFF results in every component creating its own static library. These are used be default when linking LLVM tools. This configuration results in 15G build/lib and another 15G build/bin. simple test: touch lib/Target/AMDGPU/R600ISelLowering.cpp make -j3 (using more jobs exhausts available memory since a linking process easily takes 7-9GB). takes ~15mins to complete, and that's without the install step. using LLVM_LINK_LLVM_DYLIB=ON improves the test time to ~7m (and reduces build/bin to ~4GB) but it still does not compare to ~40s that it takes BUILD_SHARED_LIBS to finish the same test. Jan
signature.asc
Description: This is a digitally signed message part
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev