diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-03-21 16:42:55 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-03-24 12:27:06 -0400 |
commit | f2d21bf8a98fe4eb528a077f3faf5d68cd35c244 (patch) | |
tree | 4f750b938ad79de8c0e32f8301d1d9d36eac9fe6 /unittests | |
parent | ebbe4425e7a1c1c16281ef163e443fc1c0a8b209 (diff) | |
download | meson-f2d21bf8a98fe4eb528a077f3faf5d68cd35c244.zip meson-f2d21bf8a98fe4eb528a077f3faf5d68cd35c244.tar.gz meson-f2d21bf8a98fe4eb528a077f3faf5d68cd35c244.tar.bz2 |
Make compilers list per subproject
Previously subprojects inherited languages already added by main
project, or any previous subproject. This change to have a list of
compilers per interpreters, which means that if a subproject does not
add 'c' language it won't be able to compile .c files any more, even if
main project added the 'c' language.
This delays processing list of compilers until the interpreter adds the
BuildTarget into its list of targets. That way the interpreter can add
missing languages instead of duplicating that logic into BuildTarget for
the cython case.
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/allplatformstests.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 5a533a9..dd8fa66 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -3998,10 +3998,14 @@ class AllPlatformTests(BasePlatformTests): env = get_fake_env(testdir, self.builddir, self.prefix) def output_name(name, type_): - return type_(name=name, subdir=None, subproject=None, - for_machine=MachineChoice.HOST, sources=[], - structured_sources=None, - objects=[], environment=env, kwargs={}).filename + target = type_(name=name, subdir=None, subproject=None, + for_machine=MachineChoice.HOST, sources=[], + structured_sources=None, + objects=[], environment=env, compilers=env.coredata.compilers[MachineChoice.HOST], + kwargs={}) + target.process_compilers() + target.process_compilers_late([]) + return target.filename shared_lib_name = lambda name: output_name(name, SharedLibrary) static_lib_name = lambda name: output_name(name, StaticLibrary) |