Added verbose flag to the llvm_flags variable
This commit is contained in:
parent
cabadcf6f4
commit
f5402eefab
@ -240,6 +240,12 @@ def download_llvm_binary():
|
||||
llvm_dir = os.path.join("/usr", "lib", "llvm-"+llvm_vers)
|
||||
if llvm_config_path[-1:] == "\n":
|
||||
llvm_config_path = llvm_config_path[:-1]
|
||||
if args['verbose']:
|
||||
llvm_flags = "-DLLVM_BINARY_DIR={0} -DLLVM_CONFIG={1} -DLLVM_LIBRARY_DIR={2} -DLLVM_MAIN_INCLUDE_DIR={3} -DLLVM_TABLEGEN_EXE={4} \
|
||||
-DLLVM_TOOLS_BINARY_DIR={5} -DLLVM_TOOL_CLING_BUILD=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON".format(llvm_dir, llvm_config_path,
|
||||
os.path.join(llvm_dir, 'lib'), os.path.join(llvm_dir, 'include'), os.path.join(llvm_dir, 'bin', 'llvm-tblgen'),
|
||||
os.path.join(llvm_dir, 'bin'))
|
||||
else:
|
||||
llvm_flags = "-DLLVM_BINARY_DIR={0} -DLLVM_CONFIG={1} -DLLVM_LIBRARY_DIR={2} -DLLVM_MAIN_INCLUDE_DIR={3} -DLLVM_TABLEGEN_EXE={4} \
|
||||
-DLLVM_TOOLS_BINARY_DIR={5} -DLLVM_TOOL_CLING_BUILD=ON".format(llvm_dir, llvm_config_path,
|
||||
os.path.join(llvm_dir, 'lib'), os.path.join(llvm_dir, 'include'), os.path.join(llvm_dir, 'bin', 'llvm-tblgen'),
|
||||
@ -255,6 +261,12 @@ def download_llvm_binary():
|
||||
llvm_config_path = os.path.join(llvm_dir, "bin", "llvm-config")
|
||||
if llvm_config_path[-1:] == "\n":
|
||||
llvm_config_path = llvm_config_path[:-1]
|
||||
if args['verbose']:
|
||||
llvm_flags = "-DLLVM_BINARY_DIR={0} -DLLVM_CONFIG={1} -DLLVM_LIBRARY_DIR={2} -DLLVM_MAIN_INCLUDE_DIR={3} -DLLVM_TABLEGEN_EXE={4} \
|
||||
-DLLVM_TOOLS_BINARY_DIR={5} -DLLVM_TOOL_CLING_BUILD=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON".format(llvm_dir, llvm_config_path,
|
||||
os.path.join(llvm_dir, 'lib'), os.path.join(llvm_dir, 'include'), os.path.join(llvm_dir, 'bin', 'llvm-tblgen'),
|
||||
os.path.join(llvm_dir, 'bin'))
|
||||
else:
|
||||
llvm_flags = "-DLLVM_BINARY_DIR={0} -DLLVM_CONFIG={1} -DLLVM_LIBRARY_DIR={2} -DLLVM_MAIN_INCLUDE_DIR={3} -DLLVM_TABLEGEN_EXE={4} \
|
||||
-DLLVM_TOOLS_BINARY_DIR={5} -DLLVM_TOOL_CLING_BUILD=ON".format(llvm_dir, llvm_config_path,
|
||||
os.path.join(llvm_dir, 'lib'), os.path.join(llvm_dir, 'include'), os.path.join(llvm_dir, 'bin', 'llvm-tblgen'),
|
||||
@ -262,10 +274,16 @@ def download_llvm_binary():
|
||||
else:
|
||||
raise Exception("Building clang using LLVM binary not possible. Please invoke cpt without --with-binary-llvm and --with-llvm-tar flags")
|
||||
if tar_required:
|
||||
if args['verbose']:
|
||||
llvm_flags = "-DLLVM_BINARY_DIR={0} -DLLVM_CONFIG={1} -DLLVM_LIBRARY_DIR={2} -DLLVM_MAIN_INCLUDE_DIR={3} -DLLVM_TABLEGEN_EXE={4} \
|
||||
-DLLVM_TOOLS_BINARY_DIR={5} -DLLVM_TOOL_CLING_BUILD=ON".format(srcdir, os.path.join(srcdir, 'bin', 'llvm-config'),
|
||||
os.path.join(srcdir, 'lib'), os.path.join(srcdir, 'include'), os.path.join(srcdir, 'bin', 'llvm-tblgen'),
|
||||
os.path.join(srcdir, 'bin'))
|
||||
-DLLVM_TOOLS_BINARY_DIR={5} -DLLVM_TOOL_CLING_BUILD=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON".format(llvm_dir, llvm_config_path,
|
||||
os.path.join(llvm_dir, 'lib'), os.path.join(llvm_dir, 'include'), os.path.join(llvm_dir, 'bin', 'llvm-tblgen'),
|
||||
os.path.join(llvm_dir, 'bin'))
|
||||
else:
|
||||
llvm_flags = "-DLLVM_BINARY_DIR={0} -DLLVM_CONFIG={1} -DLLVM_LIBRARY_DIR={2} -DLLVM_MAIN_INCLUDE_DIR={3} -DLLVM_TABLEGEN_EXE={4} \
|
||||
-DLLVM_TOOLS_BINARY_DIR={5} -DLLVM_TOOL_CLING_BUILD=ON".format(llvm_dir, llvm_config_path,
|
||||
os.path.join(llvm_dir, 'lib'), os.path.join(llvm_dir, 'include'), os.path.join(llvm_dir, 'bin', 'llvm-tblgen'),
|
||||
os.path.join(llvm_dir, 'bin'))
|
||||
if DIST=="Ubuntu" and REV=='16.04' and is_os_64bit():
|
||||
download_link = 'http://releases.llvm.org/5.0.2/clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04.tar.xz'
|
||||
exec_subprocess_call('wget %s' % download_link, workdir)
|
||||
@ -518,7 +536,6 @@ class Build(object):
|
||||
exec_subprocess_call('%s --build . --target %s %s'
|
||||
% (CMAKE, target, flags), LLVM_OBJ_ROOT)
|
||||
else:
|
||||
if args['verbose']: exec_subprocess_call('cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON', LLVM_OBJ_ROOT)
|
||||
exec_subprocess_call('make -j %d %s %s' % (self.cores, targets, flags),
|
||||
LLVM_OBJ_ROOT)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user