summaryrefslogtreecommitdiffstats
path: root/build/build-clang/build-clang.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /build/build-clang/build-clang.py
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/build-clang/build-clang.py')
-rwxr-xr-xbuild/build-clang/build-clang.py12
1 files changed, 8 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"]