我当前正在尝试通过Cygwin在Windows上构建LLVM 3.3。
编译过程顺利,但是在链接时出现了崩溃,并显示以下错误:
编译过程顺利,但是在链接时出现了崩溃,并显示以下错误:
llvm[2]: ======= Finished Linking Release+Asserts Executable llvm-mc (without symbols)
make[2]: Leaving directory `/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/tools/llvm-mc'
llvm[2]: Compiling ExecutionDriver.cpp for Release+Asserts build
/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o):SectionMemoryManager.cpp:(.text+0x3b): référence indéfinie vers « __register_frame »
/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o):SectionMemoryManager.cpp:(.text+0x3b): relocalisation tronquée pour concorder avec la taille: R_X86_64_PC32 vers le symbole indéfini __register_frame
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o): mauvaise adresse de relocalisation 0x0 dans la section «.pdata»
In English:
undefined reference to "__register_frame
relocation truncated to concord with size: R_X*^_^$_PC32 to undefined symbol __register_frame
wrong relocation address in 0x0 in section ".pdata"
我用以下命令构建llvm:
$ mkdir build
$ cd build
$ ../configure LDFLAGS=-Wl,--stack,16777216 --disable-jit --enable-targets=host-only
$ make -j4
LDFLAGS
选项来自win64平台的llvm 入门指南。我尝试禁用jit,因为似乎是libLLVMCJIT出了问题。
您有什么想法会导致此构建失败吗?