diff options
-rw-r--r-- | mcs/Makefile | 2 | ||||
-rw-r--r-- | mcs/build/profiles/wasm_tools.make | 18 | ||||
-rw-r--r-- | mcs/class/Makefile | 9 | ||||
-rw-r--r-- | mcs/class/Mono.Cecil/Mono.Cecil.csproj | 22 | ||||
-rw-r--r-- | mcs/tools/Makefile | 2 | ||||
-rw-r--r-- | mcs/tools/linker/monolinker.csproj | 8 | ||||
-rw-r--r-- | runtime/Makefile.am | 4 | ||||
-rw-r--r-- | sdks/builds/wasm.mk | 2 | ||||
-rw-r--r-- | sdks/wasm/Makefile | 24 |
9 files changed, 72 insertions, 19 deletions
diff --git a/mcs/Makefile b/mcs/Makefile index ebf2b845708..bb2688e7cec 100644 --- a/mcs/Makefile +++ b/mcs/Makefile @@ -25,6 +25,7 @@ winaot_SUBDIRS := build class orbis_SUBDIRS := build class unreal_SUBDIRS := build class wasm_SUBDIRS := build class +wasm_tools_SUBDIRS := build class tools include build/rules.make @@ -82,6 +83,7 @@ $(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: $(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--% $(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--% $(_boot_:%=profile-do--wasm--%): profile-do--wasm--%: profile-do--build--% +$(_boot_:%=profile-do--wasm_tools--%): profile-do--wasm_tools--%: profile-do--build--% testcorlib: @cd class/corlib && $(MAKE) test run-test diff --git a/mcs/build/profiles/wasm_tools.make b/mcs/build/profiles/wasm_tools.make new file mode 100644 index 00000000000..e864c36c200 --- /dev/null +++ b/mcs/build/profiles/wasm_tools.make @@ -0,0 +1,18 @@ +# -*- makefile -*- + +BOOTSTRAP_PROFILE = build + +BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC) +MCS = $(BOOTSTRAP_MCS) + +profile-check: + @: + +TARGET_NET_REFERENCE = v4.6 +DEFAULT_REFERENCES = mscorlib + +PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib $(PLATFORM_DEBUG_FLAGS) + +FRAMEWORK_VERSION = 4.5 + +NO_INSTALL = yes diff --git a/mcs/class/Makefile b/mcs/class/Makefile index e65003aced9..842638493a3 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -1,6 +1,6 @@ thisdir = class -NO_FACADES_PROFILE := $(filter monodroid_tools binary_reference_assemblies xbuild_12 xbuild_14, $(PROFILE)) +NO_FACADES_PROFILE := $(filter monodroid_tools wasm_tools testing_aot_full testing_aot_hybrid binary_reference_assemblies xbuild_12 xbuild_14, $(PROFILE)) ifndef NO_FACADES_PROFILE FACADES_FOLDER := Facades @@ -152,6 +152,9 @@ wasm_dirs_parallel := \ $(mobile_common_dirs_parallel) \ System.Drawing +wasm_tools_dirs_parallel := \ + Mono.Cecil + orbis_dirs_parallel := \ $(filter-out Microsoft.CSharp Mono.Data.Sqlite,$(mobile_common_dirs_parallel)) \ System.Drawing @@ -399,12 +402,14 @@ unreal_PARALLEL_SUBDIRS := $(unreal_dirs_parallel) wasm_SUBDIRS := $(mobile_common_dirs) wasm_PARALLEL_SUBDIRS := $(wasm_dirs_parallel) +wasm_tools_SUBDIRS := +wasm_tools_PARALLEL_SUBDIRS := $(wasm_tools_dirs_parallel) include ../build/rules.make DIST_SUBDIRS = $(testing_aot_full_dirs_parallel) $(testing_aot_hybrid_dirs_parallel) $(monotouch_dirs_parallel) \ $(monodroid_dirs_parallel) $(monodroid_tools_dirs_parallel) $(xammac_dirs_parallel) $(net_4_x_dirs) $(net_4_x_parallel_dirs) \ -$(xammac_4_5_dirs_parallel) $(unreal_dirs_parallel) $(wasm_dirs_parallel) $(xbuild_14_SUBDIRS) \ +$(xammac_4_5_dirs_parallel) $(unreal_dirs_parallel) $(wasm_dirs_parallel) $(wasm_tools_dirs_parallel) $(xbuild_14_SUBDIRS) \ dlr aot-compiler reference-assemblies Facades # No new makefiles for: System.Messaging, System.Web.Mobile, diff --git a/mcs/class/Mono.Cecil/Mono.Cecil.csproj b/mcs/class/Mono.Cecil/Mono.Cecil.csproj index 9d386aebf0f..e28d3e6e05f 100644 --- a/mcs/class/Mono.Cecil/Mono.Cecil.csproj +++ b/mcs/class/Mono.Cecil/Mono.Cecil.csproj @@ -35,6 +35,11 @@ <IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monodroid_tools</IntermediateOutputPath>
<DefineConstants>NET_4_6;MONO;WIN_PLATFORM;NET_4_0</DefineConstants>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Platform)' == 'wasm_tools' ">
+ <OutputPath>./../../class/lib/wasm_tools</OutputPath>
+ <IntermediateOutputPath>./../../class/obj/$(AssemblyName)-wasm_tools</IntermediateOutputPath>
+ <DefineConstants>NET_4_6;MONO;NET_4_0</DefineConstants>
+ </PropertyGroup>
<!-- @ALL_PROFILE_PROPERTIES@ -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
@@ -209,6 +214,23 @@ <Private>False</Private>
</Reference>
</ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'wasm_tools' ">
+ <Reference Include="./../../../external/binary-reference-assemblies/v4.6/System.Core.dll">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>./../../../external/binary-reference-assemblies/v4.6/System.Core.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="./../../../external/binary-reference-assemblies/v4.6/System.dll">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>./../../../external/binary-reference-assemblies/v4.6/System.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="./../../../external/binary-reference-assemblies/v4.6/mscorlib.dll">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>./../../../external/binary-reference-assemblies/v4.6/mscorlib.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
diff --git a/mcs/tools/Makefile b/mcs/tools/Makefile index e9a22ab8496..a381a2f122f 100644 --- a/mcs/tools/Makefile +++ b/mcs/tools/Makefile @@ -58,6 +58,8 @@ monodroid_SUBDIRS = nunit-lite monotouch_SUBDIRS = nunit-lite net_4_x_SUBDIRS = net_4_x_PARALLEL_SUBDIRS = $(net_4_5_dirs) +wasm_tools_SUBDIRS = +wasm_tools_PARALLEL_SUBDIRS = linker DIST_SUBDIRS = $(net_4_5_dirs) cil-stringreplacer commoncryptogenerator resx2sr gensources diff --git a/mcs/tools/linker/monolinker.csproj b/mcs/tools/linker/monolinker.csproj index f1d6707ecb3..34717996dae 100644 --- a/mcs/tools/linker/monolinker.csproj +++ b/mcs/tools/linker/monolinker.csproj @@ -28,6 +28,11 @@ <IntermediateOutputPath>./../../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM</DefineConstants>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Platform)' == 'wasm_tools' ">
+ <OutputPath>./../../class/lib/wasm_tools</OutputPath>
+ <IntermediateOutputPath>./../../class/obj/$(AssemblyName)-wasm_tools</IntermediateOutputPath>
+ <DefineConstants>NET_4_6;MONO</DefineConstants>
+ </PropertyGroup>
<!-- @ALL_PROFILE_PROPERTIES@ -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
@@ -88,8 +93,7 @@ </ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
- <!-- @COMMON_PROJECT_REFERENCES@ -->
- <ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
+ <ItemGroup>
<ProjectReference Include="../../class/System/System.csproj" />
<ProjectReference Include="../../class/System.Core/System.Core.csproj" />
<ProjectReference Include="../../class/System.XML/System.Xml.csproj" />
diff --git a/runtime/Makefile.am b/runtime/Makefile.am index f81403165b8..7cb4a404ab0 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -77,10 +77,10 @@ build_profiles += unreal endif if INSTALL_WASM -build_profiles += wasm +build_profiles += wasm wasm_tools endif -test_profiles = $(filter-out binary_reference_assemblies monodroid_tools,$(build_profiles)) +test_profiles = $(filter-out binary_reference_assemblies monodroid_tools wasm_tools,$(build_profiles)) MAKE_FLAGS=$(if $(V),,--no-print-directory -s) diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk index 0d3794bd98d..4342f04429d 100644 --- a/sdks/builds/wasm.mk +++ b/sdks/builds/wasm.mk @@ -177,5 +177,5 @@ endef $(eval $(call WasmCrossMXETemplate,cross-win,i686,wasm32,wasm-runtime,llvm-llvmwin32,wasm32-unknown-unknown)) -$(eval $(call BclTemplate,wasm-bcl,wasm,wasm)) +$(eval $(call BclTemplate,wasm-bcl,wasm wasm_tools,wasm)) wasm_TARGETS += wasm-bcl diff --git a/sdks/wasm/Makefile b/sdks/wasm/Makefile index 8af28f8c4a3..54b51561dd1 100644 --- a/sdks/wasm/Makefile +++ b/sdks/wasm/Makefile @@ -19,8 +19,9 @@ EMCC=source $(TOP)/sdks/builds/toolchains/emsdk/emsdk_env.sh && emcc WASM_BCL_DIR=$(TOP)/sdks/out/wasm-bcl/wasm WASM_RUNTIME_DIR=$(TOP)/sdks/out/wasm-runtime-release MINI_PATH=$(TOP)/mono/mini -CSC= MONO_PATH=$(TOP)/mcs/class/lib/build $(TOP)/sdks/builds/bcl/runtime/mono-wrapper $(CSC_LOCATION) +CSC?= MONO_PATH=$(TOP)/mcs/class/lib/build $(TOP)/sdks/builds/bcl/runtime/mono-wrapper $(CSC_LOCATION) CSC_FLAGS := /debug:portable /noconfig /nostdlib /nologo /langversion:latest +API_REFS=$(TOP)/external/binary-reference-assemblies/v4.6 MINI_TEST_FILES= \ TestDriver.cs \ @@ -88,12 +89,6 @@ release/.stamp-build: driver.o library_mono.js binding_support.js dotnet_support $(EMCC) -Oz --llvm-opts 2 --llvm-lto 1 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s "BINARYEN_TRAP_MODE='clamp'" -s ALIASING_FUNCTION_POINTERS=0 --js-library library_mono.js --js-library binding_support.js --js-library dotnet_support.js driver.o $(MONO_LIBS) -o release/mono.js -s NO_EXIT_RUNTIME=1 -s "EXPORTED_FUNCTIONS=['_putchar']" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'FS_createPath', 'FS_createDataFile', 'cwrap', 'setValue', 'getValue', 'UTF8ToString']" touch $@ -$(WASM_BCL_DIR)/monolinker.exe: $(TOP)/mcs/class/lib/build/monolinker.exe - cp $< $@ - -$(WASM_BCL_DIR)/Mono.Cecil.dll: $(TOP)/mcs/class/lib/build/Mono.Cecil.dll - cp $< $@ - build-native: debug/.stamp-build release/.stamp-build do-runtime: @@ -126,13 +121,18 @@ sample.dll: Simple.Dependency.dll sample.cs WebAssembly.Bindings.dll WebAssembly OPTIONS_CS = $(TOP)/mcs/class/Mono.Options/Mono.Options/Options.cs -Mono.Cecil.dll: Makefile - nuget install -version 0.10.0 Mono.Cecil - cp Mono.Cecil.0.10.0/lib/net40/Mono.Cecil.dll $@ +$(WASM_BCL_DIR)/monolinker.exe: $(TOP)/mcs/class/lib/wasm_tools/monolinker.exe + cp $< $@ + +$(WASM_BCL_DIR)/Mono.Cecil.dll: Mono.Cecil.dll + cp $< $@ + +Mono.Cecil.dll: $(TOP)/mcs/class/lib/wasm_tools/Mono.Cecil.dll + cp $< $@ -# We use system csc as this is a desktop program +# Should use .csproj file and msbuild packager.exe: packager.cs Mono.Cecil.dll $(OPTIONS_CS) - csc /debug:portable /out:$@ /r:Mono.Cecil.dll packager.cs $(OPTIONS_CS) + $(CSC) $(CSC_FLAGS) /out:$@ /r:Mono.Cecil.dll packager.cs $(OPTIONS_CS) /r:$(API_REFS)/mscorlib.dll /r:$(API_REFS)/System.dll /r:$(API_REFS)/System.Core.dll .stamp-build-debug-sample: $(DRIVER_CONF)/.stamp-build packager.exe WebAssembly.Bindings.dll WebAssembly.Net.Http.dll sample.dll debug.html runtime.js mono packager.exe -debug -out=debug_sample sample.dll |