mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Merge pull request #502 from js6pak/disable-x32-xref
Add a config option to disable xref and disable it by default on x32
This commit is contained in:
1 file changed
+6
-1
@@ -58,6 +58,11 @@ internal static class Il2CppInteropManager
|
|||||||
.AppendLine("resulting in names that persist after game updates.")
|
.AppendLine("resulting in names that persist after game updates.")
|
||||||
.ToString());
|
.ToString());
|
||||||
|
|
||||||
|
private static readonly ConfigEntry<bool> ScanMethodRefs = ConfigFile.CoreConfig.Bind(
|
||||||
|
"IL2CPP", "ScanMethodRefs",
|
||||||
|
Environment.Is64BitProcess,
|
||||||
|
"If enabled, Il2CppInterop will use xref to find dead methods and generate CallerCount attributes.");
|
||||||
|
|
||||||
private static readonly ConfigEntry<bool> DumpDummyAssemblies = ConfigFile.CoreConfig.Bind(
|
private static readonly ConfigEntry<bool> DumpDummyAssemblies = ConfigFile.CoreConfig.Bind(
|
||||||
"IL2CPP", "DumpDummyAssemblies",
|
"IL2CPP", "DumpDummyAssemblies",
|
||||||
false,
|
false,
|
||||||
@@ -287,7 +292,7 @@ internal static class Il2CppInteropManager
|
|||||||
{
|
{
|
||||||
var opts = new GeneratorOptions
|
var opts = new GeneratorOptions
|
||||||
{
|
{
|
||||||
GameAssemblyPath = GameAssemblyPath,
|
GameAssemblyPath = ScanMethodRefs.Value ? GameAssemblyPath : null,
|
||||||
Source = sourceAssemblies,
|
Source = sourceAssemblies,
|
||||||
OutputDir = IL2CPPInteropAssemblyPath,
|
OutputDir = IL2CPPInteropAssemblyPath,
|
||||||
UnityBaseLibsDir = Directory.Exists(UnityBaseLibsDirectory) ? UnityBaseLibsDirectory : null,
|
UnityBaseLibsDir = Directory.Exists(UnityBaseLibsDirectory) ? UnityBaseLibsDirectory : null,
|
||||||
|
|||||||
Reference in new issue
Block a user