Wish: implement %ldccurrentpath% variable for ldc2.conf
denizzzka opened this issue · 3 comments
denizzzka commented
This would allow to make few standalone standard libraries versions and switch them by selecting desired config file containing compiler options and relative paths to all necessary things
(I can implement this, of course)
kinke commented
With which semantics?
denizzzka commented
Let's say make a d-stdlibs-freertos
dir containing library files (in lib/
), imports (in import/
) and ldc2.conf
configuration file in root:
default:
{
switches = [
"--mtriple=thumbv7em-unknown-none-eabi",
"-defaultlib=druntime-ldc,phobos2-ldc"
];
post-switches = [
"-I%ldccurrentpath%/import/src/",
"-I%ldccurrentpath%/import/tagged/",
"-I%ldccurrentpath%/import/phobos/"
];
lib-dirs = [
"%ldccurrentpath%/lib",
];
rpath = "%ldccurrentpath%/lib";
};
Then, using ldc2 --conf=path/to/d-stdlibs-freertos/ldc2.conf app.d
we can compile app.d
kinke commented
So the directory containing the ldc2.conf file. I guess that would be fine, but I'd call it %%ldcconfigpath%%
then, analogous to %%ldcbinarypath%%
.