Rename cgroup.cpp to cgroupcpu.cpp (#83029)
authorAdeel Mujahid <3840695+am11@users.noreply.github.com>
Wed, 8 Mar 2023 02:17:54 +0000 (04:17 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Mar 2023 02:17:54 +0000 (18:17 -0800)
* Revert "Revert "Enable symbol stripping for crossgen2 (#82698)" (#82881)"

This reverts commit 13853e5a78dafb364305af823bac3a4dbeddf894.

* Rename cgroup.cpp to cgroupcpu.cpp

src/coreclr/nativeaot/Runtime/CMakeLists.txt
src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
src/coreclr/nativeaot/Runtime/unix/cgroupcpu.cpp [moved from src/coreclr/nativeaot/Runtime/unix/cgroup.cpp with 99% similarity]
src/coreclr/nativeaot/Runtime/unix/cgroupcpu.h
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj

index 8d4e163..a8348c9 100644 (file)
@@ -153,7 +153,7 @@ else()
   )
 
   list(APPEND FULL_RUNTIME_SOURCES
-    unix/cgroup.cpp
+    unix/cgroupcpu.cpp
     unix/HardwareExceptions.cpp
     unix/UnixContext.cpp
     unix/UnixSignals.cpp
index 0d0446b..cfe2502 100644 (file)
@@ -344,8 +344,6 @@ void ConfigureSignals()
     signal(SIGPIPE, SIG_IGN);
 }
 
-extern bool GetCpuLimit(uint32_t* val);
-
 void InitializeCurrentProcessCpuCount()
 {
     uint32_t count;
@@ -500,11 +500,6 @@ void InitializeCpuCGroup()
     CGroup::Initialize();
 }
 
-void CleanupCpuCGroup()
-{
-    CGroup::Cleanup();
-}
-
 bool GetCpuLimit(uint32_t* val)
 {
     if (val == nullptr)
index 52830b7..f8b39e5 100644 (file)
@@ -1,12 +1,10 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
 
-
 #ifndef __CGROUPCPU_H__
 #define __CGROUPCPU_H__
 
 void InitializeCpuCGroup();
-void CleanupCpuCGroup();
+bool GetCpuLimit(uint32_t* val);
 
 #endif // __CGROUPCPU_H__
-
index 81aa510..0f75f74 100644 (file)
@@ -22,6 +22,8 @@
     <NativeAotSupported Condition="'$(CrossBuild)' == 'true' and '$(TargetOS)' != '$(HostOS)'">false</NativeAotSupported>
     <!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 -->
     <NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
+    <ObjCopyName Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(CrossBuild)' == 'true' and '$(RuntimeIdentifier)' == 'linux-musl-arm64'">llvm-objcopy-15</ObjCopyName>
+    <ObjCopyName Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(CrossBuild)' == 'true' and '$(RuntimeIdentifier)' == 'linux-arm64'">aarch64-linux-gnu-objcopy</ObjCopyName>
   </PropertyGroup>
 
   <Target Name="PublishCrossgen"
@@ -33,7 +35,7 @@
           DestinationFolder="$(MicrosoftNetCoreAppRuntimePackNativeDir)"
           SkipUnchangedFiles="true" />
 
-<MSBuild Projects="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2.csproj"
+    <MSBuild Projects="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2.csproj"
              Targets="Restore"
              Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid())
               ;_IsPublishing=true
@@ -48,6 +50,8 @@
               ;RuntimeIdentifier=$(PackageRID)
               ;NativeAotSupported=$(NativeAotSupported)
               ;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
+              ;StripSymbols=true
+              ;ObjCopyName=$(ObjCopyName)
               ;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets">
       <Output TaskParameter="TargetOutputs"
               ItemName="_RawCrossgenPublishFiles" />