Hi When using lli on Win32 (vs.net-built), on any non-trivial code, I get the following abort ERROR: Program used external function '_alloca' which could not be resolved! Checking the assembly from llc, the first alloca call is to allocate local vars in _main. Is this just the state of the code at 2.0 when built with vs.net, or is there something that I've managed to mis-build locally? thanks, scott -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070624/8f56f114/attachment.html>
The alloca CRT function isn't directly supported on windows, although I do have some code somewhere that makes it work. Basically I implemented my own stack alloc functions by using code from the CRT. On 6/24/07, Scott Graham <scott.llvm at h4ck3r.net> wrote:> > Hi > > When using lli on Win32 (vs.net-built), on any non-trivial code, I get the > following abort > > ERROR: Program used external function '_alloca' which could not be > resolved! > > Checking the assembly from llc, the first alloca call is to allocate local > vars in _main. Is this just the state of the code at 2.0 when built with > vs.net, or is there something that I've managed to mis-build locally? > > thanks, > scott > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070624/7640f7ef/attachment.html>
Interesting enough, I am getting exactly the same error for my just-built LLVM-2.0 on WinXP/Cygwin, after the trivial patching on Function.cpp:271. This same error message shows up when I was trying to run HelloWorld.c version to verify my install: "lli hello.bc" "Error, Program used external function _alloca which could not be resolved!" I checked the document, but didn't seem to find a hit. I feel I might be missing an environment setup, so I tried to put $LLVMINSTALLDIR/lib onto LD_LIBRARY_PATH and/or path, neither worked. Any suggestion? Thank you Chuck Scott Graham wrote:> Hi > > When using lli on Win32 (vs.net-built), on any non-trivial code, I get > the following abort > > ERROR: Program used external function '_alloca' which could not be > resolved! > > Checking the assembly from llc, the first alloca call is to allocate > local vars in _main. Is this just the state of the code at 2.0 when > built with vs.net <http://vs.net>, or is there something that I've > managed to mis-build locally? > > thanks, > scott > ------------------------------------------------------------------------ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >