aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/ninjabackend.py4
-rw-r--r--mesonbuild/compilers.py18
2 files changed, 5 insertions, 17 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 1c9196d..dada84f 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -431,12 +431,12 @@ int dummy;
if gcovr_exe:
added_rule = True
elem = NinjaBuildElement(self.all_outputs, 'coverage-xml', 'CUSTOM_COMMAND', '')
- elem.add_item('COMMAND', [gcovr_exe, '-x', '-r', self.environment.get_build_dir(),\
+ elem.add_item('COMMAND', [gcovr_exe, '-x', '-r', self.environment.get_source_dir(),\
'-o', os.path.join(self.environment.get_log_dir(), 'coverage.xml')])
elem.add_item('DESC', 'Generating XML coverage report.')
elem.write(outfile)
elem = NinjaBuildElement(self.all_outputs, 'coverage-text', 'CUSTOM_COMMAND', '')
- elem.add_item('COMMAND', [gcovr_exe, '-r', self.environment.get_build_dir(),\
+ elem.add_item('COMMAND', [gcovr_exe, '-r', self.environment.get_source_dir(),\
'-o', os.path.join(self.environment.get_log_dir(), 'coverage.txt')])
elem.add_item('DESC', 'Generating text coverage report.')
elem.write(outfile)
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 1915644..a320e7d 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -520,7 +520,8 @@ int main () {{ {1}; }}'''
ofile = open(srcname, 'w')
ofile.write(code)
ofile.close()
- extra_args = extra_args + self.get_output_args(dstname)
+ extra_args = self.unix_link_flags_to_native(extra_args) + \
+ self.get_output_args(dstname)
p = self.compile(code, srcname, extra_args)
try:
os.remove(dstname)
@@ -539,7 +540,7 @@ int main () {{ {1}; }}'''
ofile.close()
exename = srcname + '.exe' # Is guaranteed to be executable on every platform.
commands = self.get_exelist()
- commands += extra_args
+ commands += self.unix_link_flags_to_native(extra_args)
commands.append(srcname)
commands += self.get_output_args(exename)
p = subprocess.Popen(commands, cwd=os.path.split(srcname)[0], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -1392,19 +1393,6 @@ class VisualStudioCCompiler(CCompiler):
def build_rpath_args(self, build_dir, rpath_paths, install_rpath):
return []
- def find_library(self, libname, extra_dirs):
- code = '''int main(int argc, char **argv) {
- return 0;
-}
- '''
- args = []
- for i in extra_dirs:
- args += self.get_linker_search_args(i)
- args.append(libname + '.lib')
- if self.links(code, extra_args=args):
- return args
- return None
-
# FIXME, no idea what these should be.
def thread_flags(self):
return []