diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-13 00:00:11 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-27 20:40:41 +0200 |
commit | cb176e930313ff652c16ee6001720830ea5964ea (patch) | |
tree | b2e562ea3116d5984b6a6680936b3ad22faa28f0 /mesonbuild/build.py | |
parent | 36fc65527291553bab6292d4b91208bed5aadda3 (diff) | |
download | meson-cb176e930313ff652c16ee6001720830ea5964ea.zip meson-cb176e930313ff652c16ee6001720830ea5964ea.tar.gz meson-cb176e930313ff652c16ee6001720830ea5964ea.tar.bz2 |
Look up compilers based on sources from deps, too. Closes #2768.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index c5fc7f6..c46a69b 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -365,9 +365,9 @@ class BuildTarget(Target): # 1. Pre-existing objects provided by the user with the `objects:` kwarg # 2. Compiled objects created by and extracted from another target self.process_objectlist(objects) - self.process_compilers() self.process_kwargs(kwargs, environment) self.check_unknown_kwargs(kwargs) + self.process_compilers() if not any([self.sources, self.generated, self.objects, self.link_whole]): raise InvalidArguments('Build target %s has no sources.' % name) self.process_compilers_late() @@ -500,6 +500,13 @@ class BuildTarget(Target): # which is what we need. if not is_object(s): sources.append(s) + for d in self.external_deps: + if hasattr(d, 'held_object'): + d = d.held_object + for s in d.sources: + if isinstance(s, (str, File)): + sources.append(s) + # Sources that were used to create our extracted objects for o in self.objects: if not isinstance(o, ExtractedObjects): @@ -690,8 +697,7 @@ just like those detected with the dependency() function.''') raise InvalidArguments('Arguments to d_import_dirs must be include_directories.') dfeatures['import_dirs'] = dfeature_import_dirs if dfeatures: - if 'd' in self.compilers: - self.d_features = dfeatures + self.d_features = dfeatures self.link_args = extract_as_list(kwargs, 'link_args') for i in self.link_args: |