cps-org / cps-org/cps

static libraries that need to be linked with whole-archive downstream

Open
#101 1 comment 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.