-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Describe the bug
When overriding a dependency as static/shared only, it does not check if all the linked library target are static/shared.
To Reproduce
project('static-test', 'c')
lib = shared_library('shared', 'test.c')
meson.override_dependency(
'dep',
declare_dependency(link_with: lib, compile_args: '-DSHARED'),
static: false,
)
meson.override_dependency(
'dep',
declare_dependency(link_with: lib, compile_args: '-DSTATIC'),
static: true,
)
exe = executable('exe', 'main.c', dependencies: dependency('dep', static: true))Expected behavior
second override_dependency will fail silently (as if the passed lib was a disabler), and the dependency call fails.
this behavior enables exporting targets with different linkage settings (e.g. __declspec(dllexport/dllimport)) under the same name, which is required by many projects on Windows.
system parameters
reproducible on all
Metadata
Metadata
Assignees
Labels
No labels