Blame SOURCES/do-not-strip-debuginfo.patch

5ae8b0
Do not strip debuginfo from native binaries
5ae8b0
5ae8b0
See https://github.com/dotnet/source-build/pull/272 and https://github.com/dotnet/source-build/pull/272
5ae8b0
diff -ruN dotnet/patches/corefx/debug-info.patch dotnet/patches/corefx/debug-info.patch
5ae8b0
--- dotnet/patches/corefx/debug-info.patch	1969-12-31 19:00:00.000000000 -0500
5ae8b0
+++ dotnet/patches/corefx/debug-info.patch	2017-11-09 13:08:52.167739619 -0500
5ae8b0
@@ -0,0 +1,20 @@
5ae8b0
+diff -ruN corefx/src/Native/Unix/CMakeLists.txt corefx/src/Native/Unix/CMakeLists.txt
5ae8b0
+--- corefx/src/Native/Unix/CMakeLists.txt	2017-10-25 20:38:56.000000000 -0400
5ae8b0
++++ corefx/src/Native/Unix/CMakeLists.txt	2017-11-09 13:05:54.053454759 -0500
5ae8b0
+@@ -20,6 +20,7 @@
5ae8b0
+ add_compile_options(-I${CMAKE_CURRENT_SOURCE_DIR}/Common)
5ae8b0
+ add_compile_options(-I${CMAKE_CURRENT_BINARY_DIR}/Common)
5ae8b0
+ add_compile_options(-Wno-c99-extensions)
5ae8b0
++add_compile_options(-g)
5ae8b0
+ 
5ae8b0
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
5ae8b0
+     add_compile_options(-Wno-unreachable-code)
5ae8b0
+@@ -60,7 +61,7 @@
5ae8b0
+ 
5ae8b0
+ string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_CMAKE_BUILD_TYPE)
5ae8b0
+ if (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG)
5ae8b0
+-    add_compile_options(-g -O0)
5ae8b0
++    add_compile_options(-O0)
5ae8b0
+     add_definitions(-DDEBUG)
5ae8b0
+ 
5ae8b0
+     # obtain settings from running coreclr\enablesanitizers.sh
5ae8b0
diff -ruN dotnet/targets/coreclr.props dotnet/targets/coreclr.props
5ae8b0
--- dotnet/targets/coreclr.props	2017-11-09 12:52:08.413769785 -0500
5ae8b0
+++ dotnet/targets/coreclr.props	2017-11-09 13:01:20.655552475 -0500
5ae8b0
@@ -3,7 +3,7 @@
5ae8b0
   <PropertyGroup>
5ae8b0
     <ProjectDirectory Condition="'$(PathToRepo)' != ''">$(PathToRepo)</ProjectDirectory>
64c9a7
     <BuildArguments>$(Platform) $(Configuration) skiptests -PortableBuild=false msbuildonunsupportedplatform </BuildArguments>
5ae8b0
-    <BuildArguments Condition="$(Platform.Contains('arm'))">$(BuildArguments) skipnuget cross -skiprestore stripSymbols</BuildArguments>
5ae8b0
+    <BuildArguments Condition="$(Platform.Contains('arm'))">$(BuildArguments) skipnuget cross -skiprestore</BuildArguments>
5ae8b0
     <BuildArguments Condition="'$(TargetOS)'!='Windows_NT'">$(BuildArguments) ignorewarnings</BuildArguments>
5ae8b0
     <BuildCommand>$(ProjectDirectory)/build$(ShellExtension) $(BuildArguments)</BuildCommand>
5ae8b0
     <BuildCommand Condition="$(Platform.Contains('arm'))">$(ArmEnvironmentVariables) $(BuildCommand)</BuildCommand>