diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2023-07-13 10:26:14 -0700 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-10-09 17:33:48 -0400 |
| commit | 013536fcb45dc40c4f592f5c5821ee6d38d331ed (patch) | |
| tree | ee7cddf43778f63a5f102de1225ce62e1ff5f419 /test cases/common/4 shared/meson.build | |
| parent | e24f43051255d3978002f39d08149c3088cb67f9 (diff) | |
| download | meson-013536fcb45dc40c4f592f5c5821ee6d38d331ed.tar.gz | |
interpreter: add <lang>_(static|shared)_args
Which allow passing arguments specifically to the static or shared
libraries.
For design, this is all handled in the interpreter, by the build layer
the arguments are combined into the existing fields. This limits changes
required in the mid and backend layers
Diffstat (limited to 'test cases/common/4 shared/meson.build')
| -rw-r--r-- | test cases/common/4 shared/meson.build | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test cases/common/4 shared/meson.build b/test cases/common/4 shared/meson.build index 1c88bc587..7f79ad630 100644 --- a/test cases/common/4 shared/meson.build +++ b/test cases/common/4 shared/meson.build @@ -1,4 +1,4 @@ -project('shared library test', 'c') +project('shared library test', 'c', default_options : ['default_library=shared']) lib = shared_library('mylib', 'libfile.c') build_target('mylib2', 'libfile.c', target_type: 'shared_library') @@ -11,3 +11,8 @@ endif assert(has_not_changed, 'Shared library has changed.') assert(not is_disabler(lib), 'Shared library is a disabler.') + +if get_option('default_library') == 'shared' + library('mylib5', 'libfile2.c', c_shared_args : ['-DWORK']) +endif +build_target('mylib4', 'libfile2.c', target_type: 'shared_library', c_shared_args : ['-DWORK'], c_static_args : ['-DBREAK']) |
