forked from mono/mono
-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile ProcessImportedType in IDataContractSurrogate for unityaot
The `IDataContractSurrogate` interface is part of the public API of .NET 4.7.1. In has a method named `ProcessImportedType`, which was not compiled into the unityaot profile. The `ProcessImportedType` method uses types `CodeTypeDeclaration` and `CodeCompileUnit` as parameters. Both of these types are pretty large, and we don't want to compile them into the unityaot profile. So in order to compile the `ProcessImportedType` method method, add empty `CodeTypeDeclaration` and `CodeCompileUnit` types in unityaot (the profile stubber will fill these in properly). This change allows the unstripped unityaot profile work correctly with IL2CPP. It is difficult for the profile stubber to handle this case, because the code in `SurrogateProviderAdapter` is in a facade assembly, which the profile stubber currently ignores.
- Loading branch information
Josh Peterson
committed
May 20, 2019
1 parent
a69e92f
commit 0e66d19
Showing
5 changed files
with
21 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#if UNITY_AOT | ||
|
||
public class CodeCompileUnit | ||
{ | ||
} | ||
|
||
#endif |
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 @@ | ||
#if UNITY_AOT | ||
|
||
public class CodeTypeDeclaration | ||
{ | ||
} | ||
|
||
#endif |
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