Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions eng/illink.targets
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,20 @@
<ILLinkArgs>$(ILLinkArgs) --disable-opt unusedinterfaces</ILLinkArgs>
<!-- keep DynamicDependencyAttribute unless a project explicitly disables it -->
<ILLinkArgs Condition="'$(ILLinkKeepDepAttributes)' != 'false'">$(ILLinkArgs) --keep-dep-attributes true</ILLinkArgs>
<!-- enable verbose output -->
<ILLinkArgs>$(ILLinkArgs) --verbose</ILLinkArgs>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case these ever need to be conditioned out for a specific reason, can we add a property that individiual projects can override for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is going to be removed as soon as the linker enables warnings by default. So there is probably no reason to add a property here - it is just going to be deleted.

<!-- suprress warnings with the following codes:
CS0234: The type or namespace name A does not exist in the namespace B
IL2008: Could not find type A specified in resource B
IL2009: Could not find method A in type B specified in resource C
IL2012: Could not find field A in type B specified in resource C
IL2025: Duplicate preserve of" warnings from verbose output,
as we need both linker annotations and xml files
IL2047: All overridden members must have the same DynamicallyAccessedMembersAttribute,
usage as we don't add suppression files for ref projects
MSB3030: Could not copy the file A because it was not found.
-->
<ILLinkArgs>$(ILLinkArgs) --nowarn IL2008;IL2009;IL2012;IL2025;IL2047</ILLinkArgs>
</PropertyGroup>

<MakeDir Directories="$(ILLinkTrimInputPath)" />
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/crossgen-corelib.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
</ItemGroup>

<PropertyGroup>
<_CoreClrBuildScript Condition="$([MSBuild]::IsOsPlatform(Windows))">crossgen-corelib.cmd</_CoreClrBuildScript>
<_CoreClrBuildScript Condition="!$([MSBuild]::IsOsPlatform(Windows))">crossgen-corelib.sh</_CoreClrBuildScript>
<_CoreClrBuildScript Condition="$([MSBuild]::IsOsPlatform(Windows)) and '$(TargetOs)' == 'Windows_NT'">crossgen-corelib.cmd</_CoreClrBuildScript>
<_CoreClrBuildScript Condition="!$([MSBuild]::IsOsPlatform(Windows)) and !$('$(TargetOs)' == 'Windows_NT')">crossgen-corelib.sh</_CoreClrBuildScript>
</PropertyGroup>

<!-- Use IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and there's an existing warning in the native build. -->
<Exec Command="&quot;$(MSBuildThisFileDirectory)$(_CoreClrBuildScript)&quot; @(_CoreClrBuildArg->'%(Identity)',' ')" />
<Exec Condition="'$(_CoreClrBuildScript)' != ''" Command="&quot;$(MSBuildThisFileDirectory)$(_CoreClrBuildScript)&quot; @(_CoreClrBuildArg->'%(Identity)',' ')" />
</Target>

<Target Name="Restore" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackageTargetWindows>false</PackageTargetWindows>
<PackageTargetWindows Condition="'$(OS)' == 'Windows_NT' and '$(TargetOs)' == ''">true</PackageTargetWindows>
</PropertyGroup>

<Import Condition="'$(PackageTargetWindows)' == 'true'" Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<PropertyGroup Condition="'$(PackageTargetRuntime)' == ''">
<IsLineupPackage Condition="'$(IsLineupPackage)' == ''">true</IsLineupPackage>
Expand All @@ -11,5 +16,8 @@
<NativeBinary Include="$(BinDir)ilasm$(ApplicationFileExtension)" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Condition="'$(PackageTargetWindows)' == 'true'" Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />

<!-- Avoid "There is no target in the project" error. -->
<Target Condition="'$(PackageTargetWindows)' == 'false'" Name="Empty" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackageTargetWindows>false</PackageTargetWindows>
<PackageTargetWindows Condition="'$(OS)' == 'Windows_NT' and '$(TargetOs)' == ''">true</PackageTargetWindows>
</PropertyGroup>

<Import Condition="'$(PackageTargetWindows)' == 'true'" Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<PropertyGroup Condition="'$(PackageTargetRuntime)' == ''">
<IsLineupPackage Condition="'$(IsLineupPackage)' == ''">true</IsLineupPackage>
Expand All @@ -11,5 +16,8 @@
<NativeBinary Include="$(BinDir)ildasm$(ApplicationFileExtension)" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Condition="'$(PackageTargetWindows)' == 'true'" Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />

<!-- Avoid "There is no target in the project" error. -->
<Target Condition="'$(PackageTargetWindows)' == 'false'" Name="Empty" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackageTargetWindows>false</PackageTargetWindows>
<PackageTargetWindows Condition="'$(OS)' == 'Windows_NT' and '$(TargetOs)' == ''">true</PackageTargetWindows>
</PropertyGroup>

<Import Condition="'$(PackageTargetWindows)' == 'true'" Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<PropertyGroup Condition="'$(PackageTargetRuntime)' == ''">
<IsLineupPackage Condition="'$(IsLineupPackage)' == ''">true</IsLineupPackage>
Expand All @@ -11,5 +16,8 @@
<NativeBinary Include="$(BinDir)corerun$(ApplicationFileExtension)" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
<Import Condition="'$(PackageTargetWindows)' == 'true'" Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />

<!-- Avoid "There is no target in the project" error. -->
<Target Condition="'$(PackageTargetWindows)' == 'false'" Name="Empty" />
</Project>
Loading