Some cleanups.

pull/15/head
Jussi Pakkanen 11 years ago
parent 1967b64180
commit d99717d9d2
  1. 2
      meson.py
  2. 6
      mparser.py
  3. 5
      ninjabackend.py

@ -181,7 +181,7 @@ if __name__ == '__main__':
except Exception as e:
if isinstance(e, MesonException):
if hasattr(e, 'file') and hasattr(e, 'lineno') and hasattr(e, 'colno'):
mlog.log(mlog.red('\nMeson encountered an error in %s:%d,%d:' % (e.file, e.lineno, e.colno)))
mlog.log(mlog.red('\nMeson encountered an error in file %s, line %d, column %d:' % (e.file, e.lineno, e.colno)))
else:
mlog.log(mlog.red('\nMeson encountered an error:'))
mlog.log(e)

@ -16,11 +16,11 @@
import re
import sys
from coredata import MesonException
class ParseException(Exception):
class ParseException(MesonException):
def __init__(self, text, lineno, colno):
super().__init__()
self.text = text
super().__init__(text)
self.lineno = lineno
self.colno = colno

@ -732,11 +732,12 @@ class NinjaBackend(backends.Backend):
commands += linker.get_std_link_flags()
else:
raise RuntimeError('Unknown build target type.')
for dep in target.get_external_deps():
commands += dep.get_link_flags()
dependencies = target.get_dependencies()
commands += self.build_target_link_arguments(linker, dependencies)
commands += target.link_flags
# External deps must be last because target link libraries may depend on them.
for dep in target.get_external_deps():
commands += dep.get_link_flags()
commands += linker.build_rpath_args(self.environment.get_build_dir(), target.get_rpaths())
if self.environment.coredata.coverage:
commands += linker.get_coverage_link_flags()

Loading…
Cancel
Save