|
|
|
@ -469,7 +469,7 @@ class CCompiler(Compiler): |
|
|
|
|
def get_warn_args(self, level): |
|
|
|
|
return self.warn_args[level] |
|
|
|
|
|
|
|
|
|
def get_soname_args(self, shlib_name, path, soversion): |
|
|
|
|
def get_soname_args(self, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
def split_shlib_to_parts(self, fname): |
|
|
|
@ -1104,7 +1104,7 @@ class MonoCompiler(Compiler): |
|
|
|
|
def get_link_args(self, fname): |
|
|
|
|
return ['-r:' + fname] |
|
|
|
|
|
|
|
|
|
def get_soname_args(self, shlib_name, path, soversion): |
|
|
|
|
def get_soname_args(self, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
def get_werror_args(self): |
|
|
|
@ -1191,7 +1191,7 @@ class JavaCompiler(Compiler): |
|
|
|
|
self.id = 'unknown' |
|
|
|
|
self.javarunner = 'java' |
|
|
|
|
|
|
|
|
|
def get_soname_args(self, shlib_name, path, soversion): |
|
|
|
|
def get_soname_args(self, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
def get_werror_args(self): |
|
|
|
@ -1466,7 +1466,7 @@ class DCompiler(Compiler): |
|
|
|
|
def get_std_shared_lib_link_args(self): |
|
|
|
|
return ['-shared'] |
|
|
|
|
|
|
|
|
|
def get_soname_args(self, shlib_name, path, soversion): |
|
|
|
|
def get_soname_args(self, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
def get_unittest_args(self): |
|
|
|
@ -1887,13 +1887,14 @@ CLANG_OSX = 1 |
|
|
|
|
CLANG_WIN = 2 |
|
|
|
|
# Possibly clang-cl? |
|
|
|
|
|
|
|
|
|
def get_gcc_soname_args(gcc_type, shlib_name, path, soversion): |
|
|
|
|
def get_gcc_soname_args(gcc_type, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
if soversion is None: |
|
|
|
|
sostr = '' |
|
|
|
|
else: |
|
|
|
|
sostr = '.' + soversion |
|
|
|
|
if gcc_type == GCC_STANDARD or gcc_type == GCC_MINGW: |
|
|
|
|
# Might not be correct for mingw but seems to work. |
|
|
|
|
return ['-Wl,-soname,%s%s.%s%s' % (prefix, shlib_name, suffix, sostr)] |
|
|
|
|
return ['-Wl,-soname,%s%s' % (shlib_name, sostr)] |
|
|
|
|
elif gcc_type == GCC_OSX: |
|
|
|
|
return ['-install_name', os.path.join(path, 'lib' + shlib_name + '.dylib')] |
|
|
|
@ -1953,8 +1954,8 @@ class GnuCompiler: |
|
|
|
|
def split_shlib_to_parts(self, fname): |
|
|
|
|
return (os.path.split(fname)[0], fname) |
|
|
|
|
|
|
|
|
|
def get_soname_args(self, shlib_name, path, soversion): |
|
|
|
|
return get_gcc_soname_args(self.gcc_type, shlib_name, path, soversion) |
|
|
|
|
def get_soname_args(self, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
return get_gcc_soname_args(self.gcc_type, prefix, shlib_name, suffix, path, soversion) |
|
|
|
|
|
|
|
|
|
class GnuCCompiler(GnuCompiler, CCompiler): |
|
|
|
|
def __init__(self, exelist, version, gcc_type, is_cross, exe_wrapper=None, defines=None): |
|
|
|
@ -2079,7 +2080,7 @@ class ClangCompiler(): |
|
|
|
|
# so it might change semantics at any time. |
|
|
|
|
return ['-include-pch', os.path.join (pch_dir, self.get_pch_name (header))] |
|
|
|
|
|
|
|
|
|
def get_soname_args(self, shlib_name, path, soversion): |
|
|
|
|
def get_soname_args(self, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
if self.clang_type == CLANG_STANDARD: |
|
|
|
|
gcc_type = GCC_STANDARD |
|
|
|
|
elif self.clang_type == CLANG_OSX: |
|
|
|
@ -2088,7 +2089,7 @@ class ClangCompiler(): |
|
|
|
|
gcc_type = GCC_MINGW |
|
|
|
|
else: |
|
|
|
|
raise MesonException('Unreachable code when converting clang type to gcc type.') |
|
|
|
|
return get_gcc_soname_args(gcc_type, shlib_name, path, soversion) |
|
|
|
|
return get_gcc_soname_args(gcc_type, prefix, shlib_name, suffix, path, soversion) |
|
|
|
|
|
|
|
|
|
class ClangCCompiler(ClangCompiler, CCompiler): |
|
|
|
|
def __init__(self, exelist, version, clang_type, is_cross, exe_wrapper=None): |
|
|
|
@ -2226,8 +2227,8 @@ end program prog |
|
|
|
|
def split_shlib_to_parts(self, fname): |
|
|
|
|
return (os.path.split(fname)[0], fname) |
|
|
|
|
|
|
|
|
|
def get_soname_args(self, shlib_name, path, soversion): |
|
|
|
|
return get_gcc_soname_args(self.gcc_type, shlib_name, path, soversion) |
|
|
|
|
def get_soname_args(self, prefix, shlib_name, suffix, path, soversion): |
|
|
|
|
return get_gcc_soname_args(self.gcc_type, prefix, shlib_name, suffix, path, soversion) |
|
|
|
|
|
|
|
|
|
def get_dependency_gen_args(self, outtarget, outfile): |
|
|
|
|
# Disabled until this is fixed: |
|
|
|
|