aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-05-20 15:20:13 -0700
committerEli Schwartz <eschwartz93@gmail.com>2022-06-01 22:49:10 -0400
commitb53d144794604dcb6378beefb2691651f1a9e1b0 (patch)
tree97f0410ff255f203b9e83714245ae2d761776957 /mesonbuild/build.py
parent27bde338fb6ca23b51a560c701cc0f33ce796405 (diff)
downloadmeson-b53d144794604dcb6378beefb2691651f1a9e1b0.zip
meson-b53d144794604dcb6378beefb2691651f1a9e1b0.tar.gz
meson-b53d144794604dcb6378beefb2691651f1a9e1b0.tar.bz2
build: stop overwriting outputs, and replace the intended output
Currently, the code puts a placeholder in for the first output, then replaces all of the outputs when it generates final value. Instead, let's only replace the placeholder value.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 2f2163f..50292d2 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -622,7 +622,7 @@ class Target(HoldableObject):
else:
custom_install_dir = False
# if outdirs is empty we need to set to something, otherwise we set
- # only the first value to the default
+ # only the first value to the default.
if outdirs:
outdirs[0] = default_install_dir
else:
@@ -2149,7 +2149,9 @@ class SharedLibrary(BuildTarget):
if self.suffix is None:
self.suffix = suffix
self.filename = self.filename_tpl.format(self)
- self.outputs = [self.filename]
+ # There may have been more outputs added by the time we get here, so
+ # only replace the first entry
+ self.outputs[0] = self.filename
if create_debug_file:
self.debug_filename = os.path.splitext(self.filename)[0] + '.pdb'