[PATCH] Build procedure for lldb project with cmake/ninja

Siva Chandra sivachandra at google.com
Wed Feb 11 20:08:17 PST 2015


================
Comment at: zorg/buildbot/builders/LLDBBuilder.py:320
@@ +319,3 @@
+		   "-DCMAKE_CXX_COMPILER=clang++",
+  		   "-DCMAKE_BUILD_TYPE=Debug",
+                   WithProperties("../%s" %llvm_srcdir),
----------------
sivachandra wrote:
> This should probably be in extra_configure_args.
Ying had asked a question about this off-thread. I am answering it here.

If you actually want to get it absolutely right, you should remove the arg extra_configure_args completely. That name suggests the use of "configure" and not cmake. If you do want to go this route, then you should have the following args instead of "extra_configure_args":

1. build_compiler - This can take args like "gcc", "clang", "icc" etc. You should have logic like this:

    cmake_args = []
    if build_compiler == 'gcc':
        cmake_args += ["-DCMAKE_C_COMPILER=gcc", "-DCMAKE_CXX_COMPILER=g++"]
    elif build_compiler == 'clang':
       ... so on

2. test_compiler - This can take args like "gcc", "clang", "icc", etc. You should have logic like this:

    if test_compiler == 'gcc':
        cmake_args.append("-DLLDB_TEST_COMPILER=gcc")
    elif test_compiler == 'clang':
        ... so on

3. build_type - This can be 'Debug' or 'Release'. You should have code like this:

    cmake_args.append("-DCMAKE_BUILD_TYPE=%s" % build_type)

http://reviews.llvm.org/D7521

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list