summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.h
diff options
context:
space:
mode:
authorAlexey Alexandrov <aalexand@google.com>2016-09-19 09:33:49 -0700
committerAlexey Alexandrov <aalexand@google.com>2016-10-05 19:20:14 -0700
commitab40c1108330caee9a01317628a28dac4c5a8bf1 (patch)
tree0e03c80a8a74cc4bed3f8dba8f238ce6ba2f6f0a /compiler/driver/compiler_options.h
parent2f61867045ffbd0c38a4ecec5f59632004f7efff (diff)
Generate SHA-1 build ID for host-generated *.oat files (1/2).
For host-generated *.oat files, generate a SHA-1 build ID based on the file content and write it to .note.gnu.build-id ELF section. This should allow various developer tools like profilers correlate the data captured for files like boot.oat on the device with the corresponding known version of the file during an offline analysis. Test: Verified that boot.oat contains the build ID section now (with this change and https://android-review.googlesource.com/#/c/275630 applied) Test: Added ElfWriterTest::CheckBuildIdPresent test. Test: make test-art-host Bug: 31292208 Change-Id: Ie5e89da2ef87e34c27c0237ab34ddc7d2dc0aa3b
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r--compiler/driver/compiler_options.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 8e4a775558..3c920d9601 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -187,6 +187,10 @@ class CompilerOptions FINAL {
return generate_mini_debug_info_;
}
+ bool GetGenerateBuildId() const {
+ return generate_build_id_;
+ }
+
bool GetImplicitNullChecks() const {
return implicit_null_checks_;
}
@@ -297,6 +301,7 @@ class CompilerOptions FINAL {
bool debuggable_;
bool generate_debug_info_;
bool generate_mini_debug_info_;
+ bool generate_build_id_;
bool implicit_null_checks_;
bool implicit_so_checks_;
bool implicit_suspend_checks_;