Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete DebugSymbols=true setting for the repo build #102392

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@
<NoWarn>$(NoWarn),CS8969</NoWarn>
<!-- Always pass portable to override arcade sdk which uses embedded for local builds -->
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<KeepNativeSymbols Condition="'$(KeepNativeSymbols)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">true</KeepNativeSymbols>
<KeepNativeSymbols Condition="'$(KeepNativeSymbols)' == ''">false</KeepNativeSymbols>
<!-- Used for launchSettings.json and runtime config files. -->
Expand Down
4 changes: 2 additions & 2 deletions eng/illink.targets
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<!-- Only run the trim analyzer on libraries which have been annotated. -->
<EnableTrimAnalyzer Condition="'$(EnableTrimAnalyzer)' == '' And (Exists('$(ILLinkSuppressionsXml)') Or Exists('$(ILLinkSuppressionsConfigurationSpecificXml)'))">false</EnableTrimAnalyzer>

<!-- if building a PDB, tell illink to rewrite the symbols file -->
<ILLinkRewritePDBs Condition="'$(ILLinkRewritePDBs)' == '' and '$(DebugSymbols)' != 'false'">true</ILLinkRewritePDBs>
<!-- tell illink to rewrite the symbols file -->
<ILLinkRewritePDBs Condition="'$(ILLinkRewritePDBs)' == ''">true</ILLinkRewritePDBs>

<ILLinkResourcesSubstitutionIntermediatePath>$(IntermediateOutputPath)ILLink.Resources.Substitutions.xml</ILLinkResourcesSubstitutionIntermediatePath>
<GenerateResourcesSubstitutions Condition="'$(GenerateResourcesSubstitutions)' == '' and '$(StringResourcesPath)' != ''">true</GenerateResourcesSubstitutions>
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/nativeaot/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>

<DebugType>Portable</DebugType>
<DebugSymbols>true</DebugSymbols>

<OutputPath Condition="$(MSBuildProjectName.StartsWith('System.Private.'))">$(RuntimeBinDir)/aotsdk/</OutputPath>
<Configurations>Debug;Release;Checked</Configurations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,14 @@ public static class PinnedAndUnpinnedLocalsToDecode
public static unsafe int DoSomething()
{
byte[] bytes = new byte[] { 1, 2, 3 };
Keep(ref bytes);
fixed (byte* bytePtr = bytes)
{
return *bytePtr;
}

// Reference local variables to prevent them from being optimized out by Roslyn
static void Keep<T>(ref T value) { };
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,18 @@ private static int MyOtherMethod(int x)
public static void MyOtherMethod(object arg)
{
int var1 = 2;
Keep(ref var1);

string var2 = "I am a string";
Keep(ref var2);

if (arg == null)
{
throw new ArgumentNullException("Input arg cannot be null.");
}

// Reference local variables to prevent them from being optimized out by Roslyn
static void Keep<T>(ref T value) { };
}
#pragma warning restore xUnit1013 // Public method should be marked as test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public static void Test_MethodBody_ExceptionHandlingClause()
if (ehc.Flags != ExceptionHandlingClauseOptions.Finally && ehc.Flags != ExceptionHandlingClauseOptions.Filter)
{
Assert.Equal(typeof(Exception), ehc.CatchType);
Assert.Equal(19, ehc.HandlerLength);
Assert.Equal(70, ehc.HandlerOffset);
Assert.Equal(27, ehc.HandlerLength);
Assert.Equal(86, ehc.HandlerOffset);
Assert.Equal(61, ehc.TryLength);
Assert.Equal(9, ehc.TryOffset);
Assert.Equal(25, ehc.TryOffset);
return;
}
}
Expand All @@ -64,10 +64,10 @@ public static void Test_MethodBody_ExceptionHandlingClause()
if (ehc.Flags != ExceptionHandlingClauseOptions.Finally && ehc.Flags != ExceptionHandlingClauseOptions.Filter)
{
Assert.Equal(typeof(Exception), ehc.CatchType);
Assert.Equal(14, ehc.HandlerLength);
Assert.Equal(58, ehc.HandlerOffset);
Assert.Equal(21, ehc.HandlerLength);
Assert.Equal(72, ehc.HandlerOffset);
Assert.Equal(50, ehc.TryLength);
Assert.Equal(8, ehc.TryOffset);
Assert.Equal(22, ehc.TryOffset);
return;
}
}
Expand All @@ -79,7 +79,10 @@ public static void Test_MethodBody_ExceptionHandlingClause()
private static void MethodBodyExample(object arg)
{
int var1 = 2;
Keep(ref var1);

string var2 = "I am a string";
Keep(ref var2);

try
{
Expand All @@ -94,13 +97,17 @@ private static void MethodBodyExample(object arg)
}
catch (Exception ex)
{
Keep(ref ex);
Console.WriteLine(ex.Message);
}
finally
{
var1 = 3;
var2 = "I am a new string!";
}

// Reference local variables to prevent them from being optimized out by Roslyn
static void Keep<T>(ref T value) { };
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Make sure that invalid operations are not optimized out by Roslyn -->
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="InlineArrayInvalid.cs" />
Expand Down
2 changes: 2 additions & 0 deletions src/tests/Loader/classloader/RefFields/Validate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MonoAotIncompatible>true</MonoAotIncompatible>
<!-- Make sure that invalid operations are not optimized out by Roslyn -->
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="Validate.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Make sure that invalid operations are not optimized out by Roslyn -->
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="ManagedPointers.cs" />
Expand Down
Loading