diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-07-13 22:18:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-13 22:18:50 +0300 |
commit | 64919b1c7463d2adceec961350f33707cae9718b (patch) | |
tree | 1be6f8d33b822ab20d443fdde18a107f3b45c5a6 /mesonbuild/compilers.py | |
parent | 38a896ae5154b54865db57bbd8f3ddc69a8083ba (diff) | |
parent | f8d75883724e115083bff1befa75def42be282c5 (diff) | |
download | meson-64919b1c7463d2adceec961350f33707cae9718b.zip meson-64919b1c7463d2adceec961350f33707cae9718b.tar.gz meson-64919b1c7463d2adceec961350f33707cae9718b.tar.bz2 |
Merge pull request #417 from nirbheek/dll-paths
Fix filenames and paths used in DLL shared library generation
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 8ee86bc..55a4384 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -274,6 +274,13 @@ class Compiler(): def get_linker_always_args(self): return [] + def gen_import_library_args(self, implibname): + """ + Used only on Windows for libraries that need an import library. + This currently means C, C++, Fortran. + """ + return [] + def get_options(self): return {} # build afresh every time @@ -473,6 +480,14 @@ class CCompiler(Compiler): def get_linker_search_args(self, dirname): return ['-L'+dirname] + def gen_import_library_args(self, implibname): + """ + The name of the outputted import library + + This implementation is used only on Windows by compilers that use GNU ld + """ + return ['-Wl,--out-implib=' + implibname] + def sanity_check_impl(self, work_dir, environment, sname, code): mlog.debug('Sanity testing ' + self.language + ' compiler:', ' '.join(self.exelist)) mlog.debug('Is cross compiler: %s.' % str(self.is_cross)) @@ -1499,6 +1514,10 @@ class VisualStudioCCompiler(CCompiler): objname = os.path.splitext(pchname)[0] + '.obj' return (objname, ['/Yc' + header, '/Fp' + pchname, '/Fo' + objname ]) + def gen_import_library_args(self, implibname): + "The name of the outputted import library" + return ['/IMPLIB:' + implibname] + def build_rpath_args(self, build_dir, rpath_paths, install_rpath): return [] @@ -2057,6 +2076,14 @@ class GnuFortranCompiler(FortranCompiler): def get_always_args(self): return ['-pipe'] + def gen_import_library_args(self, implibname): + """ + The name of the outputted import library + + Used only on Windows + """ + return ['-Wl,--out-implib=' + implibname] + class G95FortranCompiler(FortranCompiler): def __init__(self, exelist, version, is_cross, exe_wrapper=None): super().__init__(exelist, version, is_cross, exe_wrapper=None) @@ -2068,6 +2095,14 @@ class G95FortranCompiler(FortranCompiler): def get_always_args(self): return ['-pipe'] + def gen_import_library_args(self, implibname): + """ + The name of the outputted import library + + Used only on Windows + """ + return ['-Wl,--out-implib=' + implibname] + class SunFortranCompiler(FortranCompiler): def __init__(self, exelist, version, is_cross, exe_wrapper=None): super().__init__(exelist, version, is_cross, exe_wrapper=None) |