diff options
Diffstat (limited to 'build/build-clang/build-clang.py')
-rwxr-xr-x | build/build-clang/build-clang.py | 12 |
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"] |