Skip to content
Merged
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
3 changes: 2 additions & 1 deletion dotnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ endef
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call SupportedTargetPlatforms,$(platform))))

define WorkloadTargets
Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.json: targets/WorkloadManifest.$(1).template.json Makefile $(TOP)/Make.config.inc $(TOP)/.git/HEAD $(TOP)/.git/index
Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.json: targets/WorkloadManifest.$(1).template.json Makefile $(TOP)/Make.config.inc $(TOP)/.git/HEAD $(TOP)/.git/index Makefile
$$(Q) rm -f $$@.tmp
$$(Q_GEN) sed \
-e "s/@VERSION@/$3/g" \
-e "s/@BUNDLED_NETCORE_PLATFORMS_PACKAGE_VERSION@/$(BUNDLED_NETCORE_PLATFORMS_PACKAGE_VERSION)/g" \
-e "s/@PLATFORM_LOWERCASE@/$2/g" \
-e "s/@PLATFORM@/$1/g" \
$$< > $$@.tmp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.MacCatalyst.Sdk" Condition="'$(TargetPlatformIdentifier)' == 'MacCatalyst'" />

<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.RuntimeConfigParser.Task" Condition="'$(TargetPlatformIdentifier)' == 'MacCatalyst'" />
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'MacCatalyst'">
<!-- Workaround for https://github.com/dotnet/runtime/issues/53811 -->
<RuntimeConfigParserTasksAssemblyPath>$([System.IO.Path]::GetDirectoryName($(RuntimeConfigParserTasksAssemblyPath)))/net6.0/$([System.IO.Path]::GetFileName($(RuntimeConfigParserTasksAssemblyPath)))</RuntimeConfigParserTasksAssemblyPath>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) ">
<SdkSupportedTargetPlatformIdentifier Include="maccatalyst" DisplayName="Mac Catalyst" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm" Condition="'$(TargetPlatformIdentifier)' == 'iOS' And '$(RuntimeIdentifier)' == 'ios-arm'" />
<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64" Condition="'$(TargetPlatformIdentifier)' == 'iOS' And '$(RuntimeIdentifier)' == 'ios-arm64'" />

<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.RuntimeConfigParser.Task" Condition="'$(TargetPlatformIdentifier)' == 'iOS'" />
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'iOS'">
<!-- Workaround for https://github.com/dotnet/runtime/issues/53811 -->
<RuntimeConfigParserTasksAssemblyPath>$([System.IO.Path]::GetDirectoryName($(RuntimeConfigParserTasksAssemblyPath)))/net6.0/$([System.IO.Path]::GetFileName($(RuntimeConfigParserTasksAssemblyPath)))</RuntimeConfigParserTasksAssemblyPath>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) ">
<SdkSupportedTargetPlatformIdentifier Include="ios" DisplayName="iOS" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.macOS.Sdk" Condition="'$(TargetPlatformIdentifier)' == 'macOS'" />

<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.RuntimeConfigParser.Task" Condition="'$(TargetPlatformIdentifier)' == 'macOS'" />
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'macOS'">
<!-- Workaround for https://github.com/dotnet/runtime/issues/53811 -->
<RuntimeConfigParserTasksAssemblyPath>$([System.IO.Path]::GetDirectoryName($(RuntimeConfigParserTasksAssemblyPath)))/net6.0/$([System.IO.Path]::GetFileName($(RuntimeConfigParserTasksAssemblyPath)))</RuntimeConfigParserTasksAssemblyPath>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) ">
<SdkSupportedTargetPlatformIdentifier Include="macos" DisplayName="macOS" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.tvos-arm64" Condition="'$(TargetPlatformIdentifier)' == 'tvOS' And '$(RuntimeIdentifier)' == 'tvos-arm64'" />

