summaryrefslogtreecommitdiffstats
path: root/build/build-clang
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /build/build-clang
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/build-clang')
-rwxr-xr-xbuild/build-clang/build-clang.py12
-rw-r--r--build/build-clang/clang-17.json1
-rw-r--r--build/build-clang/llvmorg-18-init-8471-g160e8eb44961.patch31
3 files changed, 40 insertions, 4 deletions
diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py
index 08e05483f5..03521a333e 100755
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -251,10 +251,7 @@ def build_one_stage(
cmake_args.append("-DLLVM_ENABLE_PROJECTS=%s" % ";".join(projects))
- # There is no libxml2 on Windows except if we build one ourselves.
- # libxml2 is only necessary for llvm-mt, but Windows can just use the
- # native MT tool.
- if not is_windows(target) and is_final_stage:
+ if is_final_stage:
cmake_args += ["-DLLVM_ENABLE_LIBXML2=FORCE_ON"]
if is_linux(target) and is_final_stage:
sysroot = os.path.join(os.environ.get("MOZ_FETCHES_DIR", ""), "sysroot")
@@ -277,6 +274,13 @@ def build_one_stage(
f"-DLLVM_WINSYSROOT={os.environ['VSINSTALLDIR']}",
"-DLLVM_DISABLE_ASSEMBLY_FILES=ON",
]
+ if is_final_stage:
+ fetches = os.environ["MOZ_FETCHES_DIR"]
+ cmake_args += [
+ "-DLIBXML2_DEFINITIONS=-DLIBXML_STATIC",
+ f"-DLIBXML2_INCLUDE_DIR={fetches}/libxml2/include/libxml2",
+ f"-DLIBXML2_LIBRARIES={fetches}/libxml2/lib/libxml2s.lib",
+ ]
else:
# libllvm as a shared library is not supported on Windows
cmake_args += ["-DLLVM_LINK_LLVM_DYLIB=ON"]
diff --git a/build/build-clang/clang-17.json b/build/build-clang/clang-17.json
index 960c7c6754..1e941aac77 100644
--- a/build/build-clang/clang-17.json
+++ b/build/build-clang/clang-17.json
@@ -11,6 +11,7 @@
"revert-llvmorg-16-init-11301-g163bb6d64e5f_clang_17.patch",
"revert-llvmorg-15-init-13446-g7524fe962e47.patch",
"revert-llvmorg-15-init-11205-gcead4eceb01b_clang_16.patch",
+ "llvmorg-18-init-8471-g160e8eb44961.patch",
"D146664.patch",
"win64-ret-null-on-commitment-limit_clang_14.patch",
"compiler-rt-rss-limit-heap-profile.patch"
diff --git a/build/build-clang/llvmorg-18-init-8471-g160e8eb44961.patch b/build/build-clang/llvmorg-18-init-8471-g160e8eb44961.patch
new file mode 100644
index 0000000000..fcd170919c
--- /dev/null
+++ b/build/build-clang/llvmorg-18-init-8471-g160e8eb44961.patch
@@ -0,0 +1,31 @@
+From 160e8eb4496104a1d0ed77649af7e8bb679252f9 Mon Sep 17 00:00:00 2001
+From: nicole mazzuca <nicole@strega-nil.co>
+Date: Fri, 13 Oct 2023 08:47:23 -0700
+Subject: [PATCH] [ASan] Recognize lea r10, [rip + XX] (#68910)
+
+This instruction is present in memcpy in the latest vcruntime
+
+This PR has been opened for @AndrewDeanMS (a teammate inside Microsoft)
+who made the PR to our internal branch.
+
+Co-authored-by: Andrew Dean <Andrew.Dean@microsoft.com>
+---
+ compiler-rt/lib/interception/interception_win.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
+index d57afa3fda7b..1b681ada37b1 100644
+--- a/compiler-rt/lib/interception/interception_win.cpp
++++ b/compiler-rt/lib/interception/interception_win.cpp
+@@ -624,7 +624,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
+ // mov rax, QWORD PTR [rip + XXXXXXXX]
+ case 0x25ff48: // 48 ff 25 XX XX XX XX :
+ // rex.W jmp QWORD PTR [rip + XXXXXXXX]
+-
++ case 0x158D4C: // 4c 8d 15 XX XX XX XX : lea r10, [rip + XX]
+ // Instructions having offset relative to 'rip' need offset adjustment.
+ if (rel_offset)
+ *rel_offset = 3;
+--
+2.44.0.1.g9765aa7075
+