Revert "Enable MSVC standard conformance for JIT sources (#67608)" (#67674)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Wed, 6 Apr 2022 23:04:26 +0000 (01:04 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Apr 2022 23:04:26 +0000 (01:04 +0200)
This reverts commit 548bb581b632b40c8caf1aa39514590b7b183926.

src/coreclr/jit/CMakeLists.txt
src/coreclr/jit/unwind.h

index 724a71b..9a088b2 100644 (file)
@@ -11,10 +11,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_
   add_compile_options(-Wno-error)
 endif()
 
-if (MSVC)
-  add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/permissive->)
-endif()
-
 function(create_standalone_jit)
 
   set(oneValueArgs TARGET OS ARCH)
index 34a546b..c578c30 100644 (file)
@@ -79,6 +79,32 @@ protected:
     {
     }
 
+// TODO: How do we get the ability to access uwiComp without error on Clang?
+#if defined(DEBUG) && !defined(__GNUC__)
+
+    template <typename T>
+    T dspPtr(T p)
+    {
+        return uwiComp->dspPtr(p);
+    }
+
+    template <typename T>
+    T dspOffset(T o)
+    {
+        return uwiComp->dspOffset(o);
+    }
+
+    static const char* dspBool(bool b)
+    {
+        return (b) ? "true" : "false";
+    }
+
+#endif // DEBUG
+
+    //
+    // Data
+    //
+
     Compiler* uwiComp;
 };