-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
If an assembly changes, then we must AOT compile that assembly again (which we already did), in addition to any assembly that references the modified assembly (which we didn't do). So rework the AOTCompile target: remove the Inputs and Outputs (because the dependency tracking is too complicated for MSBuild to resolve), and instead move the logic to detect if an assembly must be AOT-compiled again into the AOTCompile task. Note that this PR has a custom port to .NET 8: #18518. Fixes #17708. --------- Co-authored-by: Alex Soto <[email protected]>
- Loading branch information
1 parent
6431e88
commit b17626f
Showing
29 changed files
with
332 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/dotnet/RebuildTestAppWithLibraryReference/AppDelegate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
using Foundation; | ||
|
||
namespace MySimpleApp { | ||
public class Program { | ||
static int Main (string [] args) | ||
{ | ||
GC.KeepAlive (typeof (NSObject)); // prevent linking away the platform assembly | ||
|
||
Console.WriteLine (Environment.GetEnvironmentVariable ("MAGIC_WORD")); | ||
Console.WriteLine (Library.Class.SomeFunction ()); | ||
|
||
return args.Length; | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/dotnet/RebuildTestAppWithLibraryReference/Library/Library.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Library { | ||
public class Class { | ||
public static string SomeFunction () | ||
{ | ||
#if FIRSTBUILD | ||
return "FIRSTBUILD"; | ||
#elif SECONDBUILD | ||
return "SECONDBUILD"; | ||
#endif | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/RebuildTestAppWithLibraryReference/Library/MacCatalyst/Library.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFrameworks> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
1 change: 1 addition & 0 deletions
1
tests/dotnet/RebuildTestAppWithLibraryReference/Library/MacCatalyst/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
2 changes: 2 additions & 0 deletions
2
tests/dotnet/RebuildTestAppWithLibraryReference/Library/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TOP=../../../.. | ||
include $(TOP)/tests/common/shared-dotnet-test.mk |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/RebuildTestAppWithLibraryReference/Library/iOS/Library.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFrameworks> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
1 change: 1 addition & 0 deletions
1
tests/dotnet/RebuildTestAppWithLibraryReference/Library/iOS/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/RebuildTestAppWithLibraryReference/Library/macOS/Library.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFrameworks> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
1 change: 1 addition & 0 deletions
1
tests/dotnet/RebuildTestAppWithLibraryReference/Library/macOS/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
12 changes: 12 additions & 0 deletions
12
tests/dotnet/RebuildTestAppWithLibraryReference/Library/shared.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<DefineConstants Condition="'$(BuildCounter)' == 'First'">$(DefineConstants);FIRSTBUILD</DefineConstants> | ||
<DefineConstants Condition="'$(BuildCounter)' == 'Second'">$(DefineConstants);SECONDBUILD</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="../*.cs" /> | ||
</ItemGroup> | ||
</Project> |
2 changes: 2 additions & 0 deletions
2
tests/dotnet/RebuildTestAppWithLibraryReference/Library/shared.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TOP=../../../../.. | ||
include $(TOP)/tests/common/shared-dotnet.mk |
7 changes: 7 additions & 0 deletions
7
tests/dotnet/RebuildTestAppWithLibraryReference/Library/tvOS/Library.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFrameworks> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
1 change: 1 addition & 0 deletions
1
tests/dotnet/RebuildTestAppWithLibraryReference/Library/tvOS/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
1 change: 1 addition & 0 deletions
1
tests/dotnet/RebuildTestAppWithLibraryReference/MacCatalyst/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
.../RebuildTestAppWithLibraryReference/MacCatalyst/RebuildTestAppWithLibraryReference.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-maccatalyst</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TOP=../../.. | ||
include $(TOP)/tests/common/shared-dotnet-test.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
...s/dotnet/RebuildTestAppWithLibraryReference/iOS/RebuildTestAppWithLibraryReference.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-ios</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
...dotnet/RebuildTestAppWithLibraryReference/macOS/RebuildTestAppWithLibraryReference.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-macos</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
19 changes: 19 additions & 0 deletions
19
tests/dotnet/RebuildTestAppWithLibraryReference/shared.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
|
||
<ApplicationTitle>RebuildTestAppWithLibraryReference</ApplicationTitle> | ||
<ApplicationId>com.xamarin.rebuildtestappwithlibraryreference</ApplicationId> | ||
|
||
<ExcludeTouchUnitReference>true</ExcludeTouchUnitReference> | ||
<ExcludeNUnitLiteReference>true</ExcludeNUnitLiteReference> | ||
</PropertyGroup> | ||
|
||
<Import Project="../../common/shared-dotnet.csproj" /> | ||
|
||
<ItemGroup> | ||
<Compile Include="../*.cs" /> | ||
<ProjectReference Include="../Library/$(_PlatformName)/Library.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TOP=../../../.. | ||
include $(TOP)/tests/common/shared-dotnet.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
.../dotnet/RebuildTestAppWithLibraryReference/tvOS/RebuildTestAppWithLibraryReference.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-tvos</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.csproj" /> | ||
</Project> |
Oops, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.