summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorJohn Chen (JOCHEN7) <jochen@microsoft.com>2016-02-24 04:36:07 (GMT)
committerJohn Chen (JOCHEN7) <jochen@microsoft.com>2016-02-29 21:55:49 (GMT)
commit488e6a16685241ed1aed3b3d386b78ed32e428f0 (patch)
tree9fd979bdde69b08216c6dde6a466fa3ff519c775 /src/tools
parent2d98b6a53263b9ad4b98e4a5dee35e703fd7ddf5 (diff)
downloadcoreclr-488e6a16685241ed1aed3b3d386b78ed32e428f0.zip
coreclr-488e6a16685241ed1aed3b3d386b78ed32e428f0.tar.gz
coreclr-488e6a16685241ed1aed3b3d386b78ed32e428f0.tar.bz2
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/tools')
-rw-r--r--src/tools/crossgen/crossgen.cpp40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/tools/crossgen/crossgen.cpp b/src/tools/crossgen/crossgen.cpp
index 973e775..16a2819 100644
--- a/src/tools/crossgen/crossgen.cpp
+++ b/src/tools/crossgen/crossgen.cpp
@@ -464,7 +464,7 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
LPCWSTR pwzAppNiPaths = nullptr;
LPCWSTR pwzPlatformAssembliesPaths = nullptr;
LPCWSTR pwzPlatformWinmdPaths = nullptr;
- WCHAR wzDirectoryToStorePDB[MAX_LONGPATH] = W("\0");
+ StackSString wzDirectoryToStorePDB;
bool fCreatePDB = false;
bool fGeneratePDBLinesInfo = false;
LPWSTR pwzSearchPathForManagedPDB = NULL;
@@ -696,28 +696,14 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
dwFlags = dwFlags & ~(NGENWORKER_FLAGS_FULLTRUSTDOMAIN | NGENWORKER_FLAGS_READYTORUN);
// Parse: <directory to store PDB>
- if (wcscpy_s(
- wzDirectoryToStorePDB,
- _countof(wzDirectoryToStorePDB),
- argv[0]) != 0)
- {
- Output(W("Unable to parse output directory to store PDB"));
- exit(FAILURE_RESULT);
- }
+ wzDirectoryToStorePDB.Set(argv[0]);
argv++;
argc--;
// Ensure output dir ends in a backslash, or else diasymreader has issues
- if (wzDirectoryToStorePDB[wcslen(wzDirectoryToStorePDB)-1] != DIRECTORY_SEPARATOR_CHAR_W)
+ if (wzDirectoryToStorePDB[wzDirectoryToStorePDB.GetCount()-1] != DIRECTORY_SEPARATOR_CHAR_W)
{
- if (wcscat_s(
- wzDirectoryToStorePDB,
- _countof(wzDirectoryToStorePDB),
- DIRECTORY_SEPARATOR_STR_W) != 0)
- {
- Output(W("Unable to parse output directory to store PDB"));
- exit(FAILURE_RESULT);
- }
+ wzDirectoryToStorePDB.Append(DIRECTORY_SEPARATOR_STR_W);
}
if (argc == 0)
@@ -773,28 +759,14 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
dwFlags = dwFlags & ~NGENWORKER_FLAGS_READYTORUN;
// Parse: <directory to store PDB>
- if (wcscpy_s(
- wzDirectoryToStorePDB,
- _countof(wzDirectoryToStorePDB),
- argv[0]) != 0)
- {
- Output(W("Unable to parse output directory to store perfmap"));
- exit(FAILURE_RESULT);
- }
+ wzDirectoryToStorePDB.Set(argv[0]);
argv++;
argc--;
// Ensure output dir ends in a backslash
if (wzDirectoryToStorePDB[wcslen(wzDirectoryToStorePDB)-1] != DIRECTORY_SEPARATOR_CHAR_W)
{
- if (wcscat_s(
- wzDirectoryToStorePDB,
- _countof(wzDirectoryToStorePDB),
- DIRECTORY_SEPARATOR_STR_W) != 0)
- {
- Output(W("Unable to parse output directory to store perfmap"));
- exit(FAILURE_RESULT);
- }
+ wzDirectoryToStorePDB.Append(DIRECTORY_SEPARATOR_STR_W);
}
if (argc == 0)