Bug 1415568 - Support applying patches to Windows clang. r=froydnj
This commit is contained in:
@@ -456,15 +456,15 @@ if __name__ == "__main__":
|
|||||||
for p in config.get("patches", []):
|
for p in config.get("patches", []):
|
||||||
patch(p, source_dir)
|
patch(p, source_dir)
|
||||||
|
|
||||||
symlinks = [(source_dir + "/clang",
|
symlinks = [(clang_source_dir,
|
||||||
llvm_source_dir + "/tools/clang"),
|
llvm_source_dir + "/tools/clang"),
|
||||||
(source_dir + "/extra",
|
(extra_source_dir,
|
||||||
llvm_source_dir + "/tools/clang/tools/extra"),
|
llvm_source_dir + "/tools/clang/tools/extra"),
|
||||||
(source_dir + "/compiler-rt",
|
(compiler_rt_source_dir,
|
||||||
llvm_source_dir + "/projects/compiler-rt"),
|
llvm_source_dir + "/projects/compiler-rt"),
|
||||||
(source_dir + "/libcxx",
|
(libcxx_source_dir,
|
||||||
llvm_source_dir + "/projects/libcxx"),
|
llvm_source_dir + "/projects/libcxx"),
|
||||||
(source_dir + "/libcxxabi",
|
(libcxxabi_source_dir,
|
||||||
llvm_source_dir + "/projects/libcxxabi")]
|
llvm_source_dir + "/projects/libcxxabi")]
|
||||||
for l in symlinks:
|
for l in symlinks:
|
||||||
# On Windows, we have to re-copy the whole directory every time.
|
# On Windows, we have to re-copy the whole directory every time.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"cc": "cl.exe",
|
"cc": "cl.exe",
|
||||||
"cxx": "cl.exe",
|
"cxx": "cl.exe",
|
||||||
"patches": [
|
"patches": [
|
||||||
"build/src/build/build-clang/msvc-host-x64.patch",
|
"msvc-host-x64.patch",
|
||||||
"build/src/build/build-clang/loosen-msvc-detection.patch"
|
"loosen-msvc-detection.patch"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,6 @@
|
|||||||
"cxx": "cl.exe",
|
"cxx": "cl.exe",
|
||||||
"ml": "ml64.exe",
|
"ml": "ml64.exe",
|
||||||
"patches": [
|
"patches": [
|
||||||
"build/src/build/build-clang/loosen-msvc-detection.patch"
|
"loosen-msvc-detection.patch"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,11 +47,13 @@ EOF
|
|||||||
set +x
|
set +x
|
||||||
|
|
||||||
BUILD_CLANG_DIR=build/src/build/build-clang
|
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
|
set -x
|
||||||
|
|
||||||
# Put a tarball in the artifacts dir
|
# Put a tarball in the artifacts dir
|
||||||
UPLOAD_PATH=public/build
|
UPLOAD_PATH=public/build
|
||||||
mkdir -p ${UPLOAD_PATH}
|
mkdir -p ${UPLOAD_PATH}
|
||||||
cp clang*.tar.* ${UPLOAD_PATH}
|
cp ${BUILD_CLANG_DIR}/clang*.tar.* ${UPLOAD_PATH}
|
||||||
|
|||||||
@@ -46,11 +46,14 @@ EOF
|
|||||||
set +x
|
set +x
|
||||||
|
|
||||||
BUILD_CLANG_DIR=build/src/build/build-clang
|
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
|
set -x
|
||||||
|
|
||||||
# Put a tarball in the artifacts dir
|
# Put a tarball in the artifacts dir
|
||||||
UPLOAD_PATH=public/build
|
UPLOAD_PATH=public/build
|
||||||
mkdir -p ${UPLOAD_PATH}
|
mkdir -p ${UPLOAD_PATH}
|
||||||
cp clang*.tar.* ${UPLOAD_PATH}
|
cp ${BUILD_CLANG_DIR}/clang*.tar.* ${UPLOAD_PATH}
|
||||||
|
|||||||
Reference in New Issue
Block a user