aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index acd401e..55ef243 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -923,7 +923,7 @@ class NinjaBackend(backends.Backend):
# Generate rules for building the remaining source files in this target
outname = self.get_target_filename(target)
obj_list = []
- is_unity = target.is_unity
+ is_unity = self.is_unity(target)
header_deps = []
unity_src = []
unity_deps = [] # Generated sources that must be built before compiling a Unity target.
@@ -1684,7 +1684,7 @@ class NinjaBackend(backends.Backend):
valac_outputs.append(vala_c_file)
args = self.generate_basic_compiler_args(target, valac)
- args += valac.get_colorout_args(target.get_option(OptionKey('b_colorout')))
+ args += valac.get_colorout_args(self.get_target_option(target, 'b_colorout'))
# Tell Valac to output everything in our private directory. Sadly this
# means it will also preserve the directory components of Vala sources
# found inside the build tree (generated sources).
@@ -1696,7 +1696,7 @@ class NinjaBackend(backends.Backend):
# Outputted header
hname = os.path.join(self.get_target_dir(target), target.vala_header)
args += ['--header', hname]
- if target.is_unity:
+ if self.is_unity(target):
# Without this the declarations will get duplicated in the .c
# files and cause a build failure when all of them are
# #include-d in one .c file.
@@ -1972,8 +1972,8 @@ class NinjaBackend(backends.Backend):
# https://github.com/rust-lang/rust/issues/39016
if not isinstance(target, build.StaticLibrary):
try:
- buildtype = target.get_option(OptionKey('buildtype'))
- crt = target.get_option(OptionKey('b_vscrt'))
+ buildtype = self.get_target_option(target, 'buildtype')
+ crt = self.get_target_option(target, 'b_vscrt')
args += rustc.get_crt_link_args(crt, buildtype)
except KeyError:
pass
@@ -3424,9 +3424,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
# Add things like /NOLOGO; usually can't be overridden
commands += linker.get_linker_always_args()
# Add buildtype linker args: optimization level, etc.
- commands += linker.get_optimization_link_args(target.get_option(OptionKey('optimization')))
+ commands += linker.get_optimization_link_args(self.get_target_option(target, 'optimization'))
# Add /DEBUG and the pdb filename when using MSVC
- if target.get_option(OptionKey('debug')):
+ if self.get_target_option(target, 'debug'):
commands += self.get_link_debugfile_args(linker, target)
debugfile = self.get_link_debugfile_name(linker, target)
if debugfile is not None: