OSDN Git Service

Android: fix a possible building error
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 12 Sep 2018 11:01:54 +0000 (19:01 +0800)
committerMauro Rossi <issor.oruam@gmail.com>
Thu, 15 Apr 2021 11:05:04 +0000 (13:05 +0200)
The .git/logs/HEAD doesn't always exist. In a new created repo, it may
cause the error:

error: external/llvm/Android.bp:157:1: module "llvm-gen-revision": source path external/llvm/.git/logs/HEAD does not exist

Use wildcard to avoid that.

llvm/Android.bp

index c448a26..75ee6f3 100644 (file)
@@ -157,7 +157,7 @@ llvm_tblgen {
 genrule {
     name: "llvm-gen-revision",
     out: ["llvm/Support/VCSRevision.h"],
-    srcs: [".git/logs/HEAD"],
+    srcs: [".git/logs/HEAD*"],
     tool_files: ["git_sha1_gen.py"],
     cmd: "python $(location git_sha1_gen.py) --output $(out)",
 }