"libraries" parsing should allow for custom flags when value starts with "-"
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 479
- PR merge metrics
- No merged PRs in 30d
Description
In the "libraries" build settings, if the library name starts with **"-"**, it should not be added to the link command with an extra **"-l"**. This bug is a show stopper for libraries requiring native frameworks on Mac OS X.
If you provide something like this:
```
macosx = {
modules = {
['lens.core'] = {
sources = {
[13] = 'src/macosx/poller.mm',
},
libraries = {'stdc++', '-framework Foundation', '-framework Cocoa', 'objc'},
},
},
},
```
You can an error like this:
```
ld: library not found for -l-framework Foundation
```
I can provide a patch and pull request if needed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Trace how the "libraries" build setting is parsed and turned into linker arguments, then reproduce the macOS example with framework flags. Done means values beginning with "-" are passed as custom linker flags without an extra "-l", while ordinary library names retain their existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100