David Chisnall
2015-Jan-12 19:18 UTC
[LLVMdev] RFC: Another go at a cross compiler config file.
Hi, Did this make it into review / commit? It's probably too late for 3.6 if it didn't, but I'd love to see it in 3.7. It would also be nice if this support could be something a bit more general in LLVM, rather than specifically in clang, so that other llvm tools (e.g. llvm-objdump) could take advantage of a similar format for target description files if they need something more than just the triple argument. David> On 15 Sep 2014, at 13:09, Richard Pennington <rich at pennware.com> wrote: > > I've updated my blog with the current state of my compilation configuration prototype. http://ellcc.org/blog/?p=13246 > Again, any comments/criticisms greatly appreciated. > > -Rich > > On 09/05/2014 09:23 PM, Richard Pennington wrote: >> A while back (2012) there were a few messages related to using YAML config files to set up how clang would build stuff, especially for cross compilers. My ELLCC project is entirely cross compilation focused, so today I decided to play around with the config file idea. Right now it only handles replacing a "-target foo" option with the options defined in the file foo in the resource/config directory, but I think it has potential for doing quite a bit more. >> >> I describe it a little more on my blog at http://ellcc.org/blog/?p=11877 >> >> Any comments/criticisms would be greatly appreciated. >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Richard Pennington
2015-Jan-12 22:58 UTC
[LLVMdev] RFC: Another go at a cross compiler config file. (with an example using clang to compile for Windows on Linux)
On 01/12/2015 01:18 PM, David Chisnall wrote:> Hi, > > Did this make it into review / commit? It's probably too late for 3.6 if it didn't, but I'd love to see it in 3.7. It would also be nice if this support could be something a bit more general in LLVM, rather than specifically in clang, so that other llvm tools (e.g. llvm-objdump) could take advantage of a similar format for target description files if they need something more than just the triple argument. > > David >Hi David, When I posted that there wasn't a lot of enthusiasm for the approach. I am using it but people thought it would complicate the driver and didn't like the fact that a file might need to be read each time the compiler is invoked (it doesn't really require that a file be read, the YAML can be compiled in, but anyway). I still think the approach is useful, so after I saw your post I made another example that makes clang a Windows cross compiler using the MinGW linker and libraries. I've posted it here: http://ellcc.org/blog/?p=23077 I like the idea of making it more general and allowing it to be used for other LLVM utilities. -Rich
David Chisnall
2015-Jan-13 09:46 UTC
[LLVMdev] [cfe-dev] RFC: Another go at a cross compiler config file. (with an example using clang to compile for Windows on Linux)
On 12 Jan 2015, at 22:58, Richard Pennington <rich at pennware.com> wrote:> > When I posted that there wasn't a lot of enthusiasm for the approach. I am using it but people thought it would complicate the driver and didn't like the fact that a file might need to be read each time the compiler is invoked (it doesn't really require that a file be read, the YAML can be compiled in, but anyway).I probably wouldn't want it to be required, but reading one extra file is not likely to be a major performance issue when compiling C code, because (at least until modules are ubiquitous) you're likely to be reading a load of C files anyway. It seems a shame currently that we build clang, which is intrinsically a cross-compiler, but actually using it as such with existing build systems is often painful because certain CFLAGS must be inserted into every call at a specific place to make sure that it picks up the right things. Once you have something that's ready for general review, I'd be happy to take a look. David