summaryrefslogtreecommitdiff
path: root/tools/cpp-define-generator/Android.bp
diff options
context:
space:
mode:
author Igor Murashkin <iam@google.com> 2017-02-02 14:33:39 -0800
committer Igor Murashkin <iam@google.com> 2017-02-02 16:18:27 -0800
commit2449a154c457eaa2c6a30e11184bb7381903cfd5 (patch)
treee6f66104451b46f4fe0dce618a11b861a382f08a /tools/cpp-define-generator/Android.bp
parent27374ae7b59094e115ff23139c54ac97088eb01f (diff)
build: Generate asm_support_gen.h from the build, validate up-to-date
When building libart/libartd, also generate asm_support_gen.h automatically. In addition, verify that our checked-in version (runtime/generated/asm_support_gen.h) is up-to-date with what the build generates. Furthermore, add a presubmit hook that runs with 'repo upload' that validates that the up-to-date version of asm_support_gen.h is being uploaded to gerrit. This makes it significantly more difficult to accidentally merge a CL that doesn't have the auto-generated headers updated and break the build as a result. Bug: 34387670 Test: make libart libartd Test: cd art && tools/repohooks/pre-upload.py Change-Id: I1f0f94914d328c396906583d0732e281c076e69f
Diffstat (limited to 'tools/cpp-define-generator/Android.bp')
-rw-r--r--tools/cpp-define-generator/Android.bp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/cpp-define-generator/Android.bp b/tools/cpp-define-generator/Android.bp
index d792e906ef..acb53a1ff9 100644
--- a/tools/cpp-define-generator/Android.bp
+++ b/tools/cpp-define-generator/Android.bp
@@ -34,3 +34,14 @@ art_cc_binary {
"libbase",
],
}
+
+// Note: See $OUT_DIR/soong/build.ninja
+// For the exact filename that this generates to run make command on just
+// this rule later.
+genrule {
+ name: "cpp-define-generator-asm-support",
+ out: ["asm_support_gen.h"],
+ tools: ["cpp-define-generator-data"],
+ tool_files: ["verify-asm-support"],
+ cmd: "$(location verify-asm-support) --quiet \"$(location cpp-define-generator-data)\" \"$(out)\""
+}