Skip to content

Commit 730ead7

Browse files
authored
Build debuggees for CodeAnalysis (#1450)
This PR adds in a solution file so the debuggees can be built via the solution file for scans.
1 parent 135036d commit 730ead7

17 files changed

Lines changed: 1393 additions & 0 deletions

eng/pipelines/templates/CodeAnalysis.template.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ steps:
44

55
- template: ../tasks/CredScan.yml
66

7+
- template: ../steps/BuildSolution.yml
8+
parameters:
9+
Solution: '$(Build.SourcesDirectory)\test\CppTests\debuggees\sln\debuggees.sln'
10+
Configuration: 'Debug'
11+
OneESPT: false
12+
713
- task: DownloadPipelineArtifact@2
814
displayName: Download Pipeline Artifact
915
inputs:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# sln folder for debuggees
2+
3+
This folder is used for compliance only.
4+
This will build native files with Visual Studio that will be used
5+
to be scanned for CodeQL.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello", "hello\hello.vcxproj", "{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exception", "exception\exception.vcxproj", "{DACA1CDE-23F8-487E-80AD-3092B08408FA}"
9+
EndProject
10+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kitchensink", "kitchensink\kitchensink.vcxproj", "{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}"
11+
EndProject
12+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "natvis", "natvis\natvis.vcxproj", "{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}"
13+
EndProject
14+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sharedlib", "sharedlib\sharedlib.vcxproj", "{440C02EE-BE4E-497E-9611-ED2624441EC6}"
15+
EndProject
16+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemap", "sourcemap\sourcemap.vcxproj", "{30C2C825-3FA4-45D3-94CD-880FF8001B82}"
17+
EndProject
18+
Global
19+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
20+
Debug|Any CPU = Debug|Any CPU
21+
Debug|x64 = Debug|x64
22+
Debug|x86 = Debug|x86
23+
Release|Any CPU = Release|Any CPU
24+
Release|x64 = Release|x64
25+
Release|x86 = Release|x86
26+
EndGlobalSection
27+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
28+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|Any CPU.ActiveCfg = Debug|x64
29+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|Any CPU.Build.0 = Debug|x64
30+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x64.ActiveCfg = Debug|x64
31+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x64.Build.0 = Debug|x64
32+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x86.ActiveCfg = Debug|Win32
33+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Debug|x86.Build.0 = Debug|Win32
34+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|Any CPU.ActiveCfg = Release|x64
35+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|Any CPU.Build.0 = Release|x64
36+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x64.ActiveCfg = Release|x64
37+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x64.Build.0 = Release|x64
38+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x86.ActiveCfg = Release|Win32
39+
{6CA48F21-AF81-4A33-9BBA-0C8132482FF4}.Release|x86.Build.0 = Release|Win32
40+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|Any CPU.ActiveCfg = Debug|x64
41+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|Any CPU.Build.0 = Debug|x64
42+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x64.ActiveCfg = Debug|x64
43+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x64.Build.0 = Debug|x64
44+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x86.ActiveCfg = Debug|Win32
45+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Debug|x86.Build.0 = Debug|Win32
46+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|Any CPU.ActiveCfg = Release|x64
47+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|Any CPU.Build.0 = Release|x64
48+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x64.ActiveCfg = Release|x64
49+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x64.Build.0 = Release|x64
50+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x86.ActiveCfg = Release|Win32
51+
{DACA1CDE-23F8-487E-80AD-3092B08408FA}.Release|x86.Build.0 = Release|Win32
52+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|Any CPU.ActiveCfg = Debug|x64
53+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|Any CPU.Build.0 = Debug|x64
54+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x64.ActiveCfg = Debug|x64
55+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x64.Build.0 = Debug|x64
56+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x86.ActiveCfg = Debug|Win32
57+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Debug|x86.Build.0 = Debug|Win32
58+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|Any CPU.ActiveCfg = Release|x64
59+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|Any CPU.Build.0 = Release|x64
60+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x64.ActiveCfg = Release|x64
61+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x64.Build.0 = Release|x64
62+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x86.ActiveCfg = Release|Win32
63+
{4B56DB42-CBDF-4D0B-A344-83FDF5B502A6}.Release|x86.Build.0 = Release|Win32
64+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|Any CPU.ActiveCfg = Debug|x64
65+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|Any CPU.Build.0 = Debug|x64
66+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x64.ActiveCfg = Debug|x64
67+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x64.Build.0 = Debug|x64
68+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x86.ActiveCfg = Debug|Win32
69+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Debug|x86.Build.0 = Debug|Win32
70+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|Any CPU.ActiveCfg = Release|x64
71+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|Any CPU.Build.0 = Release|x64
72+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x64.ActiveCfg = Release|x64
73+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x64.Build.0 = Release|x64
74+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x86.ActiveCfg = Release|Win32
75+
{A1EB57C0-004A-41D5-BBF0-9E31B53DEF7B}.Release|x86.Build.0 = Release|Win32
76+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|Any CPU.ActiveCfg = Debug|x64
77+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|Any CPU.Build.0 = Debug|x64
78+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x64.ActiveCfg = Debug|x64
79+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x64.Build.0 = Debug|x64
80+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x86.ActiveCfg = Debug|Win32
81+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Debug|x86.Build.0 = Debug|Win32
82+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|Any CPU.ActiveCfg = Release|x64
83+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|Any CPU.Build.0 = Release|x64
84+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x64.ActiveCfg = Release|x64
85+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x64.Build.0 = Release|x64
86+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x86.ActiveCfg = Release|Win32
87+
{440C02EE-BE4E-497E-9611-ED2624441EC6}.Release|x86.Build.0 = Release|Win32
88+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|Any CPU.ActiveCfg = Debug|x64
89+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|Any CPU.Build.0 = Debug|x64
90+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x64.ActiveCfg = Debug|x64
91+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x64.Build.0 = Debug|x64
92+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x86.ActiveCfg = Debug|Win32
93+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Debug|x86.Build.0 = Debug|Win32
94+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|Any CPU.ActiveCfg = Release|x64
95+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|Any CPU.Build.0 = Release|x64
96+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x64.ActiveCfg = Release|x64
97+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x64.Build.0 = Release|x64
98+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x86.ActiveCfg = Release|Win32
99+
{30C2C825-3FA4-45D3-94CD-880FF8001B82}.Release|x86.Build.0 = Release|Win32
100+
EndGlobalSection
101+
GlobalSection(SolutionProperties) = preSolution
102+
HideSolutionNode = FALSE
103+
EndGlobalSection
104+
GlobalSection(ExtensibilityGlobals) = postSolution
105+
SolutionGuid = {A012557E-A900-406D-A59E-9EFC180EA5BB}
106+
EndGlobalSection
107+
EndGlobal
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>17.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{daca1cde-23f8-487e-80ad-3092b08408fa}</ProjectGuid>
25+
<RootNamespace>exception</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v143</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v143</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v143</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v143</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<ClCompile>
75+
<WarningLevel>Level3</WarningLevel>
76+
<SDLCheck>true</SDLCheck>
77+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
78+
<ConformanceMode>true</ConformanceMode>
79+
</ClCompile>
80+
<Link>
81+
<SubSystem>Console</SubSystem>
82+
<GenerateDebugInformation>true</GenerateDebugInformation>
83+
</Link>
84+
</ItemDefinitionGroup>
85+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
86+
<ClCompile>
87+
<WarningLevel>Level3</WarningLevel>
88+
<FunctionLevelLinking>true</FunctionLevelLinking>
89+
<IntrinsicFunctions>true</IntrinsicFunctions>
90+
<SDLCheck>true</SDLCheck>
91+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92+
<ConformanceMode>true</ConformanceMode>
93+
</ClCompile>
94+
<Link>
95+
<SubSystem>Console</SubSystem>
96+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
97+
<OptimizeReferences>true</OptimizeReferences>
98+
<GenerateDebugInformation>true</GenerateDebugInformation>
99+
</Link>
100+
</ItemDefinitionGroup>
101+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
102+
<ClCompile>
103+
<WarningLevel>Level3</WarningLevel>
104+
<SDLCheck>true</SDLCheck>
105+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
106+
<ConformanceMode>true</ConformanceMode>
107+
</ClCompile>
108+
<Link>
109+
<SubSystem>Console</SubSystem>
110+
<GenerateDebugInformation>true</GenerateDebugInformation>
111+
</Link>
112+
</ItemDefinitionGroup>
113+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
114+
<ClCompile>
115+
<WarningLevel>Level3</WarningLevel>
116+
<FunctionLevelLinking>true</FunctionLevelLinking>
117+
<IntrinsicFunctions>true</IntrinsicFunctions>
118+
<SDLCheck>true</SDLCheck>
119+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
120+
<ConformanceMode>true</ConformanceMode>
121+
</ClCompile>
122+
<Link>
123+
<SubSystem>Console</SubSystem>
124+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
125+
<OptimizeReferences>true</OptimizeReferences>
126+
<GenerateDebugInformation>true</GenerateDebugInformation>
127+
</Link>
128+
</ItemDefinitionGroup>
129+
<ItemGroup>
130+
<ClCompile Include="..\..\exception\src\exception.cpp" />
131+
<ClCompile Include="..\..\exception\src\main.cpp" />
132+
</ItemGroup>
133+
<ItemGroup>
134+
<ClInclude Include="..\..\exception\src\exception.h" />
135+
</ItemGroup>
136+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
137+
<ImportGroup Label="ExtensionTargets">
138+
</ImportGroup>
139+
</Project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="..\..\exception\src\exception.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
<ClCompile Include="..\..\exception\src\main.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
</ItemGroup>
25+
<ItemGroup>
26+
<ClInclude Include="..\..\exception\src\exception.h">
27+
<Filter>Header Files</Filter>
28+
</ClInclude>
29+
</ItemGroup>
30+
</Project>

0 commit comments

Comments
 (0)