Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Habersack <grendel@twistedcode.net>2018-10-25 01:24:09 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2018-10-25 01:24:09 +0300
commitadeaf3e033015aa58d29548b59560d8665138e7a (patch)
tree24d172c025aec7976705d07fe8b086660dcd14a2
parent32d1539629f2be825e18153097a0b8b9501d2e32 (diff)
[SDKS, LLVM] Disable detection and use of libxml2 (#11341)
Mono doesn't use libxml2 and neither do the LLVM bits used by Mono when building the AOT cross-compilers. Presence of `-lxml2` on the command line breaks 32-bit builds on 64-bit Linux hosts: libtool: link: cc -shared -fPIC -DPIC -Wl,--whole-archive ./.libs/libmini.a ./.libs/libmono-ee-interp.a ./.libs/libmono-dbg.a ../../mono/metadata/.libs/libmonoruntimesgen.a ../../mono/sgen/.libs/libmonosgen.a ../../mono/utils/.libs/libmonoutils.a ../../mono/eglib/.libs/libeglib.a -Wl,--no-whole-archive -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -L$HOME/xamarin-android/external/mono/sdks/out/llvm-llvm32/lib -lz -ltinfo -lxml2 -lstdc++ -lm -lrt -ldl -lpthread -O0 -ggdb3 -m32 -g -mno-tls-direct-seg-refs -Wl,-export-dynamic -Wl,-soname -Wl,libmonosgen-2.0.so.1 -o .libs/libmonosgen-2.0.so.1.0.0 mv -f .deps/libmini_la-aot-runtime-wasm.Tpo .deps/libmini_la-aot-runtime-wasm.Plo /usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libxml2.so when searching for -lxml2 /usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libxml2.a when searching for -lxml2 /usr/bin/ld: cannot find -lxml2 collect2: error: ld returned 1 exit status make[7]: *** [Makefile:1495: libmonosgen-2.0.la] Error 1 Installation of `libxml2-dev` (on Ubuntu/Debian + friends) for the x86 architecture (or x86_64 architecture on 32-bit host) would be possible but then it would break the 64-bit build because the 64-bit version of the library would be absent. It would be a problem if Mono+LLVM actually used xml2, but since it doesn't we can just disable the feature completely.
-rw-r--r--sdks/builds/llvm.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/sdks/builds/llvm.mk b/sdks/builds/llvm.mk
index ab588b73a6b..aa34c47aaaf 100644
--- a/sdks/builds/llvm.mk
+++ b/sdks/builds/llvm.mk
@@ -16,12 +16,14 @@ $(TOP)/sdks/builds/toolchains/llvm36:
$(LLVM36_SRC)/configure: | $(LLVM36_SRC)
# Compile only a subset of tools to speed up the build and avoid building tools which use threads since they don't build on mxe
+# -DLLVM_ENABLE_LIBXML2=OFF is needed because xml2 is not used and it breaks 32-bit builds on 64-bit Linux hosts
llvm_CMAKE_FLAGS = \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
-DLLVM_BUILD_TESTS=Off -DLLVM_INCLUDE_TESTS=Off \
-DLLVM_BUILD_EXAMPLES=Off -DLLVM_INCLUDE_EXAMPLES=Off \
-DLLVM_TOOLS_TO_BUILD="opt;llc;llvm-config;llvm-dis" \
+ -DLLVM_ENABLE_LIBXML2=Off \
$(if $(NINJA),-G Ninja,)
##