Skip to content

Commit

Permalink
backend/ninja: remove duplicate isinstance() check
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Mar 28, 2024
1 parent 2812b21 commit 875a9b7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mesonbuild/backend/ninjabackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2782,10 +2782,11 @@ def generate_llvm_ir_compile(self, target, src):
rel_obj = os.path.join(self.get_target_private_dir(target), obj_basename)
rel_obj += '.' + self.environment.machines[target.for_machine].get_object_suffix()
commands += self.get_compile_debugfile_args(compiler, target, rel_obj)
if isinstance(src, File) and src.is_built:
rel_src = src.fname
elif isinstance(src, File):
rel_src = src.rel_to_builddir(self.build_to_src)
if isinstance(src, File):
if src.is_built:
rel_src = src.fname
else:
rel_src = src.rel_to_builddir(self.build_to_src)
else:
raise InvalidArguments(f'Invalid source type: {src!r}')
# Write the Ninja build command
Expand Down

0 comments on commit 875a9b7

Please sign in to comment.