diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-06-20 23:46:48 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-06-20 23:46:48 +0300 |
commit | fd37052973a5c6ea5df5e39e0028836c0472530f (patch) | |
tree | e9cb572a165f001ef16e974439aca91d07502c4e | |
parent | 57b3f9858625b1c0204320dddec8b6b84f6289c2 (diff) | |
download | meson-warnprint.tar.gz |
Warn if using Clang+asan+b_lundef. Closes #764.warnprint
-rw-r--r-- | mesonbuild/interpreter.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 605eecbd8..8e1933443 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3631,6 +3631,25 @@ different subdirectory. mlog.log('Build targets in project:', mlog.bold(str(len(self.build.targets)))) FeatureNew.called_features_report() FeatureDeprecated.called_features_report() + if self.subproject == '': + self.print_extra_warnings() + + def print_extra_warnings(self): + for c in self.build.compilers.values(): + if c.get_id() == 'clang': + self.check_clang_asan_lundef() + break + + def check_clang_asan_lundef(self): + if 'b_lundef' not in self.coredata.base_options: + return + if 'b_sanitize' not in self.coredata.base_options: + return + if 'address' in self.coredata.base_options['b_sanitize'].value: + if self.coredata.base_options['b_lundef'].value: + mlog.warning('''Trying to use address sanitizer on Clang with b_lundef. +This will probably not work. +Try setting b_lundef to false instead.''') def evaluate_subproject_info(self, path_from_source_root, subproject_dirname): depth = 0 |