Skip to content

Commit e7421d8

Browse files
committed
Properly indicate to MSBuild and the .NET SDK whether we're producing a separate PDB.
1 parent cd03523 commit e7421d8

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

src/sdk/Sdk/Sdk.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
<Import Project="../build/Zig.Sdk.Overrides.targets" />
1010
<Import Project="../build/Zig.Sdk.Cross.targets" />
11+
<Import Project="../build/Zig.Sdk.Symbols.targets" />
1112
<Import Project="Sdk.targets"
1213
Sdk="Microsoft.NET.Sdk" />
1314
<Import Project="../build/Zig.Sdk.Hacks.targets" />

src/sdk/Sdk/Support.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<!--
3-
This file is meant to be imported in regular .NET SDK projects. It injects
4-
some build logic to make ZigReference items work as expected.
3+
This file is meant to be imported in regular Microsoft.NET.Sdk projects. It
4+
injects some build logic to make ZigReference items work as expected.
55
-->
66
</Project>

src/sdk/build/Zig.Sdk.Hacks.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<!--
3-
The .NET SDK unconditionally sets TargetExt to force a .dll suffix. We work
4-
around that nonsense here.
3+
Microsoft.NET.Sdk unconditionally sets TargetExt to force a .dll suffix. We
4+
work around that nonsense here.
55
-->
66
<PropertyGroup>
77
<TargetExt>$(TargetSuffix)</TargetExt>

src/sdk/build/Zig.Sdk.Publish.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
</Target>
2222

2323
<!--
24-
Unfortunately, the publish logic in the .NET SDK is not factored as well as
25-
the build and clean logic in MSBuild, so we have to duplicate some of the
26-
logic in the default Publish target here.
24+
Unfortunately, the publish logic in Microsoft.NET.Sdk is not factored as
25+
well as the build and clean logic in MSBuild, so we have to duplicate some
26+
of the logic in the default Publish target here.
2727
-->
2828
<Target Name="_InnerPublish"
2929
DependsOnTargets="_PublishBuildAlternative; _PublishNoBuildAlternative">

src/sdk/build/Zig.Sdk.Symbols.targets

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project>
2+
<!--
3+
We need to set these properties up here since Microsoft.NET.Sdk defaults
4+
them very early and sets _DebugSymbolsProduced to indicate whether a
5+
separate PDB file is produced.
6+
-->
7+
8+
<PropertyGroup Condition="'$(DebugSymbols)' == ''">
9+
<DebugSymbols>false</DebugSymbols>
10+
<DebugSymbols Condition="'$(Configuration)' == 'Debug'">true</DebugSymbols>
11+
</PropertyGroup>
12+
13+
<PropertyGroup Condition="'$(DebugSymbols)' == 'true'">
14+
<DebugType>embedded</DebugType>
15+
<DebugType Condition="'$(TargetSystem)' == 'windows'">full</DebugType>
16+
</PropertyGroup>
17+
</Project>

src/sdk/build/Zig.Sdk.Test.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
</ItemGroup>
55

66
<!--
7-
Most of the test logic in the .NET SDK is superfluous for our purposes, so
8-
we will just override the target entirely.
7+
Most of the test logic in Microsoft.NET.Sdk is superfluous for our purposes,
8+
so we will just override the target entirely.
99
-->
1010
<Target Name="VSTest"
1111
DependsOnTargets="$(VSTestDependsOn)"

0 commit comments

Comments
 (0)