Search code examples
llvmfedorarpmrpmbuildchroot

Build rpms with llvm


I have some source rpms (lets say rsync-3.1.1-7.fc23.src.rpm) and I want to build it with llvm instead of gcc. What is the most convenient way of doing this?

My setup is a Fedora 23 VM and I would prefer if I don't have to setup something really complicated. Is there a way somehow to just do an rpmbuild under chroot maybe, somehow?


Solution

  • I just tried this, and it looks like it worked...

    export CC=clang
    export CXX=clang++
    rpmbuild --rebuild rsync-3.1.1-7.fc23.src.rpm
    

    I tested it by first putting bogus values for CC and CXX, and the configure script failed.