@@ -988,7 +988,6 @@ function Build-CMakeProject {
988
988
}
989
989
990
990
TryAdd- KeyValue $Defines CMAKE_BUILD_TYPE Release
991
- TryAdd- KeyValue $Defines CMAKE_MT " mt"
992
991
993
992
$CFlags = @ ()
994
993
switch ($Platform ) {
@@ -1411,6 +1410,8 @@ function Build-BuildTools($Arch) {
1411
1410
- BuildTargets llvm- tblgen, clang- tblgen, clang- pseudo- gen, clang- tidy- confusable- chars- gen, lldb- tblgen, llvm- config, swift- def- to- strings- converter, swift- serialize- diagnostics, swift- compatibility- symbols `
1412
1411
- Defines @ {
1413
1412
CMAKE_CROSSCOMPILING = " NO" ;
1413
+ CLANG_ENABLE_LIBXML2 = " NO" ;
1414
+ LLDB_ENABLE_LIBXML2 = " NO" ;
1414
1415
LLDB_ENABLE_PYTHON = " NO" ;
1415
1416
LLDB_INCLUDE_TESTS = " NO" ;
1416
1417
LLDB_ENABLE_SWIFT_SUPPORT = " NO" ;
@@ -1509,7 +1510,9 @@ function Build-Compilers() {
1509
1510
- Defines ($TestingDefines + @ {
1510
1511
CLANG_TABLEGEN = (Join-Path - Path $BuildTools - ChildPath " clang-tblgen.exe" );
1511
1512
CLANG_TIDY_CONFUSABLE_CHARS_GEN = (Join-Path - Path $BuildTools - ChildPath " clang-tidy-confusable-chars-gen.exe" );
1513
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
1512
1514
CMAKE_Swift_FLAGS = $SwiftFlags ;
1515
+ LibXml2_DIR = " $LibraryRoot \libxml2-2.11.5\usr\lib\Windows\$ ( $Arch.LLVMName ) \cmake\libxml2-2.11.5" ;
1513
1516
LLDB_PYTHON_EXE_RELATIVE_PATH = " python.exe" ;
1514
1517
LLDB_PYTHON_EXT_SUFFIX = " .pyd" ;
1515
1518
LLDB_PYTHON_RELATIVE_PATH = " lib/site-packages" ;
@@ -1932,14 +1935,9 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
1932
1935
- Defines (@ {
1933
1936
ENABLE_TESTING = " NO" ;
1934
1937
FOUNDATION_BUILD_TOOLS = if ($Platform -eq " Windows" ) { " YES" } else { " NO" };
1938
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
1935
1939
CURL_DIR = " $LibraryRoot \curl-8.9.1\usr\lib\$Platform \$ShortArch \cmake\CURL" ;
1936
- LIBXML2_LIBRARY = if ($Platform -eq " Windows" ) {
1937
- " $LibraryRoot \libxml2-2.11.5\usr\lib\$Platform \$ShortArch \libxml2s.lib" ;
1938
- } else {
1939
- " $LibraryRoot \libxml2-2.11.5\usr\lib\$Platform \$ShortArch \libxml2.a" ;
1940
- };
1941
- LIBXML2_INCLUDE_DIR = " $LibraryRoot \libxml2-2.11.5\usr\include\libxml2" ;
1942
- LIBXML2_DEFINITIONS = " -DLIBXML_STATIC" ;
1940
+ LibXml2_DIR = " $LibraryRoot \libxml2-2.11.5\usr\lib\$Platform \$ShortArch \cmake\libxml2-2.11.5" ;
1943
1941
ZLIB_LIBRARY = if ($Platform -eq " Windows" ) {
1944
1942
" $LibraryRoot \zlib-1.3.1\usr\lib\$Platform \$ShortArch \zlibstatic.lib"
1945
1943
} else {
@@ -2780,13 +2778,15 @@ if (-not $SkipBuild) {
2780
2778
Invoke-BuildStep Build-CMark $BuildArch
2781
2779
Invoke-BuildStep Build-BuildTools $BuildArch
2782
2780
if ($IsCrossCompiling ) {
2781
+ Invoke-BuildStep Build-XML2 Windows $BuildArch
2783
2782
Invoke-BuildStep Build-Compilers - Build $BuildArch
2784
2783
}
2785
2784
if ($IncludeDS2 ) {
2786
2785
Invoke-BuildStep Build-RegsGen2 $BuildArch
2787
2786
}
2788
2787
2789
2788
Invoke-BuildStep Build-CMark $HostArch
2789
+ Invoke-BuildStep Build-XML2 Windows $HostArch
2790
2790
Invoke-BuildStep Build-Compilers $HostArch
2791
2791
}
2792
2792
0 commit comments