Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkgconfig: Fix link order of library dependencies
Since `_process_libs` appends the lib's dependencies this list already, the final return value of `_process_libs` will end up after its dependencies, which is the wrong way around. (The lib must come first, then its dependencies) The easiest solution is to simply pre-pend the return value of `_process_libs` rather than appending it, so that its dependencies come after the library itself. Closes #4091.
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test cases/unit/50 pkgconfig static link order/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
project('link order test', 'c') | ||
|
||
dep = library('dependency', []) | ||
lib = static_library('something', [], link_with: dep) | ||
|
||
import('pkgconfig').generate( | ||
name: 'libsomething', | ||
description: 'test library', | ||
libraries: lib, | ||
version: '1' | ||
) |