summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorJohn Chen <jochen@microsoft.com>2016-03-19 09:53:24 -0700
committerJohn Chen <jochen@microsoft.com>2016-03-19 09:53:24 -0700
commited0e57978f1f60b5de9d416fb5bb476a75b83212 (patch)
tree71b00a3c0087200a34905125289adef2debe7813 /src/tools
parent88c4927ff341439ec4fb4b0624689026746a2ba6 (diff)
downloadcoreclr-ed0e57978f1f60b5de9d416fb5bb476a75b83212.tar.gz
coreclr-ed0e57978f1f60b5de9d416fb5bb476a75b83212.tar.bz2
coreclr-ed0e57978f1f60b5de9d416fb5bb476a75b83212.zip
Fix a CrossGen CreatePDB issue that caused a Windows build break
CrossGen /CreatePDB command gives preference to the TPA list while loading assemblies. So if the TPA contains the IL version of the input assembly but not the NI version, we would end up loading the IL instead of NI. This causes the CreatePDB command to fail, since it can't operate on IL images. This is fixed by putting the input file as the first entry in the TPA list. Another issue is when the above error does occur, the error message is very unclear (it only shows "Unspecified error"). This is fixed with a better error message. [tfs-changeset: 1587876]
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/crossgen/crossgen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/crossgen/crossgen.cpp b/src/tools/crossgen/crossgen.cpp
index 2e8e3334fe..1c807f5d21 100644
--- a/src/tools/crossgen/crossgen.cpp
+++ b/src/tools/crossgen/crossgen.cpp
@@ -850,6 +850,14 @@ int _cdecl wmain(int argc, __in_ecount(argc) WCHAR **argv)
#ifdef FEATURE_CORECLR
SString ssTPAList;
+
+ if (fCreatePDB)
+ {
+ // While creating PDB, assembly binder gives preference to files in TPA.
+ // This can create difficulties if the input file is not in TPA.
+ // To avoid this issue, put the input file as the first item in TPA.
+ ssTPAList.Append(pwzFilename);
+ }
// Are we compiling mscorlib.dll?
bool fCompilingMscorlib = StringEndsWith((LPWSTR)pwzFilename, W("mscorlib.dll"));