Use SetupProperties to set properties related to NativeAOT and remove the top-level...
authorJackson Schuster <36744439+jtschuster@users.noreply.github.com>
Tue, 31 Jan 2023 00:33:59 +0000 (16:33 -0800)
committerGitHub <noreply@github.com>
Tue, 31 Jan 2023 00:33:59 +0000 (17:33 -0700)
eng/testing/tests.singlefile.targets
src/coreclr/nativeaot/BuildIntegration/BuildFrameworkNativeObjects.proj
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets [changed mode: 0755->0644]
src/tests/build.proj

index 5829320..e66a84d 100644 (file)
@@ -25,6 +25,7 @@
     <IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
     <IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
     <IlcFrameworkPath>$(NetCoreAppCurrentTestHostSharedFrameworkPath)</IlcFrameworkPath>
+    <IlcFrameworkNativePath>$(NetCoreAppCurrentTestHostSharedFrameworkPath)</IlcFrameworkNativePath>
     <NoWarn>$(NoWarn);IL1005;IL3002</NoWarn>
     <TrimMode>partial</TrimMode>
     <SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
index d3ef3ec..ea0602c 100644 (file)
@@ -14,6 +14,7 @@
   <Import Project="Microsoft.NETCore.Native.targets" Condition="'$(IlcCalledViaPackage)' == ''" />
 
   <Target Name="BuildAllFrameworkLibraries"
+    DependsOnTargets="$(IlcDynamicBuildPropertyDependencies)"
     Inputs="@(DefaultFrameworkAssemblies)"
     Outputs="@(DefaultFrameworkAssemblies->'$(NativeIntermediateOutputPath)\%(Filename)$(NativeObjectExt)')">
     <ItemGroup>
@@ -28,7 +29,6 @@
 
   <Target Name="BuildAllFrameworkLibrariesAsSingleLib"
     DependsOnTargets="BuildAllFrameworkLibraries">
-
     <ItemGroup>
       <LibInputs Include="$(NativeIntermediateOutputPath)\*$(NativeObjectExt)" />
     </ItemGroup>
old mode 100755 (executable)
new mode 100644 (file)
index 71dba10..5caefcd
@@ -21,12 +21,6 @@ The .NET Foundation licenses this file to you under the MIT license.
     <NativeOutputPath Condition="'$(NativeOutputPath)' == ''">$(OutputPath)native\</NativeOutputPath>
     <NativeCompilationDuringPublish Condition="'$(NativeCompilationDuringPublish)' == ''">true</NativeCompilationDuringPublish>
     <IlcBuildTasksPath Condition="'$(IlcBuildTasksPath)' == ''">$(MSBuildThisFileDirectory)..\tools\netstandard\ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
-    <IlcToolsPath Condition="'$(IlcPath)' != '' and '$(IlcToolsPath)' == ''">$(IlcPath)\tools\</IlcToolsPath>
-    <IlcSdkPath Condition="'$(IlcPath)' != '' and '$(IlcSdkPath)' == ''">$(IlcPath)\sdk\</IlcSdkPath>
-    <IlcFrameworkPath Condition="'$(IlcPath)' != '' and '$(IlcFrameworkPath)' == ''">$(IlcPath)\framework\</IlcFrameworkPath>
-    <IlcFrameworkNativePath Condition="'$(IlcPath)' != '' and '$(IlcFrameworkNativePath)' == ''">$(IlcPath)\framework\</IlcFrameworkNativePath>
-    <IlcFrameworkNativePath Condition="'$(IlcFrameworkNativePath)' == '' and '$(IlcFrameworkPath)' != ''">$(IlcFrameworkPath)</IlcFrameworkNativePath>
-    <IlcMibcPath Condition="'$(IlcPath)' != '' and '$(IlcMibcPath)' == ''">$(IlcPath)\mibc\</IlcMibcPath>
     <TargetOS Condition="$(RuntimeIdentifier.StartsWith('win'))">windows</TargetOS>
     <TargetOS Condition="$(RuntimeIdentifier.StartsWith('osx'))">osx</TargetOS>
     <TargetOS Condition="$(RuntimeIdentifier.StartsWith('freebsd'))">freebsd</TargetOS>
@@ -113,18 +107,6 @@ The .NET Foundation licenses this file to you under the MIT license.
     <AutoInitializedAssemblies Include="System.Private.DisabledReflection" Condition="$(IlcDisableReflection) == 'true'" />
   </ItemGroup>
 
-  <ItemGroup>
-    <PrivateSdkAssemblies Include="$(IlcSdkPath)*.dll" />
-
-    <!-- Exclude unmanaged dlls -->
-    <FrameworkAssemblies Include="$(IlcFrameworkPath)*.dll" Exclude="$(IlcFrameworkPath)*.Native.dll;$(IlcFrameworkPath)msquic.dll" />
-
-    <MibcFile Include="$(IlcMibcPath)*.mibc" Condition="'$(IlcPgoOptimize)' == 'true'" />
-
-    <DefaultFrameworkAssemblies Include="@(FrameworkAssemblies)" />
-    <DefaultFrameworkAssemblies Include="@(PrivateSdkAssemblies)" />
-  </ItemGroup>
-
   <ItemDefinitionGroup>
     <ManagedBinary>
       <IlcRspFile>$(NativeIntermediateOutputPath)\%(Filename).ilc.rsp</IlcRspFile>
@@ -152,7 +134,6 @@ The .NET Foundation licenses this file to you under the MIT license.
       <IlcMibcPath Condition="'$(IlcMibcPath)' == ''">$(RuntimePackagePath)\mibc\</IlcMibcPath>
     </PropertyGroup>
 
-    <!-- If running from a package these values need to be set again with the resolved IlcXYZPath -->
     <ItemGroup>
       <PrivateSdkAssemblies Include="$(IlcSdkPath)*.dll" />
 
@@ -372,10 +353,9 @@ The .NET Foundation licenses this file to you under the MIT license.
   </Target>
 
   <Target Name="CreateLib"
-    Inputs="@(LibInputs)"
-    Outputs="$(SharedLibrary)"
     DependsOnTargets="$(CreateLibDependsOn);$(IlcDynamicBuildPropertyDependencies);SetupOSSpecificProps"
-    >
+    Inputs="@(LibInputs)"
+    Outputs="$(SharedLibrary)" >
 
     <ItemGroup>
       <CustomLibArg Include="/out:$(SharedLibrary)" Condition="'$(TargetOS)' == 'windows'" />
index 4a68920..094b00c 100644 (file)
       <CreateLibProperty Include="IlcBuildTasksPath=$(IlcBuildTasksPath)" />
       <CreateLibProperty Include="IlcSdkPath=$(IlcSdkPath)" />
       <CreateLibProperty Include="IlcFrameworkPath=$(IlcFrameworkPath)" />
+      <CreateLibProperty Include="IlcFrameworkNativePath=$(IlcFrameworkNativePath)" />
+      <CreateLibProperty Include="IlcDynamicBuildPropertyDependencies=$(IlcDynamicBuildPropertyDependencies)" />
       <CreateLibProperty Include="FrameworkLibPath=$(IlcSdkPath)" />
       <CreateLibProperty Include="FrameworkObjPath=$(IntermediateOutputPath)/NativeAOTFX" />
       <CreateLibProperty Condition="'$(Configuration)' == 'Checked' or '$(Configuration)' == 'Release'" Include="Optimize=true" />