diff --git a/build/build-clang/README b/build/build-clang/README index c4342883ba34..eee7f448cf9c 100644 --- a/build/build-clang/README +++ b/build/build-clang/README @@ -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. diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py index 5fb493f7105f..8b6c8b3e781c 100755 --- a/build/build-clang/build-clang.py +++ b/build/build-clang/build-clang.py @@ -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", diff --git a/build/build-clang/clang-static-analysis-linux64.json b/build/build-clang/clang-static-analysis-linux64.json index 930b65b7fac9..59987f2125dd 100644 --- a/build/build-clang/clang-static-analysis-linux64.json +++ b/build/build-clang/clang-static-analysis-linux64.json @@ -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" + ] } diff --git a/build/build-clang/clang-static-analysis-macosx64.json b/build/build-clang/clang-static-analysis-macosx64.json index ecfa836bf7bb..7c5cbed21a7f 100644 --- a/build/build-clang/clang-static-analysis-macosx64.json +++ b/build/build-clang/clang-static-analysis-macosx64.json @@ -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" + ] } diff --git a/build/build-clang/clang-static-analysis-win32.json b/build/build-clang/clang-static-analysis-win32.json index b21987a4ee03..f09973cf6994 100644 --- a/build/build-clang/clang-static-analysis-win32.json +++ b/build/build-clang/clang-static-analysis-win32.json @@ -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" } diff --git a/build/build-clang/clang-static-analysis-win64.json b/build/build-clang/clang-static-analysis-win64.json index f23b95dadc1c..a4b8d62b48b0 100644 --- a/build/build-clang/clang-static-analysis-win64.json +++ b/build/build-clang/clang-static-analysis-win64.json @@ -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" } diff --git a/build/build-clang/clang-tidy-macosx64.json b/build/build-clang/clang-tidy-macosx64.json index 8f19bddbed7a..aaba8800eb4c 100644 --- a/build/build-clang/clang-tidy-macosx64.json +++ b/build/build-clang/clang-tidy-macosx64.json @@ -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" + ] }