diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-17 22:45:17 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-18 00:30:52 +0200 |
commit | 5eb64a6f3e47b570f544524ef48dc6ef0e4dce59 (patch) | |
tree | 0ce453d143e3c4507f254010cb28b93f5d77f87f /mesonbuild/backend/ninjabackend.py | |
parent | 2009fdbd434279f0feddccc610067dedb7a26133 (diff) | |
download | meson-5eb64a6f3e47b570f544524ef48dc6ef0e4dce59.zip meson-5eb64a6f3e47b570f544524ef48dc6ef0e4dce59.tar.gz meson-5eb64a6f3e47b570f544524ef48dc6ef0e4dce59.tar.bz2 |
Revert "Merge pull request #1931 from centricular/use-patched-ninja"
This reverts commit aab7ada356e02033e4030143cf363d06d975283b, reversing
changes made to e1b24765afd9e7d2d8043a408d69c7ad814d3551.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index ece4e8b..7f974ee 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -177,9 +177,6 @@ int dummy; def generate(self, interp): self.interpreter = interp - self.ninja_command = environment.detect_ninja(log=True) - if self.ninja_command is None: - raise MesonException('Could not detect Ninja v1.5 or newer') outfilename = os.path.join(self.environment.get_build_dir(), self.ninja_filename) tempfilename = outfilename + '~' with open(tempfilename, 'w') as outfile: @@ -213,9 +210,10 @@ int dummy; # http://clang.llvm.org/docs/JSONCompilationDatabase.html def generate_compdb(self): + ninja_exe = environment.detect_ninja() native_compilers = ['%s_COMPILER' % i for i in self.build.compilers] cross_compilers = ['%s_CROSS_COMPILER' % i for i in self.build.cross_compilers] - ninja_compdb = [self.ninja_command, '-t', 'compdb'] + native_compilers + cross_compilers + ninja_compdb = [ninja_exe, '-t', 'compdb'] + native_compilers + cross_compilers builddir = self.environment.get_build_dir() try: jsondb = subprocess.check_output(ninja_compdb, cwd=builddir) @@ -2511,8 +2509,11 @@ rule FORTRAN_DEP_HACK default = 'default all\n\n' outfile.write(default) + ninja_command = environment.detect_ninja() + if ninja_command is None: + raise MesonException('Could not detect Ninja v1.6 or newer') elem = NinjaBuildElement(self.all_outputs, 'clean', 'CUSTOM_COMMAND', 'PHONY') - elem.add_item('COMMAND', [self.ninja_command, '-t', 'clean']) + elem.add_item('COMMAND', [ninja_command, '-t', 'clean']) elem.add_item('description', 'Cleaning.') # If we have custom targets in this project, add all their outputs to |