ART: Note CC configuration down into oat files
To detect changes in configuration, write the runtime configuration
of ART_USE_READ_BARRIER into the oat file key-value store.
Bug: 34084559
Bug: 12687968
Test: m test-art-host
Test: m ART_USE_READ_BARRIER=true test-art-host
Change-Id: I0b2bd9aa5546538e2b4b669b0acc0a4bebfd7bf0
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 21b03eb..3fbdb89 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -1095,6 +1095,8 @@
compiler_options_->GetNativeDebuggable() ? OatHeader::kTrueValue : OatHeader::kFalseValue);
key_value_store_->Put(OatHeader::kCompilerFilter,
CompilerFilter::NameOfFilter(compiler_options_->GetCompilerFilter()));
+ key_value_store_->Put(OatHeader::kConcurrentCopying,
+ kUseReadBarrier ? OatHeader::kTrueValue : OatHeader::kFalseValue);
}
// Parse the arguments from the command line. In case of an unrecognized option or impossible