aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-12-08 10:22:35 -0800
committerDylan Baker <dylan@pnwbakers.com>2022-12-24 13:21:18 -0800
commit2fd5bd934e0e6dd26ad8c326a156a710f912b335 (patch)
tree1f6d6b84060bb6ecb6599225d679b4dd7d49b512
parent8e2355ebc85ccfcae53e16f7ed52e0c8d10c2cee (diff)
downloadmeson-2fd5bd934e0e6dd26ad8c326a156a710f912b335.zip
meson-2fd5bd934e0e6dd26ad8c326a156a710f912b335.tar.gz
meson-2fd5bd934e0e6dd26ad8c326a156a710f912b335.tar.bz2
interpreter: use static_lib's already calculated pic value
Instead of re-calculating it when building both libraries
-rw-r--r--mesonbuild/interpreter/interpreter.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 44b2e72..f112e4e 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -3042,14 +3042,6 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey
shared_lib = self.build_target(node, args, kwargs, build.SharedLibrary)
static_lib = self.build_target(node, args, kwargs, build.StaticLibrary)
- # Check if user forces non-PIC static library.
- pic = True
- key = OptionKey('b_staticpic')
- if 'pic' in kwargs:
- pic = kwargs['pic']
- elif key in self.environment.coredata.options:
- pic = self.environment.coredata.options[key].value
-
if self.backend.name == 'xcode':
# Xcode is a bit special in that you can't (at least for the moment)
# form a library only from object file inputs. The simple but inefficient
@@ -3059,7 +3051,7 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey
# issue for you.
reuse_object_files = False
else:
- reuse_object_files = pic
+ reuse_object_files = static_lib.pic
if reuse_object_files:
# Replace sources with objects from the shared library to avoid