Proposal: configuration for cross compilation
David Nadlinger via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Tue May 6 05:01:20 PDT 2014
Hi Kai,
On 5 May 2014, at 12:37, Kai Nacke via digitalmars-d-ldc wrote:
> More and more people use LDC to cross-compile for other architectures.
> But end-to-end support is still missing.
We are in desperate need of improvements on this front, I agree. I have
been using various kludges to switch between environments and ldc2.conf
files when cross-compiling myself too. And this in fact should be an
area where LDC can really shine compared to e.g. GCC-based compilers,
which basically require a whole separate install per target.
> The lookup would sue the triple. The lookup order would be triple
> including environment, triple without environment, os only and
> default. The first entry matched is used. The config file would look
> like:
> […]
This looks like a good start. Two ideas:
- What format do you want to use for the config file? libconfig, like
we are doing right now? (I didn't know what to make of the missing
quotes in your example.)
- Do more specific keys always completely override what a more general
configuration group might contain? If yes, might there be situations
where this gets cumbersome? The example I'm thinking about here is a
possible future druntime version with different "ports" directories for
the platform specific files, as has been discussed in the past. In this
case, there might be an additional import path per platform, which
should just be added to the other list of locations. (The question would
be whether a facility to address this would be worth the added
complexity, though…)
Another topic we need to address after this has been finalized is how to
best integrate cross-compilation into the build process (this mainly
concerns building druntime/Phobos).
Glad to see progress on this front!
Best,
David
More information about the digitalmars-d-ldc
mailing list