aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-02-16 21:01:21 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-02-22 06:49:34 +0530
commit72c6cbd990c7f27fab609a1922d6f4b8f5ecdac3 (patch)
treee2b09e4f0a29655965d87ceb934a5c25e850379e
parent7f1d78f30479170baa749e179c70e85a62250b0f (diff)
downloadmeson-72c6cbd990c7f27fab609a1922d6f4b8f5ecdac3.zip
meson-72c6cbd990c7f27fab609a1922d6f4b8f5ecdac3.tar.gz
meson-72c6cbd990c7f27fab609a1922d6f4b8f5ecdac3.tar.bz2
ninjabackend: Minor refactoring
-rw-r--r--mesonbuild/backend/ninjabackend.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 11fd92f..11db192 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2326,6 +2326,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
return []
return linker.get_no_stdlib_link_args()
+ def get_import_filename(self, target):
+ return os.path.join(self.get_target_dir(target), target.import_filename)
+
def get_target_type_link_args(self, target, linker):
commands = []
if isinstance(target, build.Executable):
@@ -2336,7 +2339,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
commands += linker.gen_export_dynamic_link_args(self.environment)
# If implib, and that's significant on this platform (i.e. Windows using either GCC or Visual Studio)
if target.import_filename:
- commands += linker.gen_import_library_args(os.path.join(self.get_target_dir(target), target.import_filename))
+ commands += linker.gen_import_library_args(self.get_import_filename(target))
if target.pie:
commands += linker.get_pie_link_args()
elif isinstance(target, build.SharedLibrary):
@@ -2357,7 +2360,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
commands += linker.gen_vs_module_defs_args(target.vs_module_defs.rel_to_builddir(self.build_to_src))
# This is only visited when building for Windows using either GCC or Visual Studio
if target.import_filename:
- commands += linker.gen_import_library_args(os.path.join(self.get_target_dir(target), target.import_filename))
+ commands += linker.gen_import_library_args(self.get_import_filename(target))
elif isinstance(target, build.StaticLibrary):
commands += linker.get_std_link_args()
else: