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

Remove --flat from default dsymutil options #89358

Merged
merged 2 commits into from
Aug 10, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,26 @@
<PropertyGroup>
<_symbolExt Condition="'$(OS)' == 'Windows_NT'">$(NativeSymbolExt)</_symbolExt>
<_symbolExt Condition="'$(OS)' != 'Windows_NT'">$(NativeBinaryExt)$(NativeSymbolExt)</_symbolExt>
</PropertyGroup>
<_symbolSourcePath>$(NativeOutputPath)$(TargetName)$(_symbolExt)</_symbolSourcePath>
<_symbolTargetPath>$(PublishDir)\$(TargetName)$(_symbolExt)</_symbolTargetPath>
<!-- If the symbol is a dsym bundle, it's a folder not a file. -->
<_symbolIsFile Condition="'$(_symbolExt)' == '.dsym'">false</_symbolIsFile>
<_symbolIsFile Condition="'$(_symbolIsFile)' == ''">true</_symbolIsFile>
</PropertyGroup>

<!-- replace native symbol file if it exists -->
<Delete Files="$(PublishDir)\$(TargetName)$(_symbolExt)" />
<Copy SourceFiles="$(NativeOutputPath)$(TargetName)$(_symbolExt)" DestinationFolder="$(PublishDir)"
Condition="Exists('$(NativeOutputPath)$(TargetName)$(_symbolExt)') and '$(CopyOutputSymbolsToPublishDirectory)' == 'true'" />
<ItemGroup>
<_symbolRecursivePath Include="$(NativeOutputPath)$(TargetName)$(_symbolExt)/**/*" />
</ItemGroup>

<!-- replace native symbol file if it exists. On Mac, the symbol path may be a folder-->
<Delete Files="$(_symbolTargetPath)" Condition="'$(_symbolIsFile)' == 'true' and Exists('$(_symbolTargetPath)')" />
<Copy SourceFiles="$(_symbolSourcePath)" DestinationFolder="$(PublishDir)"
Condition="'$(_symbolIsFile)' == 'true' and Exists('$(_symbolSourcePath)')" />

<!-- Copy folder otherwise -->
<RemoveDir Directories="$(_symbolTargetPath)" Condition="'$(_symbolIsFile)' == 'false' and Exists('$(_symbolTargetPath)')" />
<Copy SourceFiles="@(_symbolRecursivePath)" DestinationFolder="$(_symbolTargetPath)/%(RecursiveDir)"
Condition="'$(_symbolIsFile)' == 'false' and Exists('$(_symbolSourcePath)')" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ The .NET Foundation licenses this file to you under the MIT license.
<CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">clang</CppCompilerAndLinker>
<CppLinker>$(CppCompilerAndLinker)</CppLinker>
<CppLibCreator>ar</CppLibCreator>
<DsymUtilOptions Condition="'$(_IsApplePlatform)' == 'true'">--flat</DsymUtilOptions>
<_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_</_SymbolPrefix>
<LinkerFlavor Condition="'$(LinkerFlavor)' == '' and '$(_targetOS)' == 'freebsd'">lld</LinkerFlavor>
<LinkerFlavor Condition="'$(LinkerFlavor)' == '' and '$(_linuxLibcFlavor)' == 'bionic'">lld</LinkerFlavor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ The .NET Foundation licenses this file to you under the MIT license.
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(_targetOS)' == 'win' and '$(NativeLib)' == 'Static'">.lib</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(_targetOS)' != 'win' and '$(NativeLib)' == 'Static'">.a</NativeBinaryExt>

<NativeSymbolExt Condition="'$(_IsApplePlatform)' == 'true'">.dwarf</NativeSymbolExt>
<NativeSymbolExt Condition="'$(_targetOS)' == 'win'">.pdb</NativeSymbolExt>
<NativeSymbolExt Condition="'$(_targetOS)' != 'win' and '$(_IsApplePlatform)' != 'true'">.dbg</NativeSymbolExt>
<NativeSymbolExt Condition="'$(NativeSymbolExt)' == '' and '$(_IsApplePlatform)' == 'true'">.dsym</NativeSymbolExt>
<NativeSymbolExt Condition="'$(NativeSymbolExt)' == '' and '$(_targetOS)' == 'win'">.pdb</NativeSymbolExt>
<NativeSymbolExt Condition="'$(NativeSymbolExt)' == ''">.dbg</NativeSymbolExt>

<ExportsFileExt Condition="'$(_targetOS)' == 'win'">.def</ExportsFileExt>
<ExportsFileExt Condition="'$(_targetOS)' != 'win'">.exports</ExportsFileExt>
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/tools/aot/crossgen2/crossgen2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
<IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath>
<IlcFrameworkNativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</IlcFrameworkNativePath>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<!-- Use .dwarf files instead of .dsym files since our symbol exporting may not safely handle folders. -->
<NativeSymbolExt>.dwarf</NativeSymbolExt>
<DsymUtilOptions>--flat</DsymUtilOptions>
</PropertyGroup>

<ItemGroup Condition="'$(NativeAotSupported)' == 'true'">
Expand Down
1 change: 0 additions & 1 deletion src/tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
<CustomNativeMain>true</CustomNativeMain>
<_IsApplePlatform Condition="'$(TargetsAppleMobile)' == 'true'">true</_IsApplePlatform>
<_IsiOSLikePlatform Condition="'$(TargetsAppleMobile)' == 'true'">true</_IsiOSLikePlatform>
<DsymUtilOptions Condition="'$(_IsApplePlatform)' == 'true'">--flat</DsymUtilOptions>
<_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_</_SymbolPrefix>
</PropertyGroup>

Expand Down