<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.RuntimeConfigParser.Task" Condition="'$(TargetPlatformIdentifier)' == 'tvOS'" />
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'tvOS'">
<!-- Workaround for https://github.com/dotnet/runtime/issues/53811 -->
<RuntimeConfigParserTasksAssemblyPath>$([System.IO.Path]::GetDirectoryName($(RuntimeConfigParserTasksAssemblyPath)))/net6.0/$([System.IO.Path]::GetFileName($(RuntimeConfigParserTasksAssemblyPath)))</RuntimeConfigParserTasksAssemblyPath>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) ">
<SdkSupportedTargetPlatformIdentifier Include="tvos" DisplayName="tvOS" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions dotnet/targets/WorkloadManifest.iOS.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"Microsoft.@PLATFORM@.Ref",
"Microsoft.@PLATFORM@.Templates",
],
"extends": [
"microsoft-net-runtime-ios",
],
}
},
"packs": {
Expand Down
5 changes: 4 additions & 1 deletion dotnet/targets/WorkloadManifest.tvOS.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"Microsoft.@PLATFORM@.Sdk",
"Microsoft.@PLATFORM@.Ref",
"Microsoft.@PLATFORM@.Templates"
]
],
"extends": [
"microsoft-net-runtime-tvos",
],
}
},
"packs": {
Expand Down
36 changes: 30 additions & 6 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
</PropertyGroup>
</Target>

<Target Name="_ComputeLinkerArguments" DependsOnTargets="_ComputeLinkMode;_ComputeFrameworkVariables;_ComputeFrameworkAssemblies;ComputeResolvedFilesToPublishList;_ParseBundlerArguments;_ComputeVariables;">
<Target Name="_ComputeLinkerArguments" DependsOnTargets="_ComputeLinkMode;_ComputeFrameworkVariables;_ComputeFrameworkAssemblies;ComputeResolvedFilesToPublishList;_ParseBundlerArguments;_ComputeVariables;_CreateRuntimeConfiguration">
<!-- Validate the linker mode -->
<Error Text="Invalid link mode: '$(_LinkMode)'. Valid link modes are: 'None', 'SdkOnly' and 'Full'" Condition="'$(_LinkMode)' != 'None' And '$(_LinkMode)' != 'SdkOnly' And '$(_LinkMode)' != 'Full'" />

Expand Down Expand Up @@ -254,6 +254,7 @@
Platform=$(_PlatformName)
PlatformAssembly=$(_PlatformAssemblyName).dll
Registrar=$(_BundlerRegistrar)
RuntimeConfigurationFile=$(_RuntimeConfigurationFile)
SdkDevPath=$(_SdkDevPath)
SdkRootDirectory=$(_XamarinSdkRootDirectory)
SdkVersion=$(_SdkVersion)
Expand Down Expand Up @@ -362,7 +363,7 @@
<ItemGroup>
<!-- Support a 'CopyToAppBundle' metadata that can be set to 'false' to avoid copying a framework to the app bundle -->
<_DynamicLibraryToPublish Include="@(_FileNativeReference)" Condition="'%(_FileNativeReference.Kind)' == 'Dynamic' And '%(_FileNativeReference.CopyToAppBundle)' != 'false'">
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_AppBundleFrameworksDir)))\$(_DylibRelativePath)%(Filename)%(Extension)</RelativePath>
<RelativePath>$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)\$(PublishDir),$(_DylibPublishDir)))\%(Filename)%(Extension)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</_DynamicLibraryToPublish>

Expand Down Expand Up @@ -477,15 +478,13 @@
<_LibXamarinDebug Condition="'$(_BundlerDebug)' == 'true'">-debug</_LibXamarinDebug>
<_LibXamarinName Condition="'$(_LibXamarinName)' == ''">libxamarin-dotnet$(_LibXamarinRuntime)$(_LibXamarinDebug).$(_LibXamarinExtension)</_LibXamarinName>

<!-- the path relative to the root of the app bundle where dynamic libraries should be placed -->
<_DylibRelativePath Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">/</_DylibRelativePath>
<_DylibRelativePath Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">Contents/$(_CustomBundleName)/</_DylibRelativePath>

<_DylibRPath Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">@executable_path</_DylibRPath>
<_DylibRPath Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">@executable_path/../$(_CustomBundleName)/</_DylibRPath>

<_EmbeddedFrameworksRPath Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">@executable_path/Frameworks</_EmbeddedFrameworksRPath>
<_EmbeddedFrameworksRPath Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">@executable_path/../Frameworks/</_EmbeddedFrameworksRPath>

<_RuntimeConfigurationFile>runtimeconfig.bin</_RuntimeConfigurationFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -507,6 +506,30 @@
</Target>

<!-- App bundle creation tasks -->

<Target Name="_CreateRuntimeConfiguration"
Condition="'$(UseMonoRuntime)' != 'false'"
Copy link
Member

Choose a reason for hiding this comment

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

You might also check here if $(GenerateRuntimeConfigurationFiles) is true?

If a user sets it to false in their project, I think the *.runtimeconfig.json file would not be created:

https://github.com/dotnet/sdk/blob/415f1b90e14ddbbcfd6e2cb2d91b27e72db54db0/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L238

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm yeah, good point, maybe we could even warn that some features won't work in that case.

Inputs="$(ProjectRuntimeConfigFilePath)"
Outputs="$(_ParsedRuntimeConfigFilePath)"
DependsOnTargets="GenerateBuildRuntimeConfigurationFiles;_ComputePublishLocation"
>
<ItemGroup>
<!-- List all the properties passed to xamarin_bridge_vm_initialize in xamarin_vm_initialize (in runtime.m) -->
<_RuntimeConfigReservedProperties Include="APP_PATHS" />
<_RuntimeConfigReservedProperties Include="PINVOKE_OVERRIDE" />
<_RuntimeConfigReservedProperties Include="ICU_DAT_FILE_PATH" />
</ItemGroup>
<RuntimeConfigParserTask
Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true'"
RuntimeConfigFile="$(ProjectRuntimeConfigFilePath)"
OutputFile="$(_ParsedRuntimeConfigFilePath)"
RuntimeConfigReservedProperties="@(_RuntimeConfigReservedProperties)"
>
</RuntimeConfigParserTask>

<Warning Condition="'$(GenerateRuntimeConfigurationFiles)' != 'true'" Text="Some features may not work correctly, because the generation of the runtime configure file (*.runtimeconfig.json) has been disabled." />
</Target>

<Target Name="_AOTCompile"
Condition="'$(_SdkIsSimulator)' != 'true' And '$(_PlatformName)' != 'macOS'"
DependsOnTargets="_ComputeVariables"
Expand Down Expand Up @@ -695,6 +718,7 @@
<_AssemblyPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\Contents\$(_CustomBundleName)\</_AssemblyPublishDir>
<_DylibPublishDir Condition="'$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\</_DylibPublishDir>
<_DylibPublishDir Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">$(MSBuildProjectDirectory)\$(_AppBundlePath)\Contents\$(_CustomBundleName)\</_DylibPublishDir>
<_ParsedRuntimeConfigFilePath Condition="'$(_ParsedRuntimeConfigFilePath)' == ''">$(_AssemblyPublishDir)\$(_RuntimeConfigurationFile)</_ParsedRuntimeConfigFilePath>
</PropertyGroup>
<ItemGroup>
<!-- include .dll, .exe and, for debugging only, .pdb files inside the .app -->
Expand Down
8 changes: 8 additions & 0 deletions runtime/exports.t4
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,14 @@
Mode = DotNetMode.OnlyDotNet,
},

new Export ("int", "monovm_runtimeconfig_initialize",
"MonovmRuntimeConfigArguments *", "arg",
"MonovmRuntimeConfigArgumentsCleanup", "cleanup_fn",
"void *", "user_data"
) {
Mode = DotNetMode.OnlyDotNet,
},

#endregion
};
#><#+
Expand Down
16 changes: 16 additions & 0 deletions runtime/mono-runtime.h.t4
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,22 @@ typedef enum {
// Here we go with the latter (void*), because that's the future, and it should also be compatible with the 2020-02 branch.
typedef void (*MonoFtnPtrEHCallback) (GCHandle gchandle);

/* mini/mono-private-unstable.h */
typedef struct {
uint32_t kind; // 0 = Path of runtimeconfig.blob, 1 = pointer to image data, >= 2 undefined
union {
struct {
const char *path;
} name;
struct {
const char *data;
uint32_t data_len;
} data;
} runtimeconfig;
} MonovmRuntimeConfigArguments;

typedef void (*MonovmRuntimeConfigArgumentsCleanup) (MonovmRuntimeConfigArguments *args, void *user_data);

/* not in any header */

void mono_gc_init_finalizer_thread ();
Expand Down
39 changes: 39 additions & 0 deletions runtime/monovm-bridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#include <TargetConditionals.h>
#include <pthread.h>
#include <sys/mman.h>
#include <sys/stat.h>

#if !DOTNET && TARGET_OS_OSX
#define LEGACY_XAMARIN_MAC 1
Expand Down Expand Up @@ -392,11 +394,48 @@

#if DOTNET

static void
xamarin_runtime_config_cleanup (MonovmRuntimeConfigArguments *args, void *user_data)
{
free ((char *) args->runtimeconfig.name.path);
free (args);
}

static void
xamarin_initialize_runtime_config ()
{
if (xamarin_runtime_configuration_name == NULL) {
LOG (PRODUCT ": No runtime config file provided at build time.\n");
return;
}

const char *app_path = xamarin_get_bundle_path ();
char path [1024];
if (!xamarin_locate_assembly_resource_for_root (app_path, NULL, xamarin_runtime_configuration_name, path, sizeof (path))) {
LOG (PRODUCT ": Could not locate the runtime config file '%s' in the app bundle: %s\n", xamarin_runtime_configuration_name, app_path);
return;
}

MonovmRuntimeConfigArguments *args = (MonovmRuntimeConfigArguments *) calloc (sizeof (MonovmRuntimeConfigArguments), 1);
args->kind = 0; // Path of runtimeconfig.blob
args->runtimeconfig.name.path = strdup (path);

int rv = monovm_runtimeconfig_initialize (args, xamarin_runtime_config_cleanup, NULL);
if (rv != 0) {
LOG_MONOVM (PRODUCT ": Failed to load the runtime config file %s: %i\n", path, rv);
return;
}

LOG_MONOVM (PRODUCT ": Loaded the runtime config file %s\n", path);
}

bool
xamarin_bridge_vm_initialize (int propertyCount, const char **propertyKeys, const char **propertyValues)
{
int rv;

xamarin_initialize_runtime_config ();

rv = monovm_initialize (propertyCount, propertyKeys, propertyValues);
Copy link
Contributor

Choose a reason for hiding this comment

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

does not this call reset the values of the config file ?

Copy link
Member Author

Choose a reason for hiding this comment

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


LOG_MONOVM (stderr, "xamarin_vm_initialize (%i, %p, %p): rv: %i\n", propertyCount, propertyKeys, propertyValues, rv);
Expand Down
3 changes: 3 additions & 0 deletions runtime/runtime.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
enum MarshalManagedExceptionMode xamarin_marshal_managed_exception_mode = MarshalManagedExceptionModeDefault;
enum XamarinLaunchMode xamarin_launch_mode = XamarinLaunchModeApp;
bool xamarin_supports_dynamic_registration = true;
const char *xamarin_runtime_configuration_name = NULL;

/* Callbacks */

Expand Down Expand Up @@ -2383,6 +2384,8 @@ -(void) xamarinSetFlags: (enum XamarinGCHandleFlags) flags;
xamarin_vm_initialize ()
{
char *pinvokeOverride = xamarin_strdup_printf ("%p", &xamarin_pinvoke_override);
// All the properties we pass here must also be listed in the _RuntimeConfigReservedProperties item group
// for the _CreateRuntimeConfiguration target in dotnet/targets/Xamarin.Shared.Sdk.targets.
const char *propertyKeys[] = {
"APP_PATHS",
"PINVOKE_OVERRIDE",
Expand Down
1 change: 1 addition & 0 deletions runtime/xamarin/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ extern enum MarshalObjectiveCExceptionMode xamarin_marshal_objectivec_exception_
extern enum MarshalManagedExceptionMode xamarin_marshal_managed_exception_mode;
extern enum XamarinLaunchMode xamarin_launch_mode;
extern bool xamarin_supports_dynamic_registration;
extern const char *xamarin_runtime_configuration_name;

typedef void (*xamarin_setup_callback) ();
typedef int (*xamarin_extension_main_callback) (int argc, char** argv);
Expand Down
1 change: 1 addition & 0 deletions runtime/xamarin/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ const char * xamarin_find_assembly_directory (const char *assembly_name);
void xamarin_set_assembly_directories (struct AssemblyLocations *directories);
void xamarin_get_assembly_name_without_extension (const char *aname, char *name, size_t namelen);
bool xamarin_locate_assembly_resource_for_name (MonoAssemblyName *assembly_name, const char *resource, char *path, size_t pathlen);
bool xamarin_locate_assembly_resource_for_root (const char *root, const char *culture, const char *resource, char *path, size_t pathlen);
bool xamarin_locate_assembly_resource (const char *assembly_name, const char *culture, const char *resource, char *path, size_t pathlen);

// this functions support NSLog/NSString-style format specifiers.
Expand Down
2 changes: 2 additions & 0 deletions tests/common/DotNet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public static void CompareApps (string old_app, string new_app)
return false; // ICU data file only present on .NET
case "runtime-options.plist":
return false; // the .NET runtime will deal with selecting the http handler, no need for us to do anything
case "runtimeconfig.bin":
return false; // this file is present for .NET apps, but not legacy apps.
}

var components = v.Split ('/');
Expand Down
9 changes: 9 additions & 0 deletions tests/dotnet/MySingleView/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
TOP=../../..

include $(TOP)/Make.config

build:
$(DOTNET6) build /bl $(MSBULD_VERBOSITY)

run:
$(DOTNET6) build /bl $(MSBUILD_VERBOSITY) /t:Run
3 changes: 3 additions & 0 deletions tools/common/Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,9 @@ void GenerateIOSMain (StringWriter sw, Abi abi)
foreach (var kvp in app.EnvironmentVariables)
sw.WriteLine ("\tsetenv (\"{0}\", \"{1}\", 1);", kvp.Key.Replace ("\"", "\\\""), kvp.Value.Replace ("\"", "\\\""));
sw.WriteLine ("\txamarin_supports_dynamic_registration = {0};", app.DynamicRegistrationSupported ? "TRUE" : "FALSE");
#if NET
sw.WriteLine ("\txamarin_runtime_configuration_name = {0};", string.IsNullOrEmpty (app.RuntimeConfigurationFile) ? "NULL" : $"\"{app.RuntimeConfigurationFile}\"");
#endif
sw.WriteLine ("}");
sw.WriteLine ();
sw.Write ("int ");
Expand Down
1 change: 1 addition & 0 deletions tools/dotnet-linker/Compat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
namespace Xamarin.Bundler {
public partial class Application {
public LinkerConfiguration Configuration { get; private set; }
public string RuntimeConfigurationFile { get; set; }

public Application (LinkerConfiguration configuration)
{
Expand Down
4 changes: 4 additions & 0 deletions tools/dotnet-linker/LinkerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ public static LinkerConfiguration GetInstance (LinkContext context, bool createI
case "Registrar":
Application.ParseRegistrar (value);
break;
case "RuntimeConfigurationFile":
Application.RuntimeConfigurationFile = value;
break;
case "SdkDevPath":
Driver.SdkRoot = value;
break;
Expand Down Expand Up @@ -302,6 +305,7 @@ public void Write ()
Console.WriteLine ($" Platform: {Platform}");
Console.WriteLine ($" PlatformAssembly: {PlatformAssembly}.dll");
Console.WriteLine ($" Registrar: {Application.Registrar} (Options: {Application.RegistrarOptions})");
Console.WriteLine ($" RuntimeConfigurationFile: {Application.RuntimeConfigurationFile}");
Console.WriteLine ($" SdkDevPath: {Driver.SdkRoot}");
Console.WriteLine ($" SdkRootDirectory: {SdkRootDirectory}");
Console.WriteLine ($" SdkVersion: {SdkVersion}");
Expand Down