Marek Olšák wrote on 13.09.2016 19:53: > LLVM 64-bit: > > mkdir -p build > cd build > cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/llvm/x86_64-linux-gnu > -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=O > -DCMAKE_BUILD_TYPE=RelWithDebInfo > -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON \ > -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG > -fno-omit-frame-pointer" \ > -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG > -fno-omit-frame-pointer". > ninja > sudo ninja install > > > LLVM 32-bit: > > mkdir -p build32 > cd build32 > cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/llvm/i386-linux-gnu > -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=ON > -DCMAKE_BUILD_TYPE=RelWithDebInfo > -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON \ > -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG > -fno-omit-frame-pointer" \ > -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG > -fno-omit-frame-pointer" \ > -DLLVM_BUILD_32_BITS=ON > ninja > sudo ninja install > # then add /usr/llvm/x86_64-linux-gnu and /usr/llvm/i386-linux-gnu to > ld.conf > > > Mesa configure helper script, it will overwrite the /usr/lib/ files on > Ubuntu (run as-is for 64-bit, or use "-32" for 32-bit):
Just a note about Debian/Ubuntu (even though I don't think that's too interesting for Romain): Well, if you build for Debian or a derivative like Ubuntu and you do not need many versions in parallel, ie. as a user, then the best option (IMHO) is using Debian's package and building it with the current upstream (plus some odd changes here and there for new symbols and such). LLVM you mostly don't need to build (in that case), because you can just use the packages from apt.llvm.org, which Sylvestre, the Debian LLVM maintainer, builds for various Debian and Ubuntu flavours. (And that saves a lot of the rage-quit potential IMHO, since building LLVM can take a while and fail in very inopportune moments.) That way you can switch cleanly back to your distros packages, if something breaks (or they catch up far enough that you want to stop building Mesa yourself). Anyway, this is how I do my builds: LLVM only if I have to, in case apt.llvm.org is currently outdated (happens occasionally) or I'm testing a patch for upstream inclusion. And Mesa I build regularly by just using git-buildpackage with the Debian package as a base and a local branch for current Mesa git plus a local "Debian branch" including different configuration (eg. I was already building the VA-API stuff for myself before Debian started doing it) or patches (again: those I'm testing for upstream inclusion), if any. Mesa builds are quite fast, only a couple of minutes in a clean chroot environment (pbuilder!), so it's not nearly as annoying as building LLVM. If there's interest, I could probably whip some guide up, which could be shipped in Mesa's doc directory? By the way, since nobody mentioned this so far: if you want OpenCL support you're going to need to rebuild libclc as well. Your distro's libclc was built against the LLVM it ships. Cheers, Kai
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev