Skip to content

Commit

Permalink
Remove the property disabling optimization (#19952)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
  • Loading branch information
TravisEz13 and SeeminglyScience committed Jul 12, 2023
1 parent 0e4c714 commit d4414ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 0 additions & 8 deletions PowerShell.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,6 @@
<DebugType>full</DebugType>
</PropertyGroup>

<!-- Define non-windows, release configuration properties -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' And '$(IsWindows)' != 'true' ">
<!-- Set-Date fails with optimize enabled in NonWindowsSetDate
Debugging the issues resolves the problem
-->
<Optimize>false</Optimize>
</PropertyGroup>

<PropertyGroup>
<Features>strict</Features>
</PropertyGroup>
Expand Down
6 changes: 4 additions & 2 deletions src/System.Management.Automation/CoreCLR/CorePsPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,10 @@ internal static class NativeMethods
[DllImport(psLib)]
internal static extern int WaitPid(int pid, bool nohang);

// This is a struct tm from <time.h>.
[StructLayout(LayoutKind.Sequential)]
// This is the struct `private_tm` from setdate.h in libpsl-native.
// Packing is set to 4 to match the unmanaged declaration.
// https://github.com/PowerShell/PowerShell-Native/blob/c5575ceb064e60355b9fee33eabae6c6d2708d14/src/libpsl-native/src/setdate.h#L23
[StructLayout(LayoutKind.Sequential, Pack = 4)]
internal unsafe struct UnixTm
{
/// <summary>Seconds (0-60).</summary>
Expand Down

0 comments on commit d4414ce

Please sign in to comment.