[x86/Linux] Fix unknown pragma build error (dotnet/coreclr#8427)
authorJonghyun Park <parjong@gmail.com>
Tue, 6 Dec 2016 01:56:58 +0000 (10:56 +0900)
committerJan Kotas <jkotas@microsoft.com>
Tue, 6 Dec 2016 01:56:58 +0000 (17:56 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/6c1b9cc682eccae1e655d8037f06c0f516f2f90b

src/coreclr/src/debug/daccess/nidump.cpp
src/coreclr/src/vm/i386/gmsx86.cpp

index 5ba218d..23e76c4 100644 (file)
@@ -9550,8 +9550,10 @@ mdTypeRef NativeImageDumper::FindTypeRefForMT( PTR_MethodTable mt )
 #undef GC_NOTRIGGER
 
 #if defined _DEBUG && defined _TARGET_X86_ 
+#ifdef _MSC_VER
 // disable FPO for checked build
 #pragma optimize("y", off)
+#endif // _MSC_VER
 #endif
 
 #undef _ASSERTE
index d4b2c0a..75d37ba 100644 (file)
@@ -42,7 +42,9 @@
    
 #if !defined(DACCESS_COMPILE)
 
+#ifdef _MSC_VER
 #pragma optimize("gsy", on )        // optimize to insure that code generation does not have junk in it
+#endif // _MSC_VER
 #pragma warning(disable:4717) 
 
 static int __stdcall zeroFtn() {
@@ -62,7 +64,9 @@ static int __stdcall recursiveFtn() {
 #pragma clang diagnostic pop
 #endif
 
+#ifdef _MSC_VER
 #pragma optimize("", on )
+#endif // _MSC_VER
 
 
 /* Has mscorwks been instrumented so that calls are morphed into push XXXX call <helper> */