summaryrefslogtreecommitdiff
path: root/src/zap
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2017-06-14 18:44:12 -0700
committerBrian Sullivan <briansul@microsoft.com>2017-06-14 18:44:12 -0700
commitf79d7e81f70739ab9ae266382aecdfd8c750d06d (patch)
tree79b9a41677b7f1f39d15135cdef37ed3d221c92a /src/zap
parent7f00fec141ca1b222b1c113d2de055e80728bb99 (diff)
downloadcoreclr-f79d7e81f70739ab9ae266382aecdfd8c750d06d.tar.gz
coreclr-f79d7e81f70739ab9ae266382aecdfd8c750d06d.tar.bz2
coreclr-f79d7e81f70739ab9ae266382aecdfd8c750d06d.zip
Crossgen - Disable the Target-dependent SIMD vector types warning
When a SIMD type is referenced during CEEPreloader instead of loading it we throw a type load exception with a unique resource ID and message. This commit changed the ICorCompileDataStore interface to allow us to pass the unique resource ID over to the zapper from the VM. The Zapper can then demote certain resource ID warnings down to the lowest informational level, so that they aren't printed out during crossgen. With this commit we currently are demoting IDS_EE_SIMD_NGEN_DISALLOWED
Diffstat (limited to 'src/zap')
-rw-r--r--src/zap/zapcode.cpp2
-rw-r--r--src/zap/zapimage.cpp11
-rw-r--r--src/zap/zapimage.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/src/zap/zapcode.cpp b/src/zap/zapcode.cpp
index 738428354d..8d412225ca 100644
--- a/src/zap/zapcode.cpp
+++ b/src/zap/zapcode.cpp
@@ -983,7 +983,7 @@ void ZapMethodEntryPoint::Resolve(ZapImage * pImage)
{
mdMethodDef token;
pImage->GetCompileInfo()->GetMethodDef(GetHandle(), &token);
- pImage->Error(token, S_OK, W("MapMethodEntryPoint failed"));
+ pImage->Error(token, S_OK, 0, W("MapMethodEntryPoint failed"));
}
else
#endif
diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp
index 61cf099898..469b84176e 100644
--- a/src/zap/zapimage.cpp
+++ b/src/zap/zapimage.cpp
@@ -3553,7 +3553,7 @@ void ZapImage::FileNotFoundError(LPCWSTR pszMessage)
fileNotFoundErrorsTable.Append(message);
}
-void ZapImage::Error(mdToken token, HRESULT hr, LPCWSTR message)
+void ZapImage::Error(mdToken token, HRESULT hr, UINT resID, LPCWSTR message)
{
// Missing dependencies are reported as fatal errors in code:CompilationDomain::BindAssemblySpec.
// Avoid printing redundant error message for them.
@@ -3562,12 +3562,21 @@ void ZapImage::Error(mdToken token, HRESULT hr, LPCWSTR message)
CorZapLogLevel level = CORZAP_LOGLEVEL_ERROR;
+ // Some warnings are demoted to informational level
+ if (resID == IDS_EE_SIMD_NGEN_DISALLOWED)
+ {
+ // Supress printing of "Target-dependent SIMD vector types may not be used with ngen."
+ level = CORZAP_LOGLEVEL_INFO;
+ }
+
if (m_zapper->m_pOpt->m_ignoreErrors)
{
#ifdef CROSSGEN_COMPILE
// Warnings should not go to stderr during crossgen
if (level == CORZAP_LOGLEVEL_ERROR)
+ {
level = CORZAP_LOGLEVEL_WARNING;
+ }
#endif
m_zapper->Print(level, W("Warning: "));
}
diff --git a/src/zap/zapimage.h b/src/zap/zapimage.h
index f0bcbcb033..582c9a3e88 100644
--- a/src/zap/zapimage.h
+++ b/src/zap/zapimage.h
@@ -829,7 +829,7 @@ public:
// Returns ZapImage
virtual ZapImage * GetZapImage();
- void Error(mdToken token, HRESULT error, LPCWSTR message);
+ void Error(mdToken token, HRESULT error, UINT resID, LPCWSTR message);
// Returns virtual section for EE datastructures
ZapVirtualSection * GetSection(CorCompileSection section)