Add flags to use clang in MSVS
@@ -1958,12 +1958,27 @@ when ($MSVC_INLINE_OPTIMIZED == "no") {
flags += ['/wd{}'.format(code) for code in warns_disabled]
flags += self.tc.arch_opt
+ if self.tc.ide_msvs and self.tc.use_clang:
+ flags += ['-msse4.1', '-msse4.2'] # temporary solution
+
flags_debug = ['/Ob0', '/Od', '/std:c++17'] + self._gen_defines(defines_debug)
flags_release = ['/Ox', '/Ob2', '/Oi', '/std:c++17'] + self._gen_defines(defines_release)
flags_cxx = []
flags_c_only = []
+ if self.tc.use_clang:
+ flags_cxx += [
+ '-Woverloaded-virtual', '-Wno-invalid-offsetof', '-Wno-attributes',
+ '-Wno-dynamic-exception-spec', # IGNIETFERRO-282 some problems with lucid
+ '-Wno-register', # IGNIETFERRO-722 needed for contrib
+ '-Wimport-preprocessor-directive-pedantic',
+ '-Wno-c++17-extensions',
+ '-Wno-exceptions',
+ '-Wno-inconsistent-missing-override',
+ '-Wno-undefined-var-template',
+ ]
+
if target.is_arm:
masm_io = '-o ${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}'
else:
