Xamarin Public Jenkins (auto-signing) 8fc30896db Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
2018-04-24 09:31:23 +00:00

50 lines
1.4 KiB
Makefile

thisdir = tools/linker
SUBDIRS =
include ../../build/rules.make
PROGRAM = monolinker.exe
LIB_REFS = System System.Core System.Xml Mono.Cecil
TEST_CASES := \
mscorlib/test-array.cs \
mscorlib/test-remoting.cs \
System/test-security.cs
ifndef AOT_FRIENDLY_PROFILE
TEST_CASES += \
mscorlib/test-reflection.cs
endif
TESTS_COMPILER = $(MCS) -nologo -noconfig -debug:portable -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
check: compile-tests
$(MAKE) run-tests
compile-tests: $(TEST_CASES)
mscorlib/test-%.cs:
$(TESTS_COMPILER) Tests/$@ /out:Tests/$(@:.cs=.exe)
System/test-%.cs:
$(TESTS_COMPILER) -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/System.dll Tests/$@ /out:Tests/$(@:.cs=.exe)
run-tests: $(TEST_CASES:.cs=.exe)
LINKER_OUTPUT := illink-output-$(PROFILE_DIRECTORY)
PROFILE_PATH = $(topdir)/class/lib/$(PROFILE_DIRECTORY)
LINKER = MONO_PATH=$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/monolinker.exe -c link -out $(LINKER_OUTPUT) -b true -d $(PROFILE_PATH)
TEST_EXEC = MONO_PATH=$(LINKER_OUTPUT) $(RUNTIME) $(RUNTIME_FLAGS) --debug -O=-aot
.NOTPARALLEL:
System/test-%.exe mscorlib/test-%.exe:
@rm -rf $(LINKER_OUTPUT)
@mkdir $(LINKER_OUTPUT)
@echo Testing $@
$(LINKER) -a Tests/$@
$(TEST_EXEC) $(LINKER_OUTPUT)/$(@F)
@rm -rf $(LINKER_OUTPUT)
include ../../build/executable.make