Apply constexpr on global constant varaibles

When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.

Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef
이 커밋은 다음에 포함됨:
Tao Sang
2020-07-14 20:10:24 -04:00
커밋한 사람 Tao Sang
부모 2800fc2fa3
커밋 fdef6f722f
62개의 변경된 파일과 224개의 추가작업 그리고 227개의 파일을 삭제
+1 -1
파일 보기
@@ -31,7 +31,7 @@ bool Comgr::is_ready_ = false;
bool Comgr::LoadLib() {
#if defined(COMGR_DYN_DLL)
ClPrint(amd::LOG_INFO, amd::LOG_CODE, "Loading COMGR library.");
static const char* ComgrLibName =
static constexpr const char* ComgrLibName =
LP64_SWITCH(WINDOWS_SWITCH("amd_comgr32.dll", "libamd_comgr32.so.1"),
WINDOWS_SWITCH("amd_comgr.dll", "libamd_comgr.so.1"));
cep_.handle = Os::loadLibrary(ComgrLibName);