From 5873a78d58255ffadde01cfaa56ea81737bbf1ca Mon Sep 17 00:00:00 2001 From: Cordell Bloor Date: Thu, 9 Feb 2023 15:29:06 +0000 Subject: [PATCH] Fix static initialization order Change-Id: I1d51e150b526d050b988fe5a422644667a561cd7 --- runtime/hsa-runtime/core/common/hsa_table_interface.cpp | 6 ------ runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/hsa-runtime/core/common/hsa_table_interface.cpp b/runtime/hsa-runtime/core/common/hsa_table_interface.cpp index b90e3f072f..e438314d32 100644 --- a/runtime/hsa-runtime/core/common/hsa_table_interface.cpp +++ b/runtime/hsa-runtime/core/common/hsa_table_interface.cpp @@ -57,12 +57,6 @@ const HsaApiTable* hsa_table_interface_get_table() { return hsaApiTable; } -class Init { - public: - Init() { rocr::core::LoadInitialHsaApiTable(); } -}; -static Init LinkAtLoadOrFirstTranslationUnitAccess; - // Pass through stub functions hsa_status_t HSA_API hsa_init() { return coreApiTable->hsa_init_fn(); } diff --git a/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp b/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp index bc3257540c..7f71adcdf5 100644 --- a/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp +++ b/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp @@ -406,3 +406,9 @@ void LoadInitialHsaApiTable() { } // namespace core } // namespace rocr + +class Init { + public: + Init() { rocr::core::LoadInitialHsaApiTable(); } +}; +static Init LinkAtLoadOrFirstTranslationUnitAccess;