OSDN Git Service

ninja: use host's ninja if it exists
authorDan Pasanen <invisiblek@cyanogenmod.org>
Wed, 21 Sep 2016 13:31:42 +0000 (08:31 -0500)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Thu, 29 Sep 2016 19:55:49 +0000 (12:55 -0700)
* For whatever reason mainline ninja improves my build significantly

* Allow users to bust out of using whatever binary is provided with the
  build system and use their own copy if they have it installed

Change-Id: I14dbb7b9d8a028d1b0f16e136a8310584df329be

core/ninja.mk

index 9d0ff9a..e7f0413 100644 (file)
@@ -1,4 +1,7 @@
-NINJA ?= prebuilts/ninja/$(HOST_PREBUILT_TAG)/ninja
+NINJA ?= $(shell which ninja)
+ifeq ($(NINJA),)
+  NINJA := prebuilts/ninja/$(HOST_PREBUILT_TAG)/ninja
+endif
 
 ifeq ($(USE_SOONG),true)
 USE_SOONG_FOR_KATI := true