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

[release/v7.3.6]Remove the property disabling optimization #19952

Merged
merged 1 commit into from
Jul 12, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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