From 9fadce2c690d16a391e716c25c0618d33b8f4b37 Mon Sep 17 00:00:00 2001 From: "R. Blaine Whittle" Date: Wed, 10 May 2017 10:31:34 -0700 Subject: [PATCH] Fix to masm support for SEH to work on a per file basis --- src/actions/vstudio/vs2010_vcxproj.lua | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index ab56380d..e6f7c0d2 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -786,14 +786,19 @@ priority = 7, emitFiles = function(prj, group) - local fileCfgFunc = { - m.excludedFromBuild, - m.exceptionHandlingSEH, - } - - m.emitFiles(prj, group, "Masm", nil, fileCfgFunc, function(cfg) - return cfg.system == p.WINDOWS - end) + local fileCfgFunc = function(fcfg, condition) + if fcfg then + return { + m.excludedFromBuild, + m.exceptionHandlingSEH, + } + else + return { + m.excludedFromBuild + } + end + end + m.emitFiles(prj, group, "Masm", nil, fileCfgFunc) end, emitFilter = function(prj, group) @@ -1341,7 +1346,7 @@ function m.exceptionHandlingSEH(filecfg, condition) - if not filecfg or filecfg.project.exceptionhandling == "SEH" then + if not filecfg or filecfg.exceptionhandling == "SEH" then m.element("UseSafeExceptionHandlers", condition, "true") end end