Files to lib/System/Win32

From: Jeff Cohen <jeffc@jolt-lang.org>
Date: Mon, 13 Sep 2004 21:24:47 -0700

But there are some issues with System I'm going to have to take care of
besides using Win32. There appears to be some Unix assumptions like the
presence of /etc or the HOME environment variable. Neither have any
true equivalent in Windows.

Will be fixed in a working LLVM on mingw.

Henrik

And how does it do this? By emulating Unix.

I don't know why you insist mingw isn't emulating Unix. How else would
you describe software that allows Unix source to run on Windows with
little or no change?

Would you ever use mingw to create software that runs only on Windows
and never on Unix?

I think the $HOME and /etc assumptions are very limited in nature. Most of us who use LLVM every day here at UIUC don't need to bother installing anything in $HOME or /etc, and so they shouldn't be considered a major stumbling block for building a version of LLVM that runs on Windows, no matter how it is done or what libraries it is linked with.

Making it possible to build LLVM on mingw is a fine idea, and it has the added benefit of allowing us to reduce the dependencies on Unix/Linux libraries gradually. It seems likely that we'll want a non-mingw build at some point, but I don't see how they need to be mutually exclusive.

Patches are, as always, welcome.

Can we put this issue to rest?

I stated in a previous email that the interfaces that expose $HOME and /etc will be removed from lib/System. They will be replaced with a "getConfigFile" function that does the right thing on a given platform. If that means looking in the user's home directory or /etc/llvm on Unix, that's fine. If it means looking in C:\Program Files\LLVM\Config, that's fine too. The point I'm making is that exposing the notions of a system configuration directory (/etc) or a user's home directory ($HOME) are too low level for lib/System. What's really needed is platform-specific ways to find configuration files in standard places, regardless of what that standard is.

Reid.

Brian Gaeke wrote: