diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-03-29 22:22:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 22:22:51 +0300 |
commit | 8eadc9d06847db79f3906670318a7aff7e7df7f4 (patch) | |
tree | 99197f31e4f80cf80410266a2d833a0f37164dbb /mesonbuild/build.py | |
parent | be3387d937addd30b3aa1ec0639bba419ceee477 (diff) | |
parent | cc6be2e43d403f240f8e9bb1f0b80825124b71cf (diff) | |
download | meson-8eadc9d06847db79f3906670318a7aff7e7df7f4.zip meson-8eadc9d06847db79f3906670318a7aff7e7df7f4.tar.gz meson-8eadc9d06847db79f3906670318a7aff7e7df7f4.tar.bz2 |
Merge pull request #3277 from chitranjali/shared-mod-link
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 3ff68ed..aca592e 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -380,6 +380,7 @@ class BuildTarget(Target): self.process_compilers_late() self.validate_sources() self.validate_cross_install(environment) + self.check_module_linking() def __lt__(self, other): return self.get_id() < other.get_id() @@ -1027,6 +1028,15 @@ You probably should put it in link_with instead.''') def is_linkable_target(self): return False + def check_module_linking(self): + ''' + Warn if shared modules are linked with target: (link_with) #2865 + ''' + for link_target in self.link_targets: + if isinstance(link_target, SharedModule): + mlog.warning('''target links against shared modules. This is not +recommended as it can lead to undefined behaviour on some platforms''') + return class Generator: def __init__(self, args, kwargs): |