summaryrefslogtreecommitdiff
path: root/src/zap/zapper.cpp
diff options
context:
space:
mode:
authorJohn Chen (JOCHEN7) <jochen@microsoft.com>2016-02-23 20:36:07 -0800
committerJohn Chen (JOCHEN7) <jochen@microsoft.com>2016-02-29 13:55:49 -0800
commit488e6a16685241ed1aed3b3d386b78ed32e428f0 (patch)
tree9fd979bdde69b08216c6dde6a466fa3ff519c775 /src/zap/zapper.cpp
parent2d98b6a53263b9ad4b98e4a5dee35e703fd7ddf5 (diff)
downloadcoreclr-488e6a16685241ed1aed3b3d386b78ed32e428f0.tar.gz
coreclr-488e6a16685241ed1aed3b3d386b78ed32e428f0.tar.bz2
coreclr-488e6a16685241ed1aed3b3d386b78ed32e428f0.zip
Support long paths in CoreCLR runtime on Windows
The CoreCLR runtime is updated to support long file paths on Windows. Pending updates to mscorlib.dll, the following scenarios are supported: * Run managed apps from a long path. * Load CoreCLR runtime and framework from a long path. * Load user assemblies from a long path. * Run CrossGen from a long path, with its input/output from a long path. * Generate debug log file at a long path. The following scenarios are not yet supported, and will be fixed in future commits: * Mscorlib.dll and framework assemblies are not yet long path compatible. Note that until mscorlib.dll is fixed, most of the runtime changes can't actually be used. * Support on non-Windows platforms. * Support for debugging and error reporting. * Tools such as ilasm or ildasm.
Diffstat (limited to 'src/zap/zapper.cpp')
-rw-r--r--src/zap/zapper.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/zap/zapper.cpp b/src/zap/zapper.cpp
index 77bb114143..626e1a0f1e 100644
--- a/src/zap/zapper.cpp
+++ b/src/zap/zapper.cpp
@@ -546,6 +546,7 @@ Zapper::Zapper(NGenOptions *pOptions, bool fromDllHost)
zo->m_compilerFlags |= CORJIT_FLG_PROF_ENTERLEAVE;
}
+#ifdef FEATURE_FUSION
if (pOptions->lpszRepositoryDir != NULL && pOptions->lpszRepositoryDir[0] != '\0')
{
size_t buflen = wcslen(pOptions->lpszRepositoryDir) + 1;
@@ -589,6 +590,7 @@ Zapper::Zapper(NGenOptions *pOptions, bool fromDllHost)
if (zo->m_repositoryFlags == RepositoryDefault)
zo->m_repositoryFlags = MoveFromRepository;
}
+#endif //FEATURE_FUSION
if (pOptions->fInstrument)
zo->m_compilerFlags |= CORJIT_FLG_BBINSTR;
@@ -3238,7 +3240,7 @@ void Zapper::GetOutputFolder()
// active use because process ID is unique), increment N, and try again. Give up if N gets too large.
for (DWORD n = 0; ; n++)
{
- swprintf_s(m_outputPath, W("%s\\%x-%x"), (LPCWSTR)tempPath, GetCurrentProcessId(), n);
+ m_outputPath.Printf(W("%s\\%x-%x"), (LPCWSTR)tempPath, GetCurrentProcessId(), n);
if (WszCreateDirectory(m_outputPath, NULL))
break;
@@ -3576,11 +3578,11 @@ void Zapper::CompileAssembly(CORCOMPILE_NGEN_SIGNATURE * pNativeImageSig)
const WCHAR * pathend = wcsrchr( assemblyPath, DIRECTORY_SEPARATOR_CHAR_W );
if( pathend )
{
- wcsncpy_s(m_outputPath, _countof(m_outputPath), assemblyPath, pathend - assemblyPath);
+ m_outputPath.Set(assemblyPath, COUNT_T(pathend - assemblyPath));
}
else
{
- wcscpy_s(m_outputPath, _countof(m_outputPath), W(".") DIRECTORY_SEPARATOR_STR_W);
+ m_outputPath.Set(W(".") DIRECTORY_SEPARATOR_STR_W);
}
}
#endif // FEATURE_FUSION