[LLVMdev] migrating from autoconf to cmake+ninja

Mueller-Roemer, Johannes Sebastian Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de
Wed Aug 27 07:29:18 PDT 2014


prefix = CMAKE_INSTALL_PREFIX
enabled-shared = BUILD_SHARED_LIBS
targets = LLVM_TARGETS_TO_BUILD (defaults to all, or use a semicolon separated list)
disable-assertions = LLVM_ENABLE_ASSERTIONS (obviously inverted ;)

I don't believe the others have direct equivalents, however debug/optimized is chosen via CMAKE_BUILD_TYPE

--
Johannes S. Mueller-Roemer, MSc
Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-606  |  Fax +49 6151 155-139
johannes.mueller-roemer at igd.fraunhofer.de  |  www.igd.fraunhofer.de


-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Carsten Mattner
Sent: Wednesday, August 27, 2014 15:41
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] migrating from autoconf to cmake+ninja

I want to start using cmake+ninja instead of autoconf for configuring and building llvm from svn, but I have no idea how to map my existing list of autoconf flags to cmake.

Here's how I run ./configure right now in the top directory:
PREFIX=_some_prefix_dir_ \
    ../llvm/configure \
    --prefix=$PREFIX \
    --libdir=$PREFIX/lib/llvm \
    --sysconfdir=$PREFIX/etc \
    --enable-shared \
    --enable-targets=all \
    --disable-expensive-checks \
    --disable-debug-runtime \
    --disable-assertions \
    --with-binutils-include=/usr/include \
    --enable-optimized

Is it possible to map this to cmake flags and if yes how?

Platform is linux-x86_64 and revision is release_35 branch.

If there's superfluous flags please do tell and I'll remove them.

Also is there a flag to skip tests?

Is building lld on linux supported? I tried including lld in the build and it failed:
llvm[4]: Linking Release unit test CoreTest (without symbols)
/tmp/llvm/build/Release/lib/libgtest_main.a(TestMain.o): In function `main':
/tmp/llvm/llvm/utils/unittest/UnitTestMain/TestMain.cpp:(.text.main+0x28):
undefined reference to `llvm::cl::ParseCommandLineOptions(int, char
const* const*, char const*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/tmp/llvm/llvm/unittests/Makefile.unittest:58: recipe for target 'Release/CoreTestTests' failed
make[4]: *** [Release/CoreTestTests] Error 1
make[4]: Leaving directory '/tmp/llvm/build/tools/lld/unittests/CoreTests'
/tmp/llvm/llvm/Makefile.rules:937: recipe for target 'CoreTests/.makeall' failed
make[3]: *** [CoreTests/.makeall] Error 2 _______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list