Merge branch 'master' into luasocket

This commit is contained in:
Tom van Dijck 2018-04-05 12:34:41 +02:00 committed by GitHub
commit d93ae33a7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 113 additions and 2 deletions

View File

@ -222,6 +222,115 @@
]]
end
--
-- Test the handling of the SymbolsPath flag.
--
function suite.generateDebugInfo_onSymbolsOn_on2010()
p.action.set("vs2010")
symbols "On"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
]]
end
function suite.generateDebugInfo_onSymbolsFastLink_on2010()
p.action.set("vs2010")
symbols "Off"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
</Link>
]]
end
function suite.generateDebugInfo_onSymbolsFull_on2010()
p.action.set("vs2010")
symbols "Full"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
]]
end
function suite.generateDebugInfo_onSymbolsOn_on2015()
p.action.set("vs2015")
symbols "On"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
]]
end
function suite.generateDebugInfo_onSymbolsFastLink_on2015()
p.action.set("vs2015")
symbols "FastLink"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
]]
end
function suite.generateDebugInfo_onSymbolsFull_on2015()
p.action.set("vs2015")
symbols "Full"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
]]
end
function suite.generateDebugInfo_onSymbolsFull_on2017()
p.action.set("vs2017")
symbols "Full"
symbolspath "$(IntDir)$(TargetName).pdb"
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<ImportLibrary>bin\Debug\MyProject.lib</ImportLibrary>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
]]
end
--
-- Any system libraries specified in links() should be listed as
-- additional dependencies.

View File

@ -2177,7 +2177,7 @@
function m.programDatabaseFile(cfg)
if cfg.symbolspath and cfg.symbols == p.ON and cfg.debugformat ~= "c7" then
if cfg.symbolspath and cfg.symbols ~= p.OFF and cfg.debugformat ~= "c7" then
m.element("ProgramDatabaseFile", nil, p.project.getrelative(cfg.project, cfg.symbolspath))
end
end

View File

@ -688,9 +688,11 @@
api.scope.current = api.scope.global
local currentGlobalBlockCount = #api.scope.global.blocks
for i = currentGlobalBlockCount, numBuiltInGlobalBlocks + 1, -1 do
for i = currentGlobalBlockCount, numBuiltInGlobalBlocks, -1 do
table.remove(api.scope.global.blocks, i)
end
configset.addFilter(api.scope.current, {}, os.getcwd())
end