diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-22 14:27:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-22 14:27:06 +0300 |
commit | 33b5ddf35e4c3f7a651f3fff13b0c4227c87e225 (patch) | |
tree | 862436e2672fbb2919b606da809cb3ddc3e4c20f /mesonbuild/interpreter.py | |
parent | e107017b3bc73d8f04d43d47f2ccb7eecc817aaa (diff) | |
parent | 35ffb1a7c262acbcd15e532855471b0cb38379b5 (diff) | |
download | meson-33b5ddf35e4c3f7a651f3fff13b0c4227c87e225.zip meson-33b5ddf35e4c3f7a651f3fff13b0c4227c87e225.tar.gz meson-33b5ddf35e4c3f7a651f3fff13b0c4227c87e225.tar.bz2 |
Merge pull request #1654 from dcbaker/c-cpp-link
Add a testcase for linking C and C++ static archives into a shared li…
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index ed08987..eaaea73 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -982,14 +982,7 @@ class CompilerHolder(InterpreterObject): if required and not linkargs: l = self.compiler.language.capitalize() raise InterpreterException('{} library {!r} not found'.format(l, libname)) - # If this is set to None, the library and link arguments are for - # a C-like compiler. Otherwise, it's for some other language that has - # a find_library implementation. We do this because it's easier than - # maintaining a list of languages that can consume C libraries. - lang = None - if self.compiler.language == 'vala': - lang = 'vala' - lib = dependencies.ExternalLibrary(libname, linkargs, language=lang) + lib = dependencies.ExternalLibrary(libname, linkargs, self.compiler.language) return ExternalLibraryHolder(lib) def has_argument_method(self, args, kwargs): @@ -2320,9 +2313,11 @@ class Interpreter(InterpreterBase): raise InterpreterException('Input must be a string or a file') if isinstance(inputfile, str): inputfile = os.path.join(self.subdir, inputfile) + ifile_abs = os.path.join(self.environment.source_dir, inputfile) else: + ifile_abs = inputfile.absolute_path(self.environment.source_dir, + self.environment.build_dir) inputfile = inputfile.relative_name() - ifile_abs = os.path.join(self.environment.source_dir, inputfile) elif 'command' in kwargs and '@INPUT@' in kwargs['command']: raise InterpreterException('@INPUT@ used as command argument, but no input file specified.') # Validate output |