diff options
author | Sven Boemer <sbomer@gmail.com> | 2017-06-09 19:44:36 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-06-09 19:44:36 +0300 |
commit | 92eb1e00dda1244d6621f334d491cfdd98a26008 (patch) | |
tree | 1b7d0d3a925830414d2f7b485a39a7037f92622e /linker | |
parent | 8609d3a5e4fa5ce3c5e7fc7f20d35986349bfa80 (diff) |
Set up task package to build for multiple tfms (#129)
Diffstat (limited to 'linker')
-rw-r--r-- | linker/ILLink.props (renamed from linker/NetCore.props) | 7 | ||||
-rw-r--r-- | linker/Mono.Linker.csproj | 22 | ||||
-rw-r--r-- | linker/Mono.Linker/AssemblyResolver.cs | 2 | ||||
-rw-r--r-- | linker/Mono.Linker/DirectoryAssemblyResolver.cs | 2 | ||||
-rw-r--r-- | linker/Mono.Linker/Driver.cs | 4 |
5 files changed, 19 insertions, 18 deletions
diff --git a/linker/NetCore.props b/linker/ILLink.props index 3a8c30dba..db2a8a8f4 100644 --- a/linker/NetCore.props +++ b/linker/ILLink.props @@ -1,13 +1,14 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netcoreapp2.0</TargetFramework> + <TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks> + <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks> <RuntimeFrameworkVersion>2.0.0-beta-001509-00</RuntimeFrameworkVersion> - <DefineConstants>$(DefineConstants);NET_CORE</DefineConstants> + <DefineConstants>$(DefineConstants);FEATURE_ILLINK</DefineConstants> <EnableDefaultCompileItems>false</EnableDefaultCompileItems> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> <AssemblyName>illink</AssemblyName> - <OutputType>exe</OutputType> + <OutputType>Library</OutputType> </PropertyGroup> </Project> diff --git a/linker/Mono.Linker.csproj b/linker/Mono.Linker.csproj index 8da37d7d2..ff826f3a3 100644 --- a/linker/Mono.Linker.csproj +++ b/linker/Mono.Linker.csproj @@ -10,11 +10,11 @@ targets. --> <PropertyGroup> - <NetCoreBuild Condition=" $(Configuration.StartsWith('netcore')) Or '$(NuGetRestoreTargets)' != '' ">true</NetCoreBuild> - <NetCoreBuild Condition=" '$(NetCoreBuild)' == '' ">false</NetCoreBuild> + <ILLinkBuild Condition=" $(Configuration.StartsWith('illink')) Or '$(NuGetRestoreTargets)' != '' ">true</ILLinkBuild> + <ILLinkBuild Condition=" '$(ILLinkBuild)' == '' ">false</ILLinkBuild> <TargetFrameworkProfile /> </PropertyGroup> - <Import Project="NetCore.props" Condition=" $(NetCoreBuild) " /> + <Import Project="ILLink.props" Condition=" $(ILLinkBuild) " /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -24,8 +24,8 @@ <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Mono.Linker</RootNamespace> - <AssemblyName Condition=" ! $(NetCoreBuild) ">monolinker</AssemblyName> - <AssemblyName Condition=" $(NetCoreBuild) ">illink</AssemblyName> + <AssemblyName Condition=" ! $(ILLinkBuild) ">monolinker</AssemblyName> + <AssemblyName Condition=" $(ILLinkBuild) ">illink</AssemblyName> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -45,7 +45,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" Condition=" ! $(NetCoreBuild) " /> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" Condition=" ! $(ILLinkBuild) " /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> @@ -53,7 +53,7 @@ <Target Name="AfterBuild"> </Target> --> - <ItemGroup Condition=" ! $(NetCoreBuild) "> + <ItemGroup Condition=" ! $(ILLinkBuild) "> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="System.Xml" /> @@ -98,14 +98,14 @@ </ItemGroup> <ItemGroup> <ProjectReference Include="..\cecil\Mono.Cecil.csproj"> - <SetConfiguration Condition=" '$(Configuration)' == 'netcore_Debug' ">Configuration=netstandard_Debug</SetConfiguration> - <SetConfiguration Condition=" '$(Configuration)' == 'netcore_Release' ">Configuration=netstandard_Release</SetConfiguration> + <SetConfiguration Condition=" '$(Configuration)' == 'illink_Debug' ">Configuration=netstandard_Debug</SetConfiguration> + <SetConfiguration Condition=" '$(Configuration)' == 'illink_Release' ">Configuration=netstandard_Release</SetConfiguration> <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project> <Name>Mono.Cecil</Name> </ProjectReference> <ProjectReference Include="..\cecil\symbols\pdb\Mono.Cecil.Pdb.csproj"> - <SetConfiguration Condition=" '$(Configuration)' == 'netcore_Debug' ">Configuration=netstandard_Debug</SetConfiguration> - <SetConfiguration Condition=" '$(Configuration)' == 'netcore_Release' ">Configuration=netstandard_Release</SetConfiguration> + <SetConfiguration Condition=" '$(Configuration)' == 'illink_Debug' ">Configuration=netstandard_Debug</SetConfiguration> + <SetConfiguration Condition=" '$(Configuration)' == 'illink_Release' ">Configuration=netstandard_Release</SetConfiguration> <Project>{63E6915C-7EA4-4D76-AB28-0D7191EEA626}</Project> <Name>Mono.Cecil.Pdb</Name> </ProjectReference> diff --git a/linker/Mono.Linker/AssemblyResolver.cs b/linker/Mono.Linker/AssemblyResolver.cs index c8351f76f..b10bb5374 100644 --- a/linker/Mono.Linker/AssemblyResolver.cs +++ b/linker/Mono.Linker/AssemblyResolver.cs @@ -33,7 +33,7 @@ using Mono.Cecil; namespace Mono.Linker { -#if NET_CORE +#if FEATURE_ILLINK public class AssemblyResolver : DirectoryAssemblyResolver { #else public class AssemblyResolver : BaseAssemblyResolver { diff --git a/linker/Mono.Linker/DirectoryAssemblyResolver.cs b/linker/Mono.Linker/DirectoryAssemblyResolver.cs index 8ff0b50c2..416dab71b 100644 --- a/linker/Mono.Linker/DirectoryAssemblyResolver.cs +++ b/linker/Mono.Linker/DirectoryAssemblyResolver.cs @@ -5,7 +5,7 @@ using System.IO; using Mono.Collections.Generic; using Mono.Cecil; -#if NET_CORE +#if FEATURE_ILLINK namespace Mono.Linker { public abstract class DirectoryAssemblyResolver : IAssemblyResolver { diff --git a/linker/Mono.Linker/Driver.cs b/linker/Mono.Linker/Driver.cs index e71436abb..16616b437 100644 --- a/linker/Mono.Linker/Driver.cs +++ b/linker/Mono.Linker/Driver.cs @@ -37,7 +37,7 @@ namespace Mono.Linker { public class Driver { -#if NET_CORE +#if FEATURE_ILLINK static readonly string _linker = "IL Linker"; #else static readonly string _linker = "Mono CIL Linker"; @@ -284,7 +284,7 @@ namespace Mono.Linker { Console.WriteLine (_linker); if (msg != null) Console.WriteLine ("Error: " + msg); -#if NET_CORE +#if FEATURE_ILLINK Console.WriteLine ("illink [options] -x|-a|-i file"); #else Console.WriteLine ("monolinker [options] -x|-a|-i file"); |