Bug 1331957 - Part 11: Specify the path to the cross-compiler toolchain libtool for OS X static analysis builds; r=froydnj

This commit is contained in:
Ehsan Akhgari 2017-01-23 00:27:53 -05:00
Родитель 69fa60c78a
Коммит 4b3bdfeff3
3 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -41,7 +41,8 @@ build-clang.py accepts a JSON config format with the following fields:
* cxx: Path to the bootsraping C++ Compiler.
* as: Path to the assembler tool.
* ar: Path to the library archiver tool.
* ranlib: Path to the ranlib tool.
* ranlib: Path to the ranlib tool (optional).
* libtool: Path to the libtool tool (optional).
* ld: Path to the linker.
* patches: Optional list of patches to apply per platform. Supported platforms: macosx64, linux32, linux64. The default is Release.
* build_type: The type of build to make. Supported types: Release, Debug, RelWithDebInfo or MinSizeRel.

Просмотреть файл

@ -200,7 +200,7 @@ def is_windows():
return platform.system() == "Windows"
def build_one_stage(cc, cxx, asm, ld, ar, ranlib,
def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
src_dir, stage_dir, build_libcxx,
osx_cross_compile, build_type, assertions,
python_path, gcc_dir, libcxx_include_dir):
@ -246,6 +246,8 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib,
cmake_args.insert(-1, "-DLLVM_USE_CRT_RELEASE=MT")
if ranlib is not None:
cmake_args += ["-DCMAKE_RANLIB=%s" % slashify_path(ranlib)]
if libtool is not None:
cmake_args += ["-DCMAKE_LIBTOOL=%s" % slashify_path(libtool)]
if osx_cross_compile:
cmake_args += ["-DCMAKE_SYSTEM_NAME=Darwin",
"-DCMAKE_SYSTEM_VERSION=10.10",
@ -469,6 +471,9 @@ if __name__ == "__main__":
ld = get_tool(config, "link" if is_windows() else "ld")
ar = get_tool(config, "lib" if is_windows() else "ar")
ranlib = None if is_windows() else get_tool(config, "ranlib")
libtool = None
if "libtool" in config:
libtool = get_tool(config, "libtool")
if not os.path.exists(source_dir):
os.makedirs(source_dir)
@ -579,7 +584,7 @@ if __name__ == "__main__":
[cxx] + extra_cxxflags,
[asm] + extra_asmflags,
[ld] + extra_ldflags,
ar, ranlib,
ar, ranlib, libtool,
llvm_source_dir, stage1_dir, build_libcxx, osx_cross_compile,
build_type, assertions, python_path, gcc_dir, libcxx_include_dir)
@ -595,7 +600,7 @@ if __name__ == "__main__":
[stage1_inst_dir + "/bin/%s%s" %
(cc_name, exe_ext)] + extra_asmflags,
[ld] + extra_ldflags,
ar, ranlib,
ar, ranlib, libtool,
llvm_source_dir, stage2_dir, build_libcxx, osx_cross_compile,
build_type, assertions, python_path, gcc_dir, libcxx_include_dir)
@ -610,7 +615,7 @@ if __name__ == "__main__":
[stage2_inst_dir + "/bin/%s%s" %
(cc_name, exe_ext)] + extra_asmflags,
[ld] + extra_ldflags,
ar, ranlib,
ar, ranlib, libtool,
llvm_source_dir, stage3_dir, build_libcxx, osx_cross_compile,
build_type, assertions, python_path, gcc_dir, libcxx_include_dir)

Просмотреть файл

@ -17,6 +17,7 @@
"as": "/home/worker/workspace/build/src/clang/bin/clang",
"ar": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ar",
"ranlib": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ranlib",
"libtool": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-libtool",
"ld": "/home/worker/workspace/build/src/clang/bin/clang",
"patches": {
"macosx64": [