Folks, With some MacOS help from Nate, I've begun the conversion of LLVM to use lib/System, the operating system independence layer. Currently, the library has implementations for three abstractions: Path, Program, and Signals. These provide some basic utilities for manipulating file system paths, finding and executing programs, and cleaning up after Signals. The implementations should work on most Unix systems. Linux and MacOS are already verified. The implementation of the lib/System interface should work on Solaris, BSD, and perhaps a few other Unix systems. If you run into problems, please let me know. Right now, the only thing that should affect any tool other than llvmc is the RemoveFileOnSignal and PrintStackTraceOnErrorSignal functions. These have been moved out of lib/Support and into lib/System. Until I can get some hardware for each kind of system (should happen this fall), I would like to ask for volunteers to assist in the testing and porting of lib/System to: Darwin, Solaris 8/9, AIX, Cygwin, BSD 4.X and Win32 platforms. I would like to see LLVM some day soon run natively on Win32 platforms without the use of Cygwin. This requires a complete conversion of LLVM to use lib/System and then porting of lib/System to Win32. Does anyone want to volunteer for the port? My Win32 knowledge is pretty rusty (circa 1997). Can I get a volunteer on each platform? I was thinking: Darwin: Nate Solaris: Brian BSD: Vladimir M AIX: Misha ? Cygwin: ? Win32: ? *All* you need to do is notice when I make changes to lib/System and then update, reconfigure, and compile lib/System (as checked in), run the lib/System test suite, and send me the results. If anything breaks, I'll figure out what needs to change and patch it (for Unix systems). Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040829/dc109194/attachment.sig>
Hi Reid,> With some MacOS help from Nate, I've begun the conversion of LLVM to use > lib/System, the operating system independence layer. Currently, the > library has implementations for three abstractions: Path, Program, and > Signals.Did you consider using boost::filesystem for Path abstraction? See the documentation on: http://boost.org/libs/filesystem/doc/index.htm I'm not saying you should use it, but it's definitely worth looking at. After all, why design something which already exists? - Volodya
Hi Vladimir, The LLVM source base used to be dependent on boost but we have removed that dependency because it had a high cost for the relatively small portions of it that we needed. boost is a general purpose C++ library that happens to handle filesystem things in a somewhat portable way. However, lib/System will handle signals, memory mapped files, program execution, and several other things that boost does not provide. Additionally, as compilers go, we'll probably end up supporting some esoteric platforms (Interix is already on the way) that boost does not support. I imagine that if we need more of the kinds of things boost provides that we should revisit our design goal to remove boost from LLVM but I don't think we're there yet. Reid. On Sun, 2004-08-29 at 23:08, Vladimir Prus wrote:> Hi Reid, > > > With some MacOS help from Nate, I've begun the conversion of LLVM to use > > lib/System, the operating system independence layer. Currently, the > > library has implementations for three abstractions: Path, Program, and > > Signals. > > Did you consider using boost::filesystem for Path abstraction? See the > documentation on: > > http://boost.org/libs/filesystem/doc/index.htm > > I'm not saying you should use it, but it's definitely worth looking at. After > all, why design something which already exists? > > - Volodya > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040829/9abd8b90/attachment.sig>
Reid Spencer wrote:> Folks, > > With some MacOS help from Nate, I've begun the conversion of LLVM to use > lib/System, the operating system independence layer.FYI, I'm getting this on an up-to-date tree: Compiling Path.cpp In file included from platform/Path.cpp:20, from Path.cpp:37: platform/../Unix/Path.cpp: In static member function `static llvm::sys::Path llvm::sys::Path::GetTemporaryDirectory()': platform/../Unix/Path.cpp:54: error: `assert' undeclared (first use this function) I think you need to include assert.h in Path.cpp. - Volodya
Vladimir Merzliakov
2004-Aug-30 11:56 UTC
[LLVMdev] lib/System Unleashed - Need Your Help!
After update LLVM compile break with errors at FreeBSD 5.1 You can see log at night tester http://npt.cc.rsu.ru/testresults-X86-FreeBSD/index.html If you need additional information i will be glad provide it. Vladimir
I'll have to look at this tonight when I have some time. I'll make whatever adjustments need to be done for BSD. Thanks for the feedback, Vladimir! Reid. On Mon, 2004-08-30 at 04:56, Vladimir Merzliakov wrote:> After update LLVM compile break with errors at FreeBSD 5.1 > > You can see log at night tester > http://npt.cc.rsu.ru/testresults-X86-FreeBSD/index.html > > If you need additional information i will be glad provide it. > > Vladimir > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040830/81b8f770/attachment.sig>
I added the #include to Unix.h. Hopefully that will solve the problem on all platforms. Thanks, Reid. On Mon, 2004-08-30 at 00:24, Vladimir Prus wrote:> Reid Spencer wrote: > > Folks, > > > > With some MacOS help from Nate, I've begun the conversion of LLVM to use > > lib/System, the operating system independence layer. > > FYI, I'm getting this on an up-to-date tree: > > Compiling Path.cpp > In file included from platform/Path.cpp:20, > from Path.cpp:37: > platform/../Unix/Path.cpp: In static member function `static llvm::sys::Path > llvm::sys::Path::GetTemporaryDirectory()': > platform/../Unix/Path.cpp:54: error: `assert' undeclared (first use this > function) > > I think you need to include assert.h in Path.cpp. > > - Volodya > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040830/648da300/attachment.sig>