[LLVMdev] LLVM on MinGW
Anton Korobeynikov
asl at math.spbu.ru
Thu Nov 29 08:04:25 PST 2007
Alain,
> Thanks. However, I'm specifically interested in using the MinGW compiler
> shipped with Cygwin (i.e. "gcc -mno-cygwin") and using Cygwin tools
> (make, ...). Of course, I could probably install MSYS/MinGW just to
> compile LLVM and produce the libraries.
The short answer is: don't use cygwin shell with mingw compiler to build
LLVM. Reason actually is: LLVM uses tablgen in it's build process.
Tablegen is compiled with mingw for you, thus it won't work in cygwin
shell without some extra hacks.
There are two possibilities:
1. Use the hack used to cross-compilation of LLVM. In this case you'll
need cygwin-built tablgen. However, this won't work out-of-the-box,
because both tablegens will share the same extension. This process is
described in http://llvm.org/docs/GettingStarted.html#cross-compile
2. Feed all the paths to tablegen via cygdrive program. In this case
you'll need to tweak build system in several places:
- Detect, if you're really building mingw-on-cygwin
- Detect, where cygpath is located
- Feed paths provided to tablegen via cygdrive
There probably is possibility, that paths in some other places need to
be handled in the same fashion.
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.
More information about the llvm-dev
mailing list