aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-05-07 13:58:28 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-05-13 11:22:31 -0700
commitaf19db7b407656cb21c487da99e3e59f785fb77d (patch)
treea7a08792014c4ec524986d48793c9f9f138620e8 /mesonbuild
parent14fa3da33e1d18f99863eb317c86eebacbc13568 (diff)
downloadmeson-af19db7b407656cb21c487da99e3e59f785fb77d.zip
meson-af19db7b407656cb21c487da99e3e59f785fb77d.tar.gz
meson-af19db7b407656cb21c487da99e3e59f785fb77d.tar.bz2
linkers: Split Visual Studio Linker into a mixin
Because ICL has it's own linker that behaves basically just like the VisualStudioLinker, but with a few peices of extra functionality.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/linkers.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index c6302bf..a24ec21 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -23,7 +23,7 @@ class StaticLinker:
return mesonlib.is_windows()
-class VisualStudioLinker(StaticLinker):
+class VisualStudioLikeLinker:
always_args = ['/NOLOGO']
def __init__(self, exelist, machine):
@@ -31,7 +31,7 @@ class VisualStudioLinker(StaticLinker):
self.machine = machine
def get_exelist(self):
- return self.exelist[:]
+ return self.exelist.copy()
def get_std_link_args(self):
return []
@@ -50,10 +50,10 @@ class VisualStudioLinker(StaticLinker):
return []
def get_always_args(self):
- return VisualStudioLinker.always_args[:]
+ return self.always_args.copy()
def get_linker_always_args(self):
- return VisualStudioLinker.always_args[:]
+ return self.always_args.copy()
def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath):
return []
@@ -77,6 +77,11 @@ class VisualStudioLinker(StaticLinker):
return []
+class VisualStudioLinker(VisualStudioLikeLinker, StaticLinker):
+
+ """Microsoft's lib static linker."""
+
+
class ArLinker(StaticLinker):
def __init__(self, exelist):