Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wish: implement %ldccurrentpath% variable for ldc2.conf #4714

Closed
denizzzka opened this issue Jul 29, 2024 · 3 comments · Fixed by #4717
Closed

Wish: implement %ldccurrentpath% variable for ldc2.conf #4714

denizzzka opened this issue Jul 29, 2024 · 3 comments · Fixed by #4717

Comments

@denizzzka
Copy link
Contributor

denizzzka commented Jul 29, 2024

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
Copy link
Member

kinke commented Jul 29, 2024

With which semantics?

@denizzzka
Copy link
Contributor Author

denizzzka commented Jul 29, 2024

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
Copy link
Member

kinke commented Jul 29, 2024

So the directory containing the ldc2.conf file. I guess that would be fine, but I'd call it %%ldcconfigpath%% then, analogous to %%ldcbinarypath%%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants