Bug 1336149 - Clean up the patches section in build-clang.py config files; r=froydnj

These config files don't need to declare patches for other platforms.
Therefore, this patch makes "patches" a simple array of patches to be
applied.
This commit is contained in:
Ehsan Akhgari 2017-02-02 11:36:17 -05:00
Родитель d641ca3f83
Коммит 6ca044975f
7 изменённых файлов: 18 добавлений и 74 удалений

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

@ -44,7 +44,7 @@ build-clang.py accepts a JSON config format with the following fields:
* 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.
* patches: Optional list of patches to apply.
* build_type: The type of build to make. Supported types: Release, Debug, RelWithDebInfo or MinSizeRel.
* build_libcxx: Whether to build with libcxx. The default is false.
* build_clang_tidy: Whether to build clang-tidy with the Mozilla checks imported. The default is false.

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

@ -170,24 +170,6 @@ def svn_update(directory, revision):
run_in(directory, ["svn", "revert", "-q", "-R", revision])
def get_platform():
p = platform.system()
if p == "Darwin":
return "macosx64"
elif p == "Linux":
if platform.architecture() == "AMD64":
return "linux64"
else:
return "linux32"
elif p == "Windows":
if platform.architecture() == "AMD64":
return "win64"
else:
return "win32"
else:
raise NotImplementedError("Not supported platform")
def is_darwin():
return platform.system() == "Darwin"
@ -492,7 +474,7 @@ if __name__ == "__main__":
checkout_or_update(libcxxabi_repo, libcxxabi_source_dir)
if extra_repo:
checkout_or_update(extra_repo, extra_source_dir)
for p in config.get("patches", {}).get(get_platform(), []):
for p in config.get("patches", []):
patch(p, source_dir)
symlinks = [(source_dir + "/clang",

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

@ -14,15 +14,7 @@
"cc": "/home/worker/workspace/build/src/gcc/bin/gcc",
"cxx": "/home/worker/workspace/build/src/gcc/bin/g++",
"as": "/home/worker/workspace/build/src/gcc/bin/gcc",
"patches": {
"macosx64": [
"llvm-debug-frame.patch"
],
"linux64": [
"llvm-debug-frame.patch"
],
"linux32": [
"llvm-debug-frame.patch"
]
}
"patches": [
"llvm-debug-frame.patch"
]
}

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

@ -19,27 +19,11 @@
"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": [
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch",
"pr28831-r280042.patch",
"r277806.patch",
"r285657.patch"
],
"linux64": [
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch",
"pr28831-r280042.patch",
"r277806.patch",
"r285657.patch"
],
"linux32": [
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch",
"pr28831-r280042.patch",
"r277806.patch",
"r285657.patch"
]
}
"patches":[
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch",
"pr28831-r280042.patch",
"r277806.patch",
"r285657.patch"
]
}

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

@ -10,7 +10,5 @@
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"patches": {
}
"cxx": "cl.exe"
}

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

@ -11,7 +11,5 @@
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"ml": "ml64.exe",
"patches": {
}
"ml": "ml64.exe"
}

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

@ -20,18 +20,8 @@
"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",
"ld": "/home/worker/workspace/build/src/clang/bin/clang",
"patches": {
"macosx64": [
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch"
],
"linux64": [
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch"
],
"linux32": [
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch"
]
}
"patches": [
"llvm-debug-frame.patch",
"compiler-rt-cross-compile.patch"
]
}