Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/ilasm
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2018-10-10 18:49:38 +0300
committerGitHub <noreply@github.com>2018-10-10 18:49:38 +0300
commit8d8fd97dbfc6f4213e0fe9fca7574808dd8496d3 (patch)
tree2de385dee698f56a5df6e47b220d7ccd340fbd7b /mcs/ilasm
parent831e73abcd5b9e10b4aaff7872b8d68e8e0f60fd (diff)
[build] Unify bootstrap profiles (#11024)
* [build] Unify bootstrap profiles We can now rely on build only as we have reliable monolite and package compilers * Fixes genproj dependencies * [csproj] Update project files
Diffstat (limited to 'mcs/ilasm')
-rw-r--r--mcs/ilasm/Driver.cs12
-rw-r--r--mcs/ilasm/Makefile12
-rw-r--r--mcs/ilasm/ilasm.csproj9
-rw-r--r--mcs/ilasm/ilasm.exe.sources6
4 files changed, 36 insertions, 3 deletions
diff --git a/mcs/ilasm/Driver.cs b/mcs/ilasm/Driver.cs
index fc2e213bc87..dc4929d79d4 100644
--- a/mcs/ilasm/Driver.cs
+++ b/mcs/ilasm/Driver.cs
@@ -14,7 +14,9 @@ using System.IO;
using System.Reflection;
using System.Collections;
using System.Security.Cryptography;
+#if HAS_MONO_SECURITY
using Mono.Security;
+#endif
namespace Mono.ILASM {
@@ -52,7 +54,9 @@ namespace Mono.ILASM {
private CodeGen codegen;
private bool keycontainer = false;
private string keyname;
+#if HAS_MONO_SECURITY
private StrongName sn;
+#endif
bool noautoinherit;
public DriverMain (string[] args)
@@ -84,9 +88,13 @@ namespace Mono.ILASM {
// if we have a key and aren't assembling a netmodule
if ((keyname != null) && !codegen.IsThisAssembly (null)) {
+#if HAS_MONO_SECURITY
LoadKey ();
// this overrides any attribute or .publickey directive in the source
codegen.ThisAssembly.SetPublicKey (sn.PublicKey);
+#else
+ throw new NotSupportedException ();
+#endif
}
try {
@@ -103,6 +111,7 @@ namespace Mono.ILASM {
return false;
}
+#if HAS_MONO_SECURITY
try {
if (sn != null) {
Report.Message ("Signing assembly with the specified strongname keypair");
@@ -111,6 +120,7 @@ namespace Mono.ILASM {
} catch {
return false;
}
+#endif
return true;
}
@@ -121,6 +131,7 @@ namespace Mono.ILASM {
Console.WriteLine ("***** FAILURE *****\n");
}
+#if HAS_MONO_SECURITY
private void LoadKey ()
{
if (keycontainer) {
@@ -146,6 +157,7 @@ namespace Mono.ILASM {
// exists
return sn.Sign (filename);
}
+#endif
private void ProcessFile (string file_path)
{
diff --git a/mcs/ilasm/Makefile b/mcs/ilasm/Makefile
index 4ca11545781..434764e55af 100644
--- a/mcs/ilasm/Makefile
+++ b/mcs/ilasm/Makefile
@@ -4,7 +4,17 @@ include ../build/rules.make
PROGRAM = ilasm.exe
BUILT_SOURCES = ILParser.cs
-LIB_REFS = PEAPI Mono.CompilerServices.SymbolWriter Mono.Security
+
+LIB_REFS = PEAPI System
+
+API_BUILD := $(filter build, $(PROFILE))
+ifdef API_BUILD
+TARGET_NET_REFERENCE = $(BOOTSTRAP_BIN_PROFILE)
+PROGRAM_USE_INTERMEDIATE_FILE = 1
+else
+LIB_REFS += Mono.Security
+LOCAL_MCS_FLAGS += -d:HAS_MONO_SECURITY
+endif
CLEAN_FILES = parser/y.output
diff --git a/mcs/ilasm/ilasm.csproj b/mcs/ilasm/ilasm.csproj
index 5a30767d5f8..5e3fd37e5d8 100644
--- a/mcs/ilasm/ilasm.csproj
+++ b/mcs/ilasm/ilasm.csproj
@@ -26,7 +26,7 @@
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
<OutputPath>./../class/lib/net_4_x-$(HostPlatform)</OutputPath>
<IntermediateOutputPath>./../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
- <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM</DefineConstants>
+ <DefineConstants>HAS_MONO_SECURITY;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM</DefineConstants>
</PropertyGroup>
<!-- @ALL_PROFILE_PROPERTIES@ -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
@@ -48,6 +48,11 @@
<!--Common files-->
<ItemGroup>
<Compile Include="..\build\common\Consts.cs" />
+ <Compile Include="..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolFile.cs" />
+ <Compile Include="..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolTable.cs" />
+ <Compile Include="..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolWriter.cs" />
+ <Compile Include="..\class\Mono.CompilerServices.SymbolWriter\SourceMethodBuilder.cs" />
+ <Compile Include="..\class\Mono.CompilerServices.SymbolWriter\SymbolWriterImpl.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Driver.cs" />
<Compile Include="Report.cs" />
@@ -153,7 +158,7 @@
<!-- @COMMON_PROJECT_REFERENCES@ -->
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
<ProjectReference Include="../class/PEAPI/PEAPI.csproj" />
- <ProjectReference Include="../class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter.csproj" />
+ <ProjectReference Include="../class/System/System.csproj" />
<ProjectReference Include="../class/Mono.Security/Mono.Security.csproj" />
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
diff --git a/mcs/ilasm/ilasm.exe.sources b/mcs/ilasm/ilasm.exe.sources
index bb93d163183..e03ff3f52ae 100644
--- a/mcs/ilasm/ilasm.exe.sources
+++ b/mcs/ilasm/ilasm.exe.sources
@@ -84,3 +84,9 @@ scanner/NumberHelper.cs
scanner/StringHelperBase.cs
scanner/StringHelper.cs
../build/common/Consts.cs
+
+../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
+../class/Mono.CompilerServices.SymbolWriter/SourceMethodBuilder.cs
+../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
+../class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
+../class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs \ No newline at end of file