From 2449a154c457eaa2c6a30e11184bb7381903cfd5 Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 2 Feb 2017 14:33:39 -0800 Subject: 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 --- tools/cpp-define-generator/Android.bp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools/cpp-define-generator/Android.bp') 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)\"" +} -- cgit v1.2.3-59-g8ed1b