How to set the linker ldmd2 LTS uses.
Georgi D via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Fri Mar 3 14:10:37 PST 2017
On Friday, 3 March 2017 at 21:39:55 UTC, David Nadlinger wrote:
> On Friday, 3 March 2017 at 21:35:13 UTC, Georgi D wrote:
>> How can I specify the gcc location on the command line or in
>> the environment?
>
> You should be able to use the CC environment variable. There is
> a hidden `gcc` switch as well, but I don't think we ever
> officially documented it.
>
> — David
One more question:
Is it possible to have paths relative to the compiler executable
in ldc.conf?
This is important to me because in my environment the compiler is
build in a build farm and then downloaded as part of the build
process to the local machine and used. So the ldc.conf generated
during compilation would contain paths to the build farm machine
which are not usable locally.
It would be great if ldc.conf could look like this:
```
// This configuration file uses libconfig.
// See http://www.hyperrealm.com/libconfig/ for syntax details.
// The default group is required
default:
{
// 'switches' holds array of string that are appends to
the command line
// arguments before they are parsed.
switches = [
"-I${__LDC_BIN}/../include/d/ldc",
"-I${__LDC_BIN}/../include/d",
"-L-L${__LDC_BIN}/../lib",
"-defaultlib=phobos2-ldc,druntime-ldc",
"-debuglib=phobos2-ldc-debug,druntime-ldc-debug"
];
};
```
I see that ldmd2 looks for ldc.conf relative to its binary
location already.
Thanks,
More information about the digitalmars-d-ldc
mailing list