mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
vs2019 fixes, initial clang-cl support (#5698)
* Add initial clangcl support * Fix uwp builds' vs version typos * Add missing vs2019 toolchain.lua bits
This commit is contained in:
parent
5707a77cfe
commit
fc31772d53
11
makefile
11
makefile
@ -1179,7 +1179,7 @@ endif
|
||||
|
||||
.PHONY: vs2017_uwp
|
||||
vs2017_uwp: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=winstore82 --osd=uwp --NO_USE_MIDI=1 --NO_OPENGL=1 --USE_QTDEBUG=0 --NO_USE_PORTAUDIO=1 --MODERN_WIN_API=1 vs2015
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=winstore82 --osd=uwp --NO_USE_MIDI=1 --NO_OPENGL=1 --USE_QTDEBUG=0 --NO_USE_PORTAUDIO=1 --MODERN_WIN_API=1 vs2017
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2017-winstore82/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
@ -1202,6 +1202,13 @@ ifdef MSBUILD
|
||||
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2019/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
|
||||
.PHONY: vs2019_clang
|
||||
vs2019_clang: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=clangcl vs2019
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2019-clang/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
|
||||
.PHONY: vs2019_intel
|
||||
vs2019_intel: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=intel-15 vs2019
|
||||
@ -1211,7 +1218,7 @@ endif
|
||||
|
||||
.PHONY: vs2019_uwp
|
||||
vs2019_uwp: generate
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=winstore82 --osd=uwp --NO_USE_MIDI=1 --NO_OPENGL=1 --USE_QTDEBUG=0 --NO_USE_PORTAUDIO=1 --MODERN_WIN_API=1 vs2015
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --vs=winstore82 --osd=uwp --NO_USE_MIDI=1 --NO_OPENGL=1 --USE_QTDEBUG=0 --NO_USE_PORTAUDIO=1 --MODERN_WIN_API=1 vs2019
|
||||
ifdef MSBUILD
|
||||
$(SILENT) msbuild.exe $(PROJECTDIR_WIN)/vs2019-winstore82/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
||||
endif
|
||||
|
@ -1443,6 +1443,29 @@ if _OPTIONS["vs"]=="intel-15" then
|
||||
}
|
||||
end
|
||||
|
||||
if _OPTIONS["vs"]=="clangcl" then
|
||||
buildoptions {
|
||||
"-Wno-enum-conversion",
|
||||
"-Wno-ignored-qualifiers",
|
||||
"-Wno-missing-braces",
|
||||
"-Wno-missing-field-initializers",
|
||||
"-Wno-new-returns-null",
|
||||
"-Wno-nonportable-include-path",
|
||||
"-Wno-pointer-bool-conversion",
|
||||
"-Wno-pragma-pack",
|
||||
"-Wno-switch",
|
||||
"-Wno-tautological-constant-out-of-range-compare",
|
||||
"-Wno-tautological-pointer-compare",
|
||||
"-Wno-unknown-warning-option",
|
||||
"-Wno-unused-const-variable",
|
||||
"-Wno-unused-function",
|
||||
"-Wno-unused-label",
|
||||
"-Wno-unused-local-typedef",
|
||||
"-Wno-unused-private-field",
|
||||
"-Wno-unused-variable",
|
||||
}
|
||||
end
|
||||
|
||||
linkoptions {
|
||||
"/ignore:4221", -- LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ newoption {
|
||||
{ "vs2015-xp", "Visual Studio 2015 targeting XP" },
|
||||
{ "vs2017-clang", "Clang 3.6" },
|
||||
{ "vs2017-xp", "Visual Studio 2017 targeting XP" },
|
||||
{ "clangcl", "Visual Studio 2019 using Clang/LLVM" },
|
||||
{ "winphone8", "Windows Phone 8.0" },
|
||||
{ "winphone81", "Windows Phone 8.1" },
|
||||
{ "winstore81", "Windows Store 8.1" },
|
||||
@ -452,6 +453,33 @@ function toolchain(_buildDir, _subDir)
|
||||
premake.vstudio.toolset = ("v141_xp")
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-xp")
|
||||
end
|
||||
elseif _ACTION == "vs2019" or _ACTION == "vs2019-fastbuild" then
|
||||
|
||||
if "clangcl" == _OPTIONS["vs"] then
|
||||
premake.vstudio.toolset = ("ClangCL")
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-clang")
|
||||
end
|
||||
|
||||
if "winstore82" == _OPTIONS["vs"] then
|
||||
premake.vstudio.toolset = "v142"
|
||||
premake.vstudio.storeapp = "10.0"
|
||||
|
||||
-- If needed, depending on GENie version, enable file-level configuration
|
||||
if enablefilelevelconfig ~= nil then
|
||||
enablefilelevelconfig()
|
||||
end
|
||||
|
||||
local action = premake.action.current()
|
||||
action.vstudio.windowsTargetPlatformVersion = windowsPlatform
|
||||
|
||||
platforms { "ARM" }
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-winstore82")
|
||||
end
|
||||
|
||||
if "intel-15" == _OPTIONS["vs"] then
|
||||
premake.vstudio.toolset = "Intel C++ Compiler XE 15.0"
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-intel")
|
||||
end
|
||||
elseif _ACTION == "xcode4" then
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user