MacDownApp / MacDownApp/macdown
get ldc lib/include/etc contents programmatically (analog to llvm-config)
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
How can I get search path for ldc from command line?
ldc does some logic to get the ldc2.conf path (a number of locations are searched in order), then parses it to get '-I' flags, '-L' etc.
I'd like to get those from command line to avoid redoing the work (which would be brittle in case of changes to the logic), which would be the analog of llvm-config and other tools.
ldc2 --conf.includes
# outputs /foo/include_dir1 /foo/include_dir2
ldc2 --conf.libs
# outputs /path/to/lib1 /path/to/lib2
etc with other config contents.
This would be especially useful in case user has multiple ldc configurations: all that is needed would be to provide the path to ldc2 binary to get its includes/libs/etc.
not sure about syntax (--conf=includes,libs? --conf.includes --conf.libs ?), but that's a secondary issue.
Contributor guide
Research direction
Start by locating ldc2's command-line option handling and the ldc2.conf search and parsing logic. Define the supported configuration queries and verify that each prints the corresponding include, library, or other configuration paths without duplicating the existing lookup behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100