From: Mikhail Kurinnoi Date: Mon, 4 Dec 2023 15:53:02 +0000 (+0300) Subject: [Tizen] Fix build for 8.0 X-Git-Tag: accepted/tizen/unified/riscv/20231226.055542~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a50720893667073de362a17aa5bb37c32910373;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git [Tizen] Fix build for 8.0 --- diff --git a/NuGet.config b/NuGet.config index 7ed5f898a..de77a4e50 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,21 +5,8 @@ - - - - - - - - - - - - - - - + + diff --git a/eng/build.sh b/eng/build.sh index 3c64104a6..b847564e4 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -167,7 +167,7 @@ build_native() scriptDir="$__RepoRootDir/eng" pushd "$intermediatesForBuild" - next_command="\"$scriptDir/native/gen-buildsys.sh\" \"$cmakeDir\" \"$intermediatesForBuild\" $platformArch $__Compiler \"$__CompilerMajorVersion\" \"$__CompilerMinorVersion\" $__BuildType \"$generator\" $scan_build $extraCmakeArguments" + next_command="\"$scriptDir/native/gen-buildsys.sh\" \"$cmakeDir\" \"$intermediatesForBuild\" $platformArch $targetOS $__Compiler \"$__CompilerMajorVersion\" \"$__CompilerMinorVersion\" $__BuildType \"$generator\" $scan_build $extraCmakeArguments" echo "Invoking $next_command" eval $next_command popd @@ -182,7 +182,7 @@ build_native() echo "Executing $buildTool install -j $__NumProc" - $buildTool install -j $__NumProc | tee $__LogDir/make.log + $buildTool install -j $__NumProc if [ $? != 0 ]; then echo "Failed to build." exit 1 @@ -273,7 +273,7 @@ fi # Build native components # if [[ "$__NativeBuild" == 1 ]]; then - build_native "$__TargetOS" "$__TargetArch" "$__RepoRootDir" "$__IntermediatesDir" "install" "$__ExtraCmakeArgs" "diagnostic component" | tee "$__LogsDir"/make.log + build_native "$__TargetOS" "$__TargetArch" "$__RepoRootDir" "$__IntermediatesDir" "install" "$__ExtraCmakeArgs" "diagnostic component" if [ "$?" != 0 ]; then echo "Native build FAILED" diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index d5ef9ed62..45000f6b0 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -254,17 +254,7 @@ function(preprocess_files PreprocessedFilesList) endfunction() function(set_exports_linker_option exports_filename) - if(LD_GNU OR LD_SOLARIS OR LD_LLVM) - # Add linker exports file option - if(LD_SOLARIS) - set(EXPORTS_LINKER_OPTION -Wl,-M,${exports_filename} PARENT_SCOPE) - else() - set(EXPORTS_LINKER_OPTION -Wl,--version-script=${exports_filename} PARENT_SCOPE) - endif() - elseif(LD_OSX) - # Add linker exports file option - set(EXPORTS_LINKER_OPTION -Wl,-exported_symbols_list,${exports_filename} PARENT_SCOPE) - endif() + set(EXPORTS_LINKER_OPTION -Wl,--version-script=${exports_filename} PARENT_SCOPE) endfunction() # compile_asm(TARGET target ASM_FILES file1 [file2 ...] OUTPUT_OBJECTS [variableName]) diff --git a/packaging/coreclr-diagnostics.spec b/packaging/coreclr-diagnostics.spec index bc9a9cdae..cef1ff3ce 100755 --- a/packaging/coreclr-diagnostics.spec +++ b/packaging/coreclr-diagnostics.spec @@ -148,6 +148,8 @@ export TIZEN_LOCAL_BUILD=1 export NUGET_PACKAGES=%{_builddir}/%{name}-%{version}/.packages export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1 +sed -i "s,TIZEN_NUGET_PACKAGES_DIR,${NUGET_PACKAGES}," %{_builddir}/%{name}-%{version}/NuGet.config + ./build.sh --portablebuild=false -configuration %{_buildtype} -architecture %{_barch} -keepnativesymbols /p:NeedsPublishing=true /p:EnableSourceLink=false /p:EnableSourceControlManagerQueries=false %install @@ -173,33 +175,32 @@ export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/libicu-57.1 # SOS mkdir -p %{buildroot}%{diagnosticsdir}/%{rid} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/*.so %{buildroot}%{diagnosticsdir}/%{rid} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Bcl.AsyncInterfaces.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.DebugServices.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.DebugServices.Implementation.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.ExtensionCommands.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.NETCore.Client.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.Runtime.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.Runtime.Utilities.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Configuration.Abstractions.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Configuration.Binder.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Configuration.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.DependencyInjection.Abstractions.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Logging.Abstractions.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Logging.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Options.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Primitives.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.FileFormats.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/Microsoft.SymbolStore.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/SOS.Extensions.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/SOS.Hosting.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/SOS.InstallHelper.dll %{buildroot}%{diagnosticsdir} -cp %{_artifacts}/Linux.%{_barch}.%{_buildtype}/System.CommandLine.dll %{buildroot}%{diagnosticsdir} -cp -f %{_artifacts}/Linux.%{_barch}.%{_buildtype}/sosdocsunix.txt %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/*.so %{buildroot}%{diagnosticsdir}/%{rid} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Bcl.AsyncInterfaces.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.DebugServices.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.DebugServices.Implementation.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.ExtensionCommands.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.NETCore.Client.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Diagnostics.Runtime.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Configuration.Abstractions.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Configuration.Binder.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Configuration.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.DependencyInjection.Abstractions.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Logging.Abstractions.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Logging.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Options.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.Extensions.Primitives.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.FileFormats.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/Microsoft.SymbolStore.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/SOS.Extensions.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/SOS.Hosting.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/SOS.InstallHelper.dll %{buildroot}%{diagnosticsdir} +cp %{_artifacts}/linux.%{_barch}.%{_buildtype}/System.CommandLine.dll %{buildroot}%{diagnosticsdir} +cp -f %{_artifacts}/linux.%{_barch}.%{_buildtype}/sosdocsunix.txt %{buildroot}%{diagnosticsdir} # Tools for name in counters dump gcdump stack trace; do - cp -f %{_artifacts}/dotnet-${name}/%{_buildtype}/netcoreapp*/publish/*.dll %{buildroot}%{diagnosticsdir} + cp -f %{_artifacts}/dotnet-${name}/%{_buildtype}/net*/publish/*.dll %{buildroot}%{diagnosticsdir} done for so in `find %{buildroot}%{diagnosticsdir}/%{rid} -type f -name "*.so" -exec basename {} \;`; do ln -sf %{rid}/${so} %{buildroot}%{diagnosticsdir} diff --git a/src/Microsoft.Diagnostics.DebugServices.Implementation/SymbolService.cs b/src/Microsoft.Diagnostics.DebugServices.Implementation/SymbolService.cs index 9e60badc2..120a8bb11 100644 --- a/src/Microsoft.Diagnostics.DebugServices.Implementation/SymbolService.cs +++ b/src/Microsoft.Diagnostics.DebugServices.Implementation/SymbolService.cs @@ -339,12 +339,13 @@ namespace Microsoft.Diagnostics.DebugServices.Implementation SymbolStore.SymbolStores.SymbolStore store = _symbolStore; symbolDirectoryPath = Path.GetFullPath(symbolDirectoryPath); - var probingPaths = new List { symbolDirectoryPath }; + List probingPaths = new(); + probingPaths.Add(symbolDirectoryPath); if (Directory.Exists(symbolDirectoryPath)) { // Add all subdirectories. // Note, for proper result order we use Breadth-first search algorithm here. - Queue pathsCheck = new Queue(); + Queue pathsCheck = new(); pathsCheck.Enqueue(symbolDirectoryPath); while (pathsCheck.Count > 0) @@ -365,7 +366,7 @@ namespace Microsoft.Diagnostics.DebugServices.Implementation } } // Make sure the root directory is enumerated last so that it comes first in the fallback tree. - foreach (var path in Enumerable.Reverse(probingPaths)) + foreach (string path in Enumerable.Reverse(probingPaths)) { if (!IsDuplicateSymbolStore(store, (directorySymbolStore) => IsPathEqual(path, directorySymbolStore.Directory))) { diff --git a/src/Tools/Common/Commands/ProcessStatus.cs b/src/Tools/Common/Commands/ProcessStatus.cs index 29d840d16..3e7d0506c 100644 --- a/src/Tools/Common/Commands/ProcessStatus.cs +++ b/src/Tools/Common/Commands/ProcessStatus.cs @@ -87,7 +87,7 @@ namespace Microsoft.Internal.Common.Commands } else { - consoleWidth = Console.WindowWidth > 0 ? Console.WindowWidth : Int32.MaxValue; + consoleWidth = Console.WindowWidth > 0 ? Console.WindowWidth : int.MaxValue; } int extra = (int)Math.Ceiling(consoleWidth * 0.05); int largeLength = consoleWidth / 2 - 16 - extra;