diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-13 12:22:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 12:22:11 +0200 |
commit | de83e94b5a9ce0f540814cee40ef3746b6ebb824 (patch) | |
tree | be5504f488f980b6e394b4a2801864485c4dd792 /mesonbuild/modules | |
parent | 07679f0330ccc4ee3839e702d79ecdd349437593 (diff) | |
parent | 2c83bd16fc03afd2d8605734dce1ffc1946bf3d2 (diff) | |
download | meson-de83e94b5a9ce0f540814cee40ef3746b6ebb824.zip meson-de83e94b5a9ce0f540814cee40ef3746b6ebb824.tar.gz meson-de83e94b5a9ce0f540814cee40ef3746b6ebb824.tar.bz2 |
Merge pull request #1171 from centricular/fix-extracted-generated-prebuilt-object-targets-linking
Several fixes to how we handle objects in build targets
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/gnome.py | 10 | ||||
-rw-r--r-- | mesonbuild/modules/rpm.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/windows.py | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 1912fc1..6d05b4e 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -433,11 +433,11 @@ can not be used with the current version of glib-compiled-resources, due to cflags += state.global_args['c'] if state.project_args.get('c'): cflags += state.project_args['c'] - for compiler in state.compilers: - if compiler.get_language() == 'c': - sanitize = compiler.get_options().get('b_sanitize') - if sanitize: - cflags += compilers.sanitizer_compile_args(sanitize) + if 'c' in state.compilers: + compiler = state.compilers['c'] + sanitize = compiler.get_options().get('b_sanitize') + if sanitize: + cflags += compilers.sanitizer_compile_args(sanitize) if cflags: scan_command += ['--cflags-begin'] scan_command += cflags diff --git a/mesonbuild/modules/rpm.py b/mesonbuild/modules/rpm.py index 2c9ed57..dca1ad6 100644 --- a/mesonbuild/modules/rpm.py +++ b/mesonbuild/modules/rpm.py @@ -27,7 +27,7 @@ class RPMModule: def generate_spec_template(self, state, args, kwargs): compiler_deps = set() - for compiler in state.compilers: + for compiler in state.compilers.values(): if isinstance(compiler, compilers.GnuCCompiler): compiler_deps.add('gcc') elif isinstance(compiler, compilers.GnuCPPCompiler): diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index cd4e343..ad882cb 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -19,9 +19,9 @@ import os class WindowsModule: def detect_compiler(self, compilers): - for c in compilers: - if c.language == 'c' or c.language == 'cpp': - return c + for l in ('c', 'cpp'): + if l in compilers: + return compilers[l] raise MesonException('Resource compilation requires a C or C++ compiler.') def compile_resources(self, state, args, kwargs): |