New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate Operating System Abstraction Layer #723
Comments
A couple other notes on this:
|
In fact, what I would like to see is libsystem depend only on the OS (it is -Chris |
Agreed. |
While we're at it, there are a number of abstract data types (SetVector, Reid. |
This work has been started. There is now an include/llvm/System and lib/System |
This is making a lot of progress now. Do you know what specific things are -Chris |
This bug can only be closed when the entie LLVM source base has been converted My guess: we're about 10-15% of the way there. |
Ok, sounds good. Thanks Reid! |
This is currently started but not finished. We're about 25% done. There are more |
*** Bug #722 has been marked as a duplicate of this bug. *** |
This is currently about 90% done. Only three tools remain that are unportable: |
Here are the remaining non-portable headers that LLVM includes as of this date. lib/Debugger/UnixLocalInferiorProcess.cpp:39:#include <unistd.h> |
A proposed patch for making bugpoint portable |
Decision: llvm-db will not be ported to Windows. The forthcoming support for DWARF and |
bugpoint has been made platform independent with these patches: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20051219/030355.html |
Decisions: (2) The ifdef'd code in the JIT to resolve symbols in libc_nonshared.a will also Consequently, this bug is finished. New portability bugs should receive their |
Extended Description
Although LLVM purposely doesn't use much of an operating system's functionality,
it does use some and its current implementation is somewhat Unix and Linux
specific. The purpose of this is to create a "System" module that will hide all
operating system dependencies from LLVM. Specifically this will involve:
include/llvm/System
A set of header files that provide C++ abstractions like Path, File, Directory,
Shared Object (Dynamic Link Library), Process, Mutex, Guard, Thread (maybe), and
abstractions for other operating system objects used by LLVM. Only those
abstractions actually used by LLVM will be included.
lib/System
Implementation of the abstractions. The design will be based on the operating
system abstraction layer in XPS. This design enforces that (a) there will be
zero visibility of operating system specific header files through the interface
(STL header excepted), (b) the abstractions will be provided in C++ classes that
allocate no memory so they are suitable for quick allocation on the stack, (c)
there are no polymorphic methods, (d) implementation of operating system
specific methods is in operating system specific sub-directories, (e) methods
throw no exceptions and are declared with throw() to enforce this, (f) operating
system error handling will be coalesced into a very lightweight ErrorCode object
that can assist with interpretation of the error. Most of these requirements are
aimed at making the abstraction layer very light weight but providing complete
sheilding of LLVM from the operating system.
The initial implementation will be for Linux. A second implementation based
on the Apache Portable Runtime is planned. Chris volunteered to implement the
win32 implementation. We'll need Mac OS X and Solaris implementations as well
which I will plagarize from the Linux implementation because of similarities.
However, someone with those platforms will have to actually compile and
implement the abstractions for those platforms because I don't have them (yet!)
Conversion of LLVM won't happen until all needed platforms pass a battery of
tests to ensure that the System library functions correctly on each platform.
The text was updated successfully, but these errors were encountered: