Bug 1415568 - Support applying patches to Windows clang. r=froydnj
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Wed, 08 Nov 2017 17:23:12 +0100
changeset 444092 a06f5967bcb6d135c7283e0cc9adab5ddb3442a3
parent 444091 cc25abc4eab682a2c9881cf0d81343bc28ef34f0
child 444093 69e828da2238c01a3ab7c449d8c13b23792a7555
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1415568
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1415568 - Support applying patches to Windows clang. r=froydnj
build/build-clang/build-clang.py
build/build-clang/clang-win32.json
build/build-clang/clang-win64.json
taskcluster/scripts/misc/build-clang-windows-helper32.sh
taskcluster/scripts/misc/build-clang-windows-helper64.sh
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -451,25 +451,25 @@ if __name__ == "__main__":
     checkout_or_update(libcxx_repo, libcxx_source_dir)
     if libcxxabi_repo:
         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", []):
         patch(p, source_dir)
 
-    symlinks = [(source_dir + "/clang",
+    symlinks = [(clang_source_dir,
                  llvm_source_dir + "/tools/clang"),
-                (source_dir + "/extra",
+                (extra_source_dir,
                  llvm_source_dir + "/tools/clang/tools/extra"),
-                (source_dir + "/compiler-rt",
+                (compiler_rt_source_dir,
                  llvm_source_dir + "/projects/compiler-rt"),
-                (source_dir + "/libcxx",
+                (libcxx_source_dir,
                  llvm_source_dir + "/projects/libcxx"),
-                (source_dir + "/libcxxabi",
+                (libcxxabi_source_dir,
                  llvm_source_dir + "/projects/libcxxabi")]
     for l in symlinks:
         # On Windows, we have to re-copy the whole directory every time.
         if not is_windows() and os.path.islink(l[1]):
             continue
         delete(l[1])
         if os.path.exists(l[0]):
             symlink(l[0], l[1])
--- a/build/build-clang/clang-win32.json
+++ b/build/build-clang/clang-win32.json
@@ -7,12 +7,12 @@
     "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
     "clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
     "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": [
-      "build/src/build/build-clang/msvc-host-x64.patch",
-      "build/src/build/build-clang/loosen-msvc-detection.patch"
+      "msvc-host-x64.patch",
+      "loosen-msvc-detection.patch"
     ]
 }
--- a/build/build-clang/clang-win64.json
+++ b/build/build-clang/clang-win64.json
@@ -8,11 +8,11 @@
     "clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
     "python_path": "c:/mozilla-build/python/python.exe",
     "cc": "cl.exe",
     "cxx": "cl.exe",
     "ml": "ml64.exe",
     "patches": [
-      "build/src/build/build-clang/loosen-msvc-detection.patch"
+      "loosen-msvc-detection.patch"
     ]
 }
--- a/taskcluster/scripts/misc/build-clang-windows-helper32.sh
+++ b/taskcluster/scripts/misc/build-clang-windows-helper32.sh
@@ -42,16 +42,18 @@ MOZCONFIG="$(pwd)/mozconfig"
 cat > ${MOZCONFIG} <<EOF
 mk_add_options MOZ_OBJDIR=$(pwd)/objdir
 EOF
 
 # gets a bit too verbose here
 set +x
 
 BUILD_CLANG_DIR=build/src/build/build-clang
-MOZCONFIG=${MOZCONFIG} build/src/mach python ${BUILD_CLANG_DIR}/build-clang.py -c ${BUILD_CLANG_DIR}/${1}
+cd ${BUILD_CLANG_DIR}
+MOZCONFIG=${MOZCONFIG} ../../mach python ./build-clang.py -c ./${1}
+cd -
 
 set -x
 
 # Put a tarball in the artifacts dir
 UPLOAD_PATH=public/build
 mkdir -p ${UPLOAD_PATH}
-cp clang*.tar.* ${UPLOAD_PATH}
+cp ${BUILD_CLANG_DIR}/clang*.tar.* ${UPLOAD_PATH}
--- a/taskcluster/scripts/misc/build-clang-windows-helper64.sh
+++ b/taskcluster/scripts/misc/build-clang-windows-helper64.sh
@@ -41,16 +41,19 @@ MOZCONFIG="$(pwd)/mozconfig"
 cat > ${MOZCONFIG} <<EOF
 mk_add_options MOZ_OBJDIR=$(pwd)/objdir
 EOF
 
 # gets a bit too verbose here
 set +x
 
 BUILD_CLANG_DIR=build/src/build/build-clang
-MOZCONFIG=${MOZCONFIG} build/src/mach python ${BUILD_CLANG_DIR}/build-clang.py -c ${BUILD_CLANG_DIR}/${1}
+cd ${BUILD_CLANG_DIR}
+MOZCONFIG=${MOZCONFIG} ../../mach python ./build-clang.py -c ./${1}
+cd -
+
 
 set -x
 
 # Put a tarball in the artifacts dir
 UPLOAD_PATH=public/build
 mkdir -p ${UPLOAD_PATH}
-cp clang*.tar.* ${UPLOAD_PATH}
+cp ${BUILD_CLANG_DIR}/clang*.tar.* ${UPLOAD_PATH}