diff options
32 files changed, 98 insertions, 37 deletions
diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml index 94d1b01..6531e2b 100644 --- a/.github/workflows/os_comp.yml +++ b/.github/workflows/os_comp.yml @@ -54,7 +54,11 @@ jobs: cfg: - CC: 'gcc' CXX: 'g++' - - MESON_ARGS: '--unity=on' + - MESON_ARGS: '--unity=on -Ddefault_library=static' + RUN_TESTS_ARGS: '--no-unittests' + CC: 'gcc' + CXX: 'g++' + - MESON_ARGS: '-Ddefault_library=both' RUN_TESTS_ARGS: '--no-unittests' CC: 'gcc' CXX: 'g++' diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 03f97b2..707f5d2 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1715,6 +1715,9 @@ class Executable(BuildTarget): # Only linkwithable if using export_dynamic self.is_linkwithable = self.export_dynamic + # Remember that this exe was returned by `find_program()` through an override + self.was_returned_by_find_program = False + def get_default_install_dir(self, environment: environment.Environment) -> str: return environment.get_bindir() @@ -2154,6 +2157,10 @@ class BothLibraries(HoldableObject): self._preferred_library = 'shared' self.shared = shared self.static = static + self.subproject = self.shared.subproject + + def __repr__(self) -> str: + return f'<BothLibraries: static={repr(self.static)}; shared={repr(self.shared)}>' def get_preferred_library(self) -> BuildTarget: if self._preferred_library == 'shared': @@ -2167,6 +2174,8 @@ class CommandBase: cmd = listify(cmd) final_cmd = [] for c in cmd: + if isinstance(c, BothLibraries): + c = c.get_preferred_library() if isinstance(c, str): final_cmd.append(c) elif isinstance(c, File): @@ -2265,6 +2274,7 @@ class CustomTarget(Target, CommandBase): def process_kwargs(self, kwargs, backend): self.process_kwargs_base(kwargs) self.sources = extract_as_list(kwargs, 'input') + self.sources = [x.get_preferred_library() if isinstance(x, BothLibraries) else x for x in self.sources] if 'output' not in kwargs: raise InvalidArguments('Missing keyword argument "output".') self.outputs = listify(kwargs['output']) @@ -2641,6 +2651,8 @@ def get_sources_string_names(sources, backend): ''' names = [] for s in sources: + if isinstance(s, BothLibraries): + s = s.get_preferred_library() if isinstance(s, str): names.append(s) elif isinstance(s, (BuildTarget, CustomTarget, CustomTargetIndex, GeneratedList)): diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index e12c697..7240a81 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -29,7 +29,7 @@ from ..interpreterbase import FeatureDeprecated if T.TYPE_CHECKING: from ..compilers.compilers import Compiler from ..environment import Environment - from ..build import BuildTarget + from ..build import BuildTarget, BothLibraries from ..mesonlib import FileOrString @@ -222,8 +222,8 @@ class Dependency(HoldableObject): class InternalDependency(Dependency): def __init__(self, version: str, incdirs: T.List[str], compile_args: T.List[str], - link_args: T.List[str], libraries: T.List['BuildTarget'], - whole_libraries: T.List['BuildTarget'], sources: T.List['FileOrString'], + link_args: T.List[str], libraries: T.List[T.Union['BuildTarget', 'BothLibraries']], + whole_libraries: T.List[T.Union['BuildTarget', 'BothLibraries']], sources: T.List['FileOrString'], ext_deps: T.List[Dependency], variables: T.Dict[str, T.Any]): super().__init__(DependencyTypeName('internal'), {}) self.version = version @@ -237,6 +237,11 @@ class InternalDependency(Dependency): self.ext_deps = ext_deps self.variables = variables + # Deal with BothLibraries + from ..build import BothLibraries + self.libraries = [x.get_preferred_library() if isinstance(x, BothLibraries) else x for x in self.libraries] + self.whole_libraries = [x.static if isinstance(x, BothLibraries) else x for x in self.whole_libraries] + def __deepcopy__(self, memo: T.Dict[int, 'InternalDependency']) -> 'InternalDependency': result = self.__class__.__new__(self.__class__) assert isinstance(result, InternalDependency) diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index fac0032..2faec4e 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -28,7 +28,7 @@ from ..depfile import DepFile from ..interpreterbase import ContainerTypeInfo, InterpreterBase, KwargInfo, typed_kwargs, typed_pos_args from ..interpreterbase import noPosargs, noKwargs, stringArgs, permittedKwargs, noArgsFlattening, unholder_return from ..interpreterbase import InterpreterException, InvalidArguments, InvalidCode, SubdirDoneRequest -from ..interpreterbase import InterpreterObject, Disabler, disablerIfNotFound +from ..interpreterbase import Disabler, disablerIfNotFound from ..interpreterbase import FeatureNew, FeatureDeprecated, FeatureNewKwargs, FeatureDeprecatedKwargs from ..interpreterbase import ObjectHolder, RangeHolder from ..interpreterbase import TYPE_nkwargs, TYPE_nvar, TYPE_var @@ -66,7 +66,7 @@ if T.TYPE_CHECKING: from . import kwargs # Input source types passed to Targets - SourceInputs = T.Union[mesonlib.File, build.GeneratedList, build.BuildTarget, + SourceInputs = T.Union[mesonlib.File, build.GeneratedList, build.BuildTarget, build.BothLibraries, build.CustomTargetIndex, build.CustomTarget, build.GeneratedList, str] # Input source types passed to the build.Target5 classes SourceOutputs = T.Union[mesonlib.File, build.GeneratedList, @@ -1404,6 +1404,8 @@ external dependencies (including libraries) must go to "dependencies".''') # Only store successful lookups self.store_name_lookups(args) mlog.log('Program', mlog.bold(progobj.name), 'found:', mlog.green('YES'), *extra_info) + if isinstance(progobj, build.Executable): + progobj.was_returned_by_find_program = True return progobj def program_lookup(self, args, for_machine, required, search_dirs, extra_info): @@ -2490,6 +2492,8 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey sources = [sources] results: T.List['SourceOutputs'] = [] for s in sources: + if isinstance(s, build.BothLibraries): + s = s.get_preferred_library() if isinstance(s, str): self.validate_within_subproject(self.subdir, s) results.append(mesonlib.File.from_source_file(self.environment.source_dir, self.subdir, s)) @@ -2655,7 +2659,7 @@ This will become a hard error in the future.''', location=self.current_node) raise InterpreterException('Tried to add non-existing source file %s.' % s) # Only permit object extraction from the same subproject - def validate_extraction(self, buildtarget: InterpreterObject) -> None: + def validate_extraction(self, buildtarget: mesonlib.HoldableObject) -> None: if self.subproject != buildtarget.subproject: raise InterpreterException('Tried to extract objects from a different subproject.') diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index 744f69c..261d781 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -807,8 +807,9 @@ class BuildTargetHolder(ObjectHolder[_BuildTarget]): @noPosargs @noKwargs - @FeatureNew('BuildTarget.found', '0.59.0') def found_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> bool: + if not (isinstance(self.held_object, build.Executable) and self.held_object.was_returned_by_find_program): + FeatureNew.single_use('BuildTarget.found', '0.59.0', subproject=self.held_object.subproject) return True @noPosargs diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 0ae1c70..51f2e6e 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -480,9 +480,11 @@ class GnomeModule(ExtensionModule): return cflags, internal_ldflags, external_ldflags, external_ldflags_nodedup, gi_includes def _unwrap_gir_target(self, girtarget, state): + if isinstance(girtarget, build.BothLibraries): + girtarget = girtarget.get_preferred_library() if not isinstance(girtarget, (build.Executable, build.SharedLibrary, build.StaticLibrary)): - raise MesonException('Gir target must be an executable or library') + raise MesonException(f'Gir target must be an executable or library but is "{girtarget}" of type {type(girtarget).__name__}') STATIC_BUILD_REQUIRED_VERSION = ">=1.58.1" if isinstance(girtarget, (build.StaticLibrary)) and \ diff --git a/test cases/common/102 extract same name/meson.build b/test cases/common/102 extract same name/meson.build index e15561d..08daa5b 100644 --- a/test cases/common/102 extract same name/meson.build +++ b/test cases/common/102 extract same name/meson.build @@ -12,7 +12,7 @@ if meson.backend() == 'xcode' error('MESON_SKIP_TEST, Xcode can not extract objs when they would have the same filename.') endif -lib = shared_library('somelib', ['lib.c', 'src/lib.c']) +lib = library('somelib', ['lib.c', 'src/lib.c']) # Also tests that the object list is flattened properly obj = lib.extract_objects(['lib.c', ['src/lib.c']]) exe = executable('main', 'main.c', objects: obj) diff --git a/test cases/common/126 generated llvm ir/meson.build b/test cases/common/126 generated llvm ir/meson.build index e5c68bc..f10754a 100644 --- a/test cases/common/126 generated llvm ir/meson.build +++ b/test cases/common/126 generated llvm ir/meson.build @@ -14,7 +14,7 @@ copygen = generator(copy, arguments : ['@INPUT@', '@OUTPUT@'], output : '@BASENAME@') -l = shared_library('square-gen', copygen.process('square.ll.in')) +l = library('square-gen', copygen.process('square.ll.in')) test('square-gen-test', executable('square-gen-test', 'main.c', link_with : l)) @@ -23,6 +23,6 @@ copyct = custom_target('square', output : 'square.ll', command : [copy, '@INPUT@', '@OUTPUT@']) -l = shared_library('square-ct', copyct) +l = library('square-ct', copyct) test('square-ct-test', executable('square-ct-test', 'main.c', link_with : l)) diff --git a/test cases/common/127 generated assembly/meson.build b/test cases/common/127 generated assembly/meson.build index 6d614a9..31a5f17 100644 --- a/test cases/common/127 generated assembly/meson.build +++ b/test cases/common/127 generated assembly/meson.build @@ -50,7 +50,7 @@ copygen = generator(copy, arguments : ['@INPUT@', '@OUTPUT@'], output : '@BASENAME@') -l = shared_library('square-gen', crt_workaround + [copygen.process(input)], +l = library('square-gen', crt_workaround + [copygen.process(input)], vs_module_defs: 'square.def') test('square-gen-test', executable('square-gen-test', 'main.c', link_with : l)) @@ -60,7 +60,7 @@ copyct = custom_target('square', output : output, command : [copy, '@INPUT@', '@OUTPUT@']) -l = shared_library('square-ct', crt_workaround + [copyct], +l = library('square-ct', crt_workaround + [copyct], vs_module_defs: 'square.def') test('square-ct-test', executable('square-ct-test', 'main.c', link_with : l)) diff --git a/test cases/common/146 library at root/meson.build b/test cases/common/146 library at root/meson.build index bfdd869..e652671 100644 --- a/test cases/common/146 library at root/meson.build +++ b/test cases/common/146 library at root/meson.build @@ -1,3 +1,3 @@ project('lib@root', 'c') -lib = shared_library('lib', 'lib.c') +lib = library('lib', 'lib.c') subdir('main') diff --git a/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build b/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build index 8d8008e..70d493f 100644 --- a/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build +++ b/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build @@ -1,2 +1,2 @@ project('shared lib', 'c') -shared_library('foo', 'foo.c') +library('foo', 'foo.c') diff --git a/test cases/common/155 subproject dir name collision/custom_subproject_dir/B/meson.build b/test cases/common/155 subproject dir name collision/custom_subproject_dir/B/meson.build index 280c60c..8f4cb02 100644 --- a/test cases/common/155 subproject dir name collision/custom_subproject_dir/B/meson.build +++ b/test cases/common/155 subproject dir name collision/custom_subproject_dir/B/meson.build @@ -1,4 +1,4 @@ project('B', 'c') C = subproject('C') c = C.get_variable('c') -b = shared_library('b', 'b.c', link_with : c) +b = library('b', 'b.c', link_with : c) diff --git a/test cases/common/155 subproject dir name collision/custom_subproject_dir/C/meson.build b/test cases/common/155 subproject dir name collision/custom_subproject_dir/C/meson.build index abf0b1e..5d89097 100644 --- a/test cases/common/155 subproject dir name collision/custom_subproject_dir/C/meson.build +++ b/test cases/common/155 subproject dir name collision/custom_subproject_dir/C/meson.build @@ -1,2 +1,2 @@ project('C', 'c') -c = shared_library('c', 'c.c') +c = library('c', 'c.c') diff --git a/test cases/common/155 subproject dir name collision/other_subdir/meson.build b/test cases/common/155 subproject dir name collision/other_subdir/meson.build index 90cb67a..37cb623 100644 --- a/test cases/common/155 subproject dir name collision/other_subdir/meson.build +++ b/test cases/common/155 subproject dir name collision/other_subdir/meson.build @@ -1 +1 @@ -other = shared_library('other', 'custom_subproject_dir/other.c') +other = library('other', 'custom_subproject_dir/other.c') diff --git a/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build index 12f6564..1014db1 100644 --- a/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build +++ b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build @@ -1,4 +1,4 @@ project('alpha project', 'c', subproject_dir: 'var/subprojects') b = subproject('beta') -l = shared_library('a', 'a.c', link_with : b.get_variable('lb')) +l = library('a', 'a.c', link_with : b.get_variable('lb')) diff --git a/test cases/common/178 bothlibraries/dummy.py b/test cases/common/178 bothlibraries/dummy.py new file mode 100644 index 0000000..9e838ba --- /dev/null +++ b/test cases/common/178 bothlibraries/dummy.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 + +from pathlib import Path +import sys + +if __name__ == '__main__': + Path(sys.argv[1]).write_text('Hello World\n') + raise SystemExit(0) diff --git a/test cases/common/178 bothlibraries/meson.build b/test cases/common/178 bothlibraries/meson.build index d52158d..9df4cd1 100644 --- a/test cases/common/178 bothlibraries/meson.build +++ b/test cases/common/178 bothlibraries/meson.build @@ -1,15 +1,29 @@ project('both libraries linking test', 'c') both_libs = both_libraries('mylib', 'libfile.c') +dep = declare_dependency(link_with: both_libs) exe_shared = executable('prog-shared', 'main.c', link_with : both_libs.get_shared_lib()) exe_static = executable('prog-static', 'main.c', c_args : ['-DSTATIC_COMPILATION'], link_with : both_libs.get_static_lib()) exe_both = executable('prog-both', 'main.c', link_with : both_libs) +exe_dep = executable('prog-dep', 'main.c', dependencies : [dep]) + +# Try using it in a custom_target +custom_target('tgt_a', + command: [ + find_program('./dummy.py'), + '@OUTPUT@', + both_libs, + ], + output: ['hello1.txt'], + input: [both_libs], +) test('runtest-shared', exe_shared) test('runtest-static', exe_static) test('runtest-both', exe_both) +test('runtest-dep', exe_dep) # Same as above, but using build_target() both_libs2 = build_target('mylib2', 'libfile.c', target_type: 'both_libraries') diff --git a/test cases/common/22 object extraction/meson.build b/test cases/common/22 object extraction/meson.build index fd4af8c..4847fa1 100644 --- a/test cases/common/22 object extraction/meson.build +++ b/test cases/common/22 object extraction/meson.build @@ -3,8 +3,8 @@ project('object extraction', 'c') if meson.is_unity() message('Skipping extraction test because this is a Unity build.') else - lib1 = shared_library('somelib', 'src/lib.c') - lib2 = shared_library('somelib2', 'lib.c', 'header.h', 'lib2.c') + lib1 = library('somelib', 'src/lib.c') + lib2 = library('somelib2', 'lib.c', 'header.h', 'lib2.c') obj1 = lib1.extract_objects('src/lib.c') obj2 = lib2.extract_objects(['lib.c']) diff --git a/test cases/common/223 persubproject options/meson.build b/test cases/common/223 persubproject options/meson.build index f76a70c..b9cbfe2 100644 --- a/test cases/common/223 persubproject options/meson.build +++ b/test cases/common/223 persubproject options/meson.build @@ -1,6 +1,5 @@ project('persubproject options', 'c', - default_options : ['default_library=both', - 'werror=true', + default_options : ['werror=true', 'warning_level=3']) assert(get_option('default_library') == 'both', 'Parent default_library should be "both"') diff --git a/test cases/common/223 persubproject options/test.json b/test cases/common/223 persubproject options/test.json new file mode 100644 index 0000000..ccfa9ff --- /dev/null +++ b/test cases/common/223 persubproject options/test.json @@ -0,0 +1,7 @@ +{ + "matrix": { + "options": { + "default_library": [ { "val": "both" } ] + } + } +} diff --git a/test cases/common/72 shared subproject/subprojects/B/meson.build b/test cases/common/72 shared subproject/subprojects/B/meson.build index 280c60c..8f4cb02 100644 --- a/test cases/common/72 shared subproject/subprojects/B/meson.build +++ b/test cases/common/72 shared subproject/subprojects/B/meson.build @@ -1,4 +1,4 @@ project('B', 'c') C = subproject('C') c = C.get_variable('c') -b = shared_library('b', 'b.c', link_with : c) +b = library('b', 'b.c', link_with : c) diff --git a/test cases/common/72 shared subproject/subprojects/C/meson.build b/test cases/common/72 shared subproject/subprojects/C/meson.build index abf0b1e..5d89097 100644 --- a/test cases/common/72 shared subproject/subprojects/C/meson.build +++ b/test cases/common/72 shared subproject/subprojects/C/meson.build @@ -1,2 +1,2 @@ project('C', 'c') -c = shared_library('c', 'c.c') +c = library('c', 'c.c') diff --git a/test cases/common/73 shared subproject 2/subprojects/B/meson.build b/test cases/common/73 shared subproject 2/subprojects/B/meson.build index 280c60c..8f4cb02 100644 --- a/test cases/common/73 shared subproject 2/subprojects/B/meson.build +++ b/test cases/common/73 shared subproject 2/subprojects/B/meson.build @@ -1,4 +1,4 @@ project('B', 'c') C = subproject('C') c = C.get_variable('c') -b = shared_library('b', 'b.c', link_with : c) +b = library('b', 'b.c', link_with : c) diff --git a/test cases/common/73 shared subproject 2/subprojects/C/meson.build b/test cases/common/73 shared subproject 2/subprojects/C/meson.build index abf0b1e..5d89097 100644 --- a/test cases/common/73 shared subproject 2/subprojects/C/meson.build +++ b/test cases/common/73 shared subproject 2/subprojects/C/meson.build @@ -1,2 +1,2 @@ project('C', 'c') -c = shared_library('c', 'c.c') +c = library('c', 'c.c') diff --git a/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build b/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build index e0073ea..0810df5 100644 --- a/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build +++ b/test cases/failing/16 extract from subproject/subprojects/sub_project/meson.build @@ -1,3 +1,3 @@ project('extract subproject object -- subproject', 'c') -lib = shared_library('sub_lib', 'sub_lib.c') +lib = library('sub_lib', 'sub_lib.c') diff --git a/test cases/fortran/21 install static/meson.build b/test cases/fortran/21 install static/meson.build index 14485f5..b4d3e40 100644 --- a/test cases/fortran/21 install static/meson.build +++ b/test cases/fortran/21 install static/meson.build @@ -3,7 +3,7 @@ # - Is an install:true static library to trigger certain codepath (promotion to link_whole) # - Does fortran code 'generation' with configure_file # - Uses .F90 ext (capital F typically denotes a dependence on preprocessor treatment, which however is not used) -project('try-static-subproject-dependency', 'fortran', default_options: ['default_library=static']) +project('try-static-subproject-dependency', 'fortran') static_dep = dependency('static_hello', fallback: ['static_hello', 'static_hello_dep']) diff --git a/test cases/fortran/21 install static/test.json b/test cases/fortran/21 install static/test.json index b31e91d..aff7147 100644 --- a/test cases/fortran/21 install static/test.json +++ b/test cases/fortran/21 install static/test.json @@ -1,5 +1,10 @@ { "installed": [ {"file": "usr/lib/libmainstatic.a", "type": "file"} - ] -}
\ No newline at end of file + ], + "matrix": { + "options": { + "default_library": [ { "val": "static" } ] + } + } +} diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build index 292980f..43ee929 100644 --- a/test cases/frameworks/10 gtk-doc/meson.build +++ b/test cases/frameworks/10 gtk-doc/meson.build @@ -26,7 +26,7 @@ endif gobject = dependency('gobject-2.0') -libfoo = library('foo', 'foo.c', +libfoo = shared_library('foo', 'foo.c', include_directories: inc, dependencies: gobject, ) diff --git a/test cases/linuxlike/5 dependency versions/subprojects/somelib/meson.build b/test cases/linuxlike/5 dependency versions/subprojects/somelib/meson.build index 086e514..670b10f 100644 --- a/test cases/linuxlike/5 dependency versions/subprojects/somelib/meson.build +++ b/test cases/linuxlike/5 dependency versions/subprojects/somelib/meson.build @@ -1,7 +1,7 @@ # Define version only in project, should get inherited by declare_dependency project('some', 'c', version : '0.1') -somelib = shared_library('some', 'lib.c') +somelib = library('some', 'lib.c') someinc = include_directories('.') some_dep = declare_dependency(link_with : somelib, diff --git a/test cases/linuxlike/5 dependency versions/subprojects/somelibnover/meson.build b/test cases/linuxlike/5 dependency versions/subprojects/somelibnover/meson.build index 826bb3c..aa7e554 100644 --- a/test cases/linuxlike/5 dependency versions/subprojects/somelibnover/meson.build +++ b/test cases/linuxlike/5 dependency versions/subprojects/somelibnover/meson.build @@ -1,6 +1,6 @@ project('some', 'c') -somelib = shared_library('some', 'lib.c') +somelib = library('some', 'lib.c') someinc = include_directories('.') # Define version only in declare_dependency diff --git a/test cases/linuxlike/5 dependency versions/subprojects/somelibver/meson.build b/test cases/linuxlike/5 dependency versions/subprojects/somelibver/meson.build index ad9f243..c773814 100644 --- a/test cases/linuxlike/5 dependency versions/subprojects/somelibver/meson.build +++ b/test cases/linuxlike/5 dependency versions/subprojects/somelibver/meson.build @@ -1,6 +1,6 @@ project('some', 'c') -somelib = shared_library('some', 'lib.c') +somelib = library('some', 'lib.c') someinc = include_directories('.') # Define version only in declare_dependency diff --git a/test cases/rust/4 polyglot/meson.build b/test cases/rust/4 polyglot/meson.build index 4955516..4e96679 100644 --- a/test cases/rust/4 polyglot/meson.build +++ b/test cases/rust/4 polyglot/meson.build @@ -4,6 +4,6 @@ if host_machine.system() == 'darwin' error('MESON_SKIP_TEST: doesnt work right on macos, please fix!') endif -l = library('stuff', 'stuff.rs', rust_crate_type: 'cdylib', install : true) +l = shared_library('stuff', 'stuff.rs', rust_crate_type: 'cdylib', install : true) e = executable('prog', 'prog.c', link_with : l, install : true) test('polyglottest', e) |