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
Mueller-Roemer, Johannes Sebastian
2014-Aug-27 14:29 UTC
[LLVMdev] migrating from autoconf to cmake+ninja
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
On Wed, Aug 27, 2014 at 4:29 PM, Mueller-Roemer, Johannes Sebastian <Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote:> 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_TYPEThank you. I found http://llvm.org/docs/CMake.html#options-and-variables and gonna try out cmake -G ninja.> -----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