Fix exe size for Mach-O files (#89325)
authorAndy Gocke <angocke@microsoft.com>
Sat, 22 Jul 2023 06:44:11 +0000 (23:44 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Jul 2023 06:44:11 +0000 (23:44 -0700)
commit2d1e28432105391f5e0d5a4573f7858fa9d798a7
treeb12604a9841476772f55ed7a73ffc4f054469acf
parent3c7027a58ba1b6e3a8861ae628c68293b5cb5f2b
Fix exe size for Mach-O files (#89325)

The extra size appears to be the export list, which is zeroed
but not removed when the file is stripped. Exes shouldn't have
any exported symbols by default, but ld will include everything
by default. We'll fix it up using an ld flag.

Fixes #86707
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs