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

Config file: Add lib-dirs array #2790

Merged
merged 2 commits into from
Aug 19, 2018
Merged

Config file: Add lib-dirs array #2790

merged 2 commits into from
Aug 19, 2018

Conversation

kinke
Copy link
Member

@kinke kinke commented Jul 24, 2018

And replace the default -L-L<path> LDC switches in the default config accordingly.

The first advantage is for cross-compilation, where additional sections should now mostly get away with overriding lib-dirs (and rpath if need be) only; not just to specify the directory containing cross-compiled druntime and Phobos, but also further dirs containing the C libs. No need to override a whole [post-]switches array anymore just to tweak the lib dirs.

The second advantage is that we can search these dirs for compiler-rt libs instead of being limited to <bin dir>/../lib<LIB_SUFFIX specified in CMake command line> or trying to guess distro-specific paths => easy-peasy for distros and users.
This isn't implemented yet. Edit: It is now.

And replace the default `-L-L<path>` LDC switches in the default config
accordingly.

The first advantage is for cross-compilation, where additional sections
should now mostly get away with overriding `lib-dirs` (and `rpath` if
need be) only; not just to specify the directory containing cross-
compiled druntime and Phobos, but also further dirs containing the C
libs. No need to override a whole `[post-]switches` array anymore just
to tweak the lib dirs.

The second advantage is that we can search these dirs for compiler-rt
libs instead of being limited to `<bin dir>/../lib<LIB_SUFFIX specified
in CMake command line>` or trying to guess distro-specific paths
=> easy-peasy for distros and users.
This isn't implemented yet.
In addition (and preferred over) the previous searched-for lib dir
(`<bin dir>/../lib<LIB_SUFFIX CMake var>`). [Incl. searching in some of
their subdirs, e.g., `clang/x.y.z/lib/<OS>`.]

I skipped that backwards-compatibility thingy for the builtins lib on
Windows (not crucial, only linked (if found) on Windows etc.).
@kinke kinke added this to the 1.12.0 milestone Jul 28, 2018
@kinke kinke merged commit 848fc7b into ldc-developers:master Aug 19, 2018
@kinke kinke deleted the libdirs branch August 19, 2018 17:39
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 this pull request may close these issues.

1 participant