You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some third party cmake packages append a suffix to static libs eg.
cares:
```
out_shared_libs = [
"libcares.so",
],
out_static_libs = [
"libcares_static.a",
]
```
`cmake` will treat these as separate libs, creating separate `CcInfo`
`<LibraryToLink>`'s for each:
```
<LinkerInput(libraries=[<LibraryToLink(static_library=libcares_static.a)>, <LibraryToLink(dynamic_library=libcares.so)>]>
```
This creates a different `linking_context` compared to packages that have matching filenames, and can lead to changes in linking behavior when used as a dep.
This change introduces a new attribute `static_suffix` that provides a hint to allow association of the suffix-appended static lib with the shared lib:
```
static_suffix = "_static",
```
results in
```
<LinkerInput(libraries=[<LibraryToLink(static_library=libcares_static.a, dynamic_library=libcares.so)>]>
```
0 commit comments