[build] Use multiple inputs in profiled aot
authorMarek Safar <marek.safar@gmail.com>
Sat, 28 Jan 2017 00:16:53 +0000 (19:16 -0500)
committerMarek Safar <marek.safar@gmail.com>
Sat, 28 Jan 2017 09:49:28 +0000 (04:49 -0500)
mcs/class/System.Core/Makefile
mcs/class/aot-compiler/Makefile
mcs/class/corlib/Makefile

index dfdcb880cc0773f3446d0b10368b53b75967f208..ac79cff1623b5bbdfb8b26248207ad598f7a864f 100644 (file)
@@ -4,6 +4,10 @@ include ../../build/rules.make
 
 LIBRARY = System.Core.dll
 
+ifeq ($(PROFILE),build)
+CSC_RUNTIME_FLAGS=--profile=aot:output=$(topdir)/class/lib/$(PROFILE)/csc.$(LIBRARY).aotprofile
+endif
+
 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,PFX_LEGACY_3_5,FEATURE_NETCORE
 LIB_REFS = System
 LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) -d:INSIDE_SYSCORE -d:LIBC -unsafe -nowarn:436
index c979293b9fb124640a562205dee915970ddbd0b3..b6eb42611029951347bc3ae3d834b5ea842f4473 100644 (file)
@@ -40,9 +40,12 @@ LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 
 ifndef SKIP_AOT
 
-profile_file=$(wildcard $(topdir)/class/lib/build/csc.aotprofile)
+profile_file:=$(wildcard $(topdir)/class/lib/build/csc.*.aotprofile)
 ifneq ($(profile_file),)
-profile_arg=,profile=$(profile_file)
+comma:=,
+space:=
+space+=
+profile_arg:=$(subst $(space)$(comma),$(comma),$(foreach pf,$(profile_file),$(comma)profile=$(strip $(pf))))
 endif
 
 ifdef PLATFORM_AOT_SUFFIX
@@ -55,11 +58,9 @@ $(csc_aot_image): $(csc_exe) $(mscorlib_dll) $(runtime_dep)
 $(mscorlib_aot_image): $(mscorlib_dll) $(runtime_dep)
        $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg) --debug $(mscorlib_dll) || (cat $(PROFILE)_aot.log; exit 1)
 
-# Disabled as it hits AOT too big limit
 $(csc_MC_image): $(csc_MC_dll) $(runtime_dep)
        $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_MC_image) --debug $(csc_MC_dll) || (cat $(PROFILE)_aot.log; exit 1)
 
-# Disabled as it hits AOT too big limit
 $(csc_MCS_image): $(csc_MCS_dll) $(runtime_dep)
        $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_MCS_image) --debug $(csc_MCS_dll) || (cat $(PROFILE)_aot.log; exit 1)
 
index d31076229d80205f315b34870c28483a8ce30b04..965d85ddee25896086b8259c498b5cfecab9abf4 100644 (file)
@@ -21,7 +21,7 @@ endif
 endif
 
 ifeq ($(PROFILE),build)
-CSC_RUNTIME_FLAGS=--profile=aot:output=$(topdir)/class/lib/build/csc.aotprofile
+CSC_RUNTIME_FLAGS=--profile=aot:output=$(topdir)/class/lib/$(PROFILE)/csc.$(LIBRARY).aotprofile
 endif
 
 RESOURCE_STRINGS = ../referencesource/mscorlib/mscorlib.txt