Fix error: undefined symbol art::instruction_set_details::GetStackOverflowReservedBytesFailure
When ART is built with ART_DEBUG_OPT_FLAG="-O0". Linker fails with the
errors:
ld.lld: error: undefined symbol:
art::instruction_set_details::GetStackOverflowReservedBytesFailure(char
const*)
>>> referenced by instruction_set.h:271
(art/libartbase/arch/instruction_set.h:271)
ld.lld: error: undefined symbol:
art::instruction_set_details::GetStackOverflowReservedBytesFailure(char
const*)
>>> referenced by instruction_set.h:274
(art/libartbase/arch/instruction_set.h:274)
This happens because GetStackOverflowReservedBytesFailure is declared in
art::instruction_set_details but it is not defined there.
This CL puts the definition of GetStackOverflowReservedBytesFailure into
the instruction_set_details namespace.
Follow-up to commit a9b2f7b097d2ce0c354a907748d5864775b32088.
Test: ART_DEBUG_OPT_FLAG="-O0" art/tools/buildbot-build.sh --target
Change-Id: I641d48fd0901292fa94a2c329ad7feea98a6962b
diff --git a/libartbase/arch/instruction_set.cc b/libartbase/arch/instruction_set.cc
index d47f936..8d4fbf4 100644
--- a/libartbase/arch/instruction_set.cc
+++ b/libartbase/arch/instruction_set.cc
@@ -133,11 +133,11 @@
static_assert(ART_FRAME_SIZE_LIMIT < kX86_64StackOverflowReservedBytes,
"Frame size limit too large");
-} // namespace instruction_set_details
-
NO_RETURN void GetStackOverflowReservedBytesFailure(const char* error_msg) {
LOG(FATAL) << error_msg;
UNREACHABLE();
}
+} // namespace instruction_set_details
+
} // namespace art