Skip to content

Commit

Permalink
[mobile_static] Skip verifying ilasm.exe on mobile_static
Browse files Browse the repository at this point in the history
ILASM.exe has features which a mobile_static runtime will not support.
It is invoked with an external mono when used in the runtime.
We skip it here because otherwise it will fail to verify.
  • Loading branch information
alexanderkyte committed Jul 18, 2016
1 parent c446567 commit 695e8f5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion runtime/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,20 @@ cur_dir_cmd = pwd
PLATFORM_PATH_SEPARATOR = :
endif

if INSTALL_MOBILE_STATIC
# ILASM.exe has features which a mobile_static runtime will not support.
# It is invoked with an external mono when used in the runtime.
# We skip it here because otherwise it will fail to verify.
MOBILE_STATIC_FILTER=grep -v ilasm
else
MOBILE_STATIC_FILTER=echo
endif

# Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
# TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
# Skip binary_reference_assemblies because they contain metadata only
mcs-compileall: mono-wrapper etc/mono/config
export verifiable_files=`ls "$(mcs_topdir)/class/lib/$$profile/" | grep -E '\.(dll|exe)$$' | $(MOBILE_STATIC_FILTER)` ; \
save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
for profile in $(test_profiles); do \
if [ "binary_reference_assemblies" = "$$profile" ]; then \
Expand All @@ -126,7 +136,9 @@ mcs-compileall: mono-wrapper etc/mono/config
MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
fi; \
export MONO_PATH; \
for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
for stub in $$verifiable_files; do \
i=$(mcs_topdir)/class/lib/$$profile/$$stub ; \
echo $$i ; \
if [ ! -f $$i ] ; then \
continue ; \
fi ; \
Expand Down

0 comments on commit 695e8f5

Please sign in to comment.