static libraries that need to be linked with whole-archive downstream
Open
enhancement
- Dominant language
- Python
- Stars
- 191
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
is there a way for a CPS file that describes a static library, to model where a library _should_ be linked as a "whole archive" downstream?
the end result is that the consumer passes something like the following to the linker:
```
-Wl,--whole-archive -foobar -Wl,--no-whole-archive
```
I think CMake has a related feature
https://discourse.cmake.org/t/automatically-wrapping-a-static-library-in-whole-archive-no-whole-archive-when-used-during-linking/5883/2
but I think it requires a proxy interface target to model this, e.g.
```
add_library(L INTERFACE)
target_link_libraries(L INTERFACE "$")
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.