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/20241231.014852~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=978798c841a935fb7d708dd784090df5a071047d;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git [Tizen] Fix build for 8.0 --- diff --git a/NuGet.config b/NuGet.config index 85d9e3140..de77a4e50 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,15 +5,8 @@ - - - - - - - - - + + diff --git a/eng/build.sh b/eng/build.sh index 5473dfc9e..860d5bc4a 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -171,7 +171,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 @@ -186,7 +186,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 @@ -275,7 +275,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 b1cb09d66..c4db80e8d 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -263,17 +263,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 d75a83c9e..b18ef6d71 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 6d38ce2d9..f1fc0f309 100644 --- a/src/Microsoft.Diagnostics.DebugServices.Implementation/SymbolService.cs +++ b/src/Microsoft.Diagnostics.DebugServices.Implementation/SymbolService.cs @@ -396,12 +396,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) @@ -422,7 +423,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 1ed05db6a..1861bd046 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;