summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSwift Kim <swift.kim@samsung.com>2019-08-01 06:10:49 (GMT)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>2020-04-22 10:19:59 (GMT)
commit3a482e273fe78af736920144e67f6c193c9d6625 (patch)
tree2d5dbcc1c560e014e23751d42417ae6cbfea0120 /src
parent4feb5cbcbeea277f7addb372b3c632e89f9ed1ae (diff)
downloadcoreclr-3a482e273fe78af736920144e67f6c193c9d6625.zip
coreclr-3a482e273fe78af736920144e67f6c193c9d6625.tar.gz
coreclr-3a482e273fe78af736920144e67f6c193c9d6625.tar.bz2
[Tizen] Add a config knob for importing ibc files
Diffstat (limited to 'src')
-rw-r--r--src/inc/clrconfigvalues.h2
-rw-r--r--src/zap/zapimage.cpp15
2 files changed, 15 insertions, 2 deletions
diff --git a/src/inc/clrconfigvalues.h b/src/inc/clrconfigvalues.h
index 2cb127c..98e03e0 100644
--- a/src/inc/clrconfigvalues.h
+++ b/src/inc/clrconfigvalues.h
@@ -325,7 +325,7 @@ RETAIL_CONFIG_DWORD_INFO_EX(UNSUPPORTED_ConvertIbcData, W("ConvertIbcData"), 1,
RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(UNSUPPORTED_DisableHotCold, W("DisableHotCold"), "Master hot/cold splitting switch in Jit64")
RETAIL_CONFIG_DWORD_INFO_EX(UNSUPPORTED_DisableIBC, W("DisableIBC"), 0, "Disables the use of IBC data", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_UseIBCFile, W("UseIBCFile"), 0, "", CLRConfig::REGUTIL_default)
-
+RETAIL_CONFIG_STRING_INFO(EXTERNAL_IBCFileDir, W("IBCFileDir"), "Directory to search for IBC files")
///
/// JIT
diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp
index 4a11405..228ef2a 100644
--- a/src/zap/zapimage.cpp
+++ b/src/zap/zapimage.cpp
@@ -2475,7 +2475,20 @@ HRESULT ZapImage::LocateProfileData()
// Couldn't find profile resource--let's see if there's an ibc file to use instead
//
- SString path(m_pModuleFileName);
+ SString path;
+
+ LPWSTR ibcDir = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_IBCFileDir);
+ if (ibcDir != NULL)
+ {
+ LPCWSTR moduleFileName = wcsrchr(m_pModuleFileName, DIRECTORY_SEPARATOR_CHAR_W);
+ path.Set(ibcDir);
+ path.Append(DIRECTORY_SEPARATOR_CHAR_W);
+ path.Append(moduleFileName);
+ }
+ else
+ {
+ path.Set(m_pModuleFileName); // the same directory as the IL dll
+ }
SString::Iterator dot = path.End();
if (path.FindBack(dot, '.'))