diff options
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 7b23a1d..7254f75 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -762,6 +762,10 @@ class BuildTarget(Target): raise MesonException('cannot mix structured sources and unstructured sources') if self.structured_sources and 'rust' not in self.compilers: raise MesonException('structured sources are only supported in Rust targets') + if self.uses_rust(): + # relocation-model=pic is rustc's default and Meson does not + # currently have a way to disable PIC. + self.pic = True def __repr__(self): repr_str = "<{0} {1}: {2}>" |