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