diff options
| author | Eli Schwartz <eschwartz93@gmail.com> | 2024-07-29 23:03:47 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-07-30 14:13:11 -0400 |
| commit | ec0da1defabfd84c0aaf4a863de1a6a41f202076 (patch) | |
| tree | 002c0c8cd61cd73b0ee85d61e6124ec32aeb938a | |
| parent | f2de6dfd1041ef2e62b41d437da2d62af4a4d437 (diff) | |
| download | meson-ec0da1defabfd84c0aaf4a863de1a6a41f202076.tar.gz | |
mypy: reduce layers of indirection to ensure narrower type inference
We have a function that wraps two others because it first checks whether
the input is static or shared. By the same token, it has to return types
valid for either. We already *know* that we are a shared library, so we
can and should use the real function directly, which is both a
micro-optimization of function call overhead, and fixes a mypy
"union-attr" error.
| -rw-r--r-- | mesonbuild/backend/ninjabackend.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b43b8bbe4..783cd78b5 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -3712,7 +3712,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) #Add archive file if shared library in AIX for build all. if isinstance(t, build.SharedLibrary) and t.aix_so_archive: if self.environment.machines[t.for_machine].is_aix(): - linker, stdlib_args = self.determine_linker_and_stdlib_args(t) + linker, stdlib_args = t.get_clink_dynamic_linker_and_stdlibs() t.get_outputs()[0] = linker.get_archive_name(t.get_outputs()[0]) targetlist.append(os.path.join(self.get_target_dir(t), t.get_outputs()[0])) |
