2
0
Эх сурвалжийг харах

Bootstraps netcore build (#12120)

This does not build but puts placeholders for syncing in place
Marek Safar 7 жил өмнө
parent
commit
729bd4e45d

+ 9 - 0
configure.ac

@@ -754,6 +754,13 @@ AC_ARG_WITH(mcs-path, [  --with-mcs-path=/path/to/mcs      Specify an alternate
 
 AC_ARG_WITH(jumptables, [  --with-jumptables=yes,no      enable/disable support for jumptables (ARM-only for now) (defaults to no)],[],[with_jumptables=no])
 
+AC_ARG_WITH(core,       [  --with-core=yes,no,only       controls whether to build Mono as a .NET Core runtime, not build it, or just build core (defaults to no)],[],[with_core=no])
+if test x$with_core = xyes; then
+    AC_DEFINE(ENABLE_NETCORE,1,[Enables the support for .NET Core Features in the MonoVM])
+fi
+AM_CONDITIONAL(ENABLE_CORE, test x$with_core = xyes)
+AM_CONDITIONAL(ONLY_CORE, test x$with_core = xonly)
+
 #
 # A sanity check to catch cases where the package was unpacked
 # with an ancient tar program (Solaris)
@@ -1405,6 +1412,7 @@ AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"])
 AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"])
 AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"])
 AM_CONDITIONAL(INSTALL_WASM, [test "x$with_wasm" != "xno"])
+AM_CONDITIONAL(INSTALL_NETCORE, [test "x$with_core" != "xno"])
 AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"] || [test "x$TEST_PROFILE" = "xwasm"])
 AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"])
 AM_CONDITIONAL(AOT_FULL_INTERP_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full_interp"])
@@ -6308,6 +6316,7 @@ echo "
 	BTLS:            $enable_btls$btls_platform_string
 	jemalloc:        $with_jemalloc (always use: $with_jemalloc_always)
 	crash reporting: $crash_reporting (private crashes: $with_crash_privacy)
+	.NET Core:       $with_core
 	$disabled
 "
 if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then

+ 2 - 0
mcs/Makefile

@@ -28,6 +28,7 @@ orbis_SUBDIRS := build class
 unreal_SUBDIRS := build class
 wasm_SUBDIRS := build class
 wasm_tools_SUBDIRS := build class tools
+netcore_SUBDIRS := build class
 
 include build/rules.make
 
@@ -88,6 +89,7 @@ $(_boot_:%=profile-do--orbis--%):              profile-do--orbis--%:
 $(_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--%
+$(_boot_:%=profile-do--netcore--%):         profile-do--netcore--%:         profile-do--build--%
 
 compiler-test:
 	$(MAKE) -C tests test

+ 16 - 0
mcs/build/profiles/netcore.make

@@ -0,0 +1,16 @@
+# -*- makefile -*-
+
+BOOTSTRAP_PROFILE = build
+
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
+MCS = $(BOOTSTRAP_MCS)
+
+PLATFORMS = macos linux win32 unix
+
+profile-check:
+	@:
+
+DEFAULT_REFERENCES =
+PROFILE_MCS_FLAGS = -d:NETCORE -nostdlib $(PLATFORM_DEBUG_FLAGS)
+
+ENFORCE_LIBRARY_WARN_AS_ERROR = yes

+ 5 - 2
mcs/class/Makefile

@@ -1,6 +1,6 @@
 thisdir = class
 
-NO_FACADES_PROFILE := $(filter monodroid_tools monotouch_tools wasm_tools testing_aot_hybrid binary_reference_assemblies xbuild_12 xbuild_14, $(PROFILE))
+NO_FACADES_PROFILE := $(filter monodroid_tools monotouch_tools wasm_tools testing_aot_hybrid binary_reference_assemblies xbuild_12 xbuild_14 netcore, $(PROFILE))
 
 ifndef NO_FACADES_PROFILE
 FACADES_FOLDER := Facades
@@ -421,12 +421,15 @@ wasm_PARALLEL_SUBDIRS := $(wasm_dirs_parallel)
 wasm_tools_SUBDIRS :=
 wasm_tools_PARALLEL_SUBDIRS := $(wasm_tools_dirs_parallel)
 
+netcore_SUBDIRS := System.Private.CoreLib
+netcore_PARALLEL_SUBDIRS :=
+
 include ../build/rules.make
 
 DIST_SUBDIRS = $(testing_aot_full_dirs_parallel) $(testing_aot_hybrid_dirs_parallel) $(monotouch_dirs_parallel) $(monotouch_tools_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) $(wasm_tools_dirs_parallel) $(xbuild_14_SUBDIRS) \
-$(testing_aot_full_interp_dirs_parallel) dlr aot-compiler reference-assemblies Facades
+$(testing_aot_full_interp_dirs_parallel) $(netcore_SUBDIRS) dlr aot-compiler reference-assemblies Facades
 
 # No new makefiles for: System.Messaging, System.Web.Mobile,
 # System.ServiceProcess

+ 3 - 0
mcs/class/System.Private.CoreLib/AssemblyInfo.cs

@@ -0,0 +1,3 @@
+//
+// System.Private.CoreLib Assembly
+//

+ 12 - 0
mcs/class/System.Private.CoreLib/Makefile

@@ -0,0 +1,12 @@
+thisdir = class/System.Private.CoreLib
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Private.CoreLib.dll
+LIB_REFS =
+EXTRA_DIST_FILES =
+
+LIB_MCS_FLAGS =
+DEFAULT_REFERENCES = 
+
+include ../../build/library.make

+ 2 - 0
mcs/class/System.Private.CoreLib/System.Private.CoreLib.dll.sources

@@ -0,0 +1,2 @@
+AssemblyInfo.cs
+../corlib/System/Object.cs

+ 0 - 0
netcore/System.Private.CoreLib/shared/placeholder-for-sync-setup


+ 4 - 0
runtime/Makefile.am

@@ -84,6 +84,10 @@ if INSTALL_WASM
 build_profiles += wasm wasm_tools
 endif
 
+if INSTALL_NETCORE
+build_profiles += netcore
+endif
+
 test_profiles = $(filter-out binary_reference_assemblies monodroid_tools wasm_tools,$(build_profiles))
 
 MAKE_FLAGS=$(if $(V),,--no-print-directory -s)