From 9b727bdd34b63e986d9882be65710d6231e3c124 Mon Sep 17 00:00:00 2001
From: Frederich Munch <marsupial@users.noreply.github.com>
Date: Wed, 30 Nov 2016 12:24:59 -0500
Subject: [PATCH] Windows: Add compiler flags to ignore linkage spec errors.

---
 interpreter/cling/lib/Interpreter/CIFactory.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/interpreter/cling/lib/Interpreter/CIFactory.cpp b/interpreter/cling/lib/Interpreter/CIFactory.cpp
index 74b3680b2e6..6f63e9490b4 100644
--- a/interpreter/cling/lib/Interpreter/CIFactory.cpp
+++ b/interpreter/cling/lib/Interpreter/CIFactory.cpp
@@ -203,6 +203,16 @@ namespace {
       }
 #endif
 
+      // Windows headers use '__declspec(dllexport) __cdecl' for most funcs
+      // causing a lot of warnings for different redeclarations (eg. coming from
+      // the test suite).
+      // Do not warn about such cases.
+      sArguments.addArgument("-Wno-dll-attribute-on-redeclaration");
+      sArguments.addArgument("-Wno-inconsistent-dllimport");
+      //sArguments.addArgument("-Wno-ignored-attributes");
+      //sArguments.addArgument("-Wno-dllimport-static-field-def");
+      //sArguments.addArgument("-Wno-microsoft-template");
+
 #else // _MSC_VER
 
       // Skip LLVM_CXX execution if -nostdinc++ was provided.
-- 
GitLab