3 include ..
/..
/build
/rules.make
4 export __SECURITY_BOOTSTRAP_DB
=$(topdir
)/class
/corlib
7 LIBRARY_NAME
= mscorlib.dll
9 LIB_MCS_FLAGS
= $(REFERENCE_SOURCES_FLAGS
) $(RESOURCE_FILES
:%=-resource
:%)
11 USE_XTEST_REMOTE_EXECUTOR
= YES
12 LIBRARY_WARN_AS_ERROR
= yes
13 #LIBRARY_USE_INTERMEDIATE_FILE = yes
15 ifeq (2, $(FRAMEWORK_VERSION_MAJOR
))
16 LIB_MCS_FLAGS
+= -runtimemetadataversion
:v4.0
.30319
18 ifeq (4, $(FRAMEWORK_VERSION_MAJOR
))
19 LIB_MCS_FLAGS
+= -runtimemetadataversion
:v4.0
.30319
21 $(error Unknown framework version
)
25 ifeq ($(PROFILE
),build
)
26 CSC_RUNTIME_FLAGS
=--profile
=aot
:output
=$(topdir
)/class
/lib
/$(PROFILE_DIRECTORY
)/csc.
$(LIBRARY
).aotprofile
29 RESX_EXTRA_ARGUMENTS
= \
30 --in
=ReferenceSources
/SR.cs \
31 --in
=ReferenceSources
/SR2.cs \
32 --in
=corefx
/SR.missing.cs
34 RESX_RESOURCE_STRING
= \
35 ..
/..
/..
/external
/corefx
/src
/System.Collections
/src
/Resources
/Strings.resx \
36 ..
/..
/..
/external
/corefx
/src
/System.Collections.Concurrent
/src
/Resources
/Strings.resx \
37 ..
/..
/..
/external
/corefx
/src
/System.Collections.NonGeneric
/src
/Resources
/Strings.resx \
38 ..
/..
/..
/external
/corefx
/src
/System.ComponentModel.TypeConverter
/src
/Resources
/Strings.resx \
39 ..
/..
/..
/external
/corefx
/src
/System.Buffers
/src
/Resources
/Strings.resx \
40 ..
/..
/..
/external
/corefx
/src
/System.IO.FileSystem.Watcher
/src
/Resources
/Strings.resx \
41 ..
/..
/..
/external
/corefx
/src
/System.IO.Ports
/src
/Resources
/Strings.resx \
42 ..
/..
/..
/external
/corefx
/src
/System.Memory
/src
/Resources
/Strings.resx \
43 ..
/..
/..
/external
/corefx
/src
/System.Net.HttpListener
/src
/Resources
/Strings.resx \
44 ..
/..
/..
/external
/corefx
/src
/System.Net.Requests
/src
/Resources
/Strings.resx \
45 ..
/..
/..
/external
/corefx
/src
/System.Net.Http
/src
/Resources
/Strings.resx \
46 ..
/..
/..
/external
/corefx
/src
/System.Numerics.Vectors
/src
/Resources
/Strings.resx \
47 ..
/..
/..
/external
/corefx
/src
/System.Reflection.TypeExtensions
/src
/Resources
/Strings.resx \
48 ..
/..
/..
/external
/corefx
/src
/System.Runtime.Extensions
/src
/Resources
/Strings.resx \
49 ..
/..
/..
/external
/corefx
/src
/System.Runtime.InteropServices.RuntimeInformation
/src
/Resources
/Strings.resx \
50 ..
/..
/..
/external
/corefx
/src
/System.Runtime.Numerics
/src
/Resources
/Strings.resx \
51 ..
/..
/..
/external
/corefx
/src
/System.Security.Cryptography.Encoding
/src
/Resources
/Strings.resx \
52 ..
/..
/..
/external
/corefx
/src
/System.Security.Cryptography.Pkcs
/src
/Resources
/Strings.resx \
53 ..
/..
/..
/external
/corefx
/src
/System.Security.Cryptography.Primitives
/src
/Resources
/Strings.resx \
54 ..
/..
/..
/external
/corefx
/src
/System.Security.Cryptography.ProtectedData
/src
/Resources
/Strings.resx \
55 ..
/..
/..
/external
/corefx
/src
/System.Security.Cryptography.Xml
/src
/Resources
/Strings.resx \
56 ..
/..
/..
/external
/corefx
/src
/System.Security.Cryptography.X509Certificates
/src
/Resources
/Strings.resx \
57 ..
/..
/..
/external
/corefx
/src
/System.Text.RegularExpressions
/src
/Resources
/Strings.resx \
58 ..
/..
/..
/external
/corefx
/src
/System.Threading.Tasks.Parallel
/src
/Resources
/Strings.resx \
59 ..
/..
/..
/external
/corefx
/src
/System.ObjectModel
/src
/Resources
/Strings.resx \
60 ..
/..
/..
/external
/corert
/src
/System.Private.CoreLib
/src
/Resources
/Strings.resx \
61 ..
/..
/..
/external
/corefx
/src
/System.Private.Uri
/src
/Resources
/Strings.resx \
62 ..
/..
/..
/external
/corefx
/src
/Microsoft.Win32.Registry
/src
/Resources
/Strings.resx \
63 ..
/..
/..
/external
/corefx
/src
/System.Security.Cryptography.Algorithms
/src
/Resources
/Strings.resx
65 LIBRARY_COMPILE
= $(BOOT_COMPILE
)
66 LIBRARY_INSTALL_DIR
= $(mono_libdir
)/mono
/$(FRAMEWORK_VERSION
)
70 RESOURCE_STRINGS_FILES
= --mscorlib-debug
72 RESOURCE_STRINGS
= ..
/referencesource
/mscorlib
/mscorlib.txt
73 MODULE_DEPS
= $(IL_REPLACE
) LinkerDescriptor
/mscorlib.xml
76 resources
/charinfo.nlp \
77 resources
/collation.core.bin \
78 resources
/collation.tailoring.bin \
79 resources
/collation.cjkCHS.bin \
80 resources
/collation.cjkCHT.bin \
81 resources
/collation.cjkJA.bin \
82 resources
/collation.cjkKO.bin \
83 resources
/collation.cjkKOlv2.bin \
84 LinkerDescriptor
/mscorlib.xml
86 REFERENCE_SOURCES_FLAGS
= -d
:FEATURE_PAL
,GENERICS_WORK
,FEATURE_LIST_PREDICATES
,FEATURE_SERIALIZATION
,FEATURE_ENCODINGNLS
,FEATURE_ASCII
,FEATURE_LATIN1
,FEATURE_UTF7
,FEATURE_UTF32
,MONO_HYBRID_ENCODING_SUPPORT
,FEATURE_ASYNC_IO
,NEW_EXPERIMENTAL_ASYNC_IO
,FEATURE_UTF32
,FEATURE_EXCEPTIONDISPATCHINFO
,FEATURE_CORRUPTING_EXCEPTIONS
,FEATURE_EXCEPTION_NOTIFICATIONS
,FEATURE_STRONGNAME_MIGRATION
,FEATURE_USE_LCID
,FEATURE_FUSION
,FEATURE_CRYPTO
,FEATURE_X509_SECURESTRINGS
,FEATURE_SYNCHRONIZATIONCONTEXT
,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
,FEATURE_DEFAULT_INTERFACES
,HAS_CORLIB_CONTRACTS
89 PROFILE_TEST_HARNESS_EXCLUDES
:= $(PROFILE_TEST_HARNESS_EXCLUDES
)SRE
,
91 LIB_MCS_FLAGS
+= -d
:MONO_FEATURE_SRE
95 REFERENCE_SOURCES_FLAGS
+= -d
:FEATURE_MACL
98 ifndef AOT_FRIENDLY_PROFILE
99 REFERENCE_SOURCES_FLAGS
+= -d
:FEATURE_REMOTING
,MONO_COM
,FEATURE_COMINTEROP
,FEATURE_ROLE_BASED_SECURITY
102 ifndef NO_THREAD_ABORT
103 REFERENCE_SOURCES_FLAGS
+= -d
:MONO_FEATURE_THREAD_ABORT
104 TEST_MCS_FLAGS
+= -d
:MONO_FEATURE_THREAD_ABORT
107 ifndef NO_THREAD_SUSPEND_RESUME
108 REFERENCE_SOURCES_FLAGS
+= -d
:MONO_FEATURE_THREAD_SUSPEND_RESUME
109 TEST_MCS_FLAGS
+= -d
:MONO_FEATURE_THREAD_SUSPEND_RESUME
112 ifndef NO_MULTIPLE_APPDOMAINS
113 REFERENCE_SOURCES_FLAGS
+= -d
:MONO_FEATURE_MULTIPLE_APPDOMAINS
114 TEST_MCS_FLAGS
+= -d
:MONO_FEATURE_MULTIPLE_APPDOMAINS
118 LIB_MCS_FLAGS
+= -d
:MONO_FEATURE_CONSOLE
121 ifdef MONO_FEATURE_APPLETLS
122 LIB_MCS_FLAGS
+= -d
:MONO_FEATURE_APPLETLS
126 LIB_MCS_FLAGS
+= -d
:ONLY_APPLETLS
129 ifdef MONO_FEATURE_APPLE_X509
130 LIB_MCS_FLAGS
+= -d
:MONO_FEATURE_APPLE_X509
133 COREFX_FLAGS
:= -d
:BIT64
,REGISTRY_ASSEMBLY
135 WARNING_ABOUT_DISABLED_WARNING
=1635
136 LOCAL_MCS_FLAGS
= -unsafe
-nostdlib
-nowarn
:612,618,3001,3002,3003,$(WARNING_ABOUT_DISABLED_WARNING
) -d
:INSIDE_CORLIB
,MONO_CULTURE_DATA
-d
:LIBC
$(REFERENCE_SOURCES_FLAGS
) $(COREFX_FLAGS
)
139 TEST_LIB_REFS
= System.Core System
141 XTEST_LIB_REFS
= System System.Core Facades
/System.Threading.Tasks Facades
/System.Text.RegularExpressions System.Numerics System.Runtime.CompilerServices.Unsafe
142 XTEST_LIB_FLAGS
= -d
:netcoreapp
-publicsign
-keyfile
:..
/mono.snk
143 XTEST_MCS_FLAGS
= -resource
:..
/..
/..
/external
/corefx
/src
/System.Reflection
/tests
/Resources
/ResourceTextFile.txt
,ResourceTextFile.txt
145 ifndef AOT_FRIENDLY_PROFILE
146 ifneq ($(PROFILE
),testing_aot_hybrid
)
147 ifneq ($(PROFILE
),testing_aot_full_interp
)
148 TEST_LIB_REFS
+= Mono.Posix
153 # System.IO/DirectoryInfoTest.cs needs Mono.Posix
154 TEST_MCS_FLAGS
+= -debug
-nowarn
:168,219,618,672 -unsafe \
155 -define:MONO_DATACONVERTER_STATIC_METHODS
$(TEST_RESX_RESOURCES
:%=-resource
:%) -resource
:LinkerDescriptor
/mscorlib_test.xml
,$(test_lib
:.dll
=.xml
)
157 ifeq ($(PROFILE
),net_4_x
)
158 LIB_MCS_FLAGS
+= -d
:FEATURE_CRYPTO_CONFIGURABLE
159 TEST_MCS_FLAGS
+= -d
:FEATURE_CRYPTO_CONFIGURABLE
163 CC_PROFILE
:= $(filter monotouch
% xammac
, $(PROFILE
))
167 CommonCrypto
/MD5CryptoServiceProvider.g.cs \
168 CommonCrypto
/SHA256Managed.g.cs \
169 CommonCrypto
/RC2CryptoServiceProvider.g.cs \
170 CommonCrypto
/SHA384Managed.g.cs \
171 CommonCrypto
/DESCryptoServiceProvider.g.cs \
172 CommonCrypto
/SHA1CryptoServiceProvider.g.cs \
173 CommonCrypto
/SHA512Managed.g.cs \
174 CommonCrypto
/MD2Managed.g.cs \
175 CommonCrypto
/SHA1Managed.g.cs \
176 CommonCrypto
/TripleDESCryptoServiceProvider.g.cs \
177 CommonCrypto
/MD4Managed.g.cs
180 $(MAKE
) -C CommonCrypto
185 Test
/resources
/culture-
*.cs \
187 $(TEST_RESOURCE_FILES
) \
188 $(TEST_RESOURCES
:.resources
=.resx
) \
189 LinkerDescriptor
/mscorlib_test.xml
191 TEST_RESOURCE_FILES
= \
192 Test
/resources
/MyResources.resources \
193 Test
/resources
/MyResources.de.resources \
194 Test
/resources
/Empty.resources \
195 Test
/resources
/AFile.txt \
196 Test
/resources
/StreamTest.resources \
197 Test
/resources
/StreamTest.ja.resources \
198 Test
/resources
/bug81759.resources \
199 Test
/resources
/415628.bin \
200 Test
/resources
/Fergie.GED
202 TEST_MCS_FLAGS
+= $(foreach r
, $(TEST_RESOURCE_FILES
), -resource
:$(r
),$(r
))
204 TEST_RESX_RESOURCES
= \
205 Test
/resources
/Resources.resources
207 TEST_RESX_RESOURCES_SATELITE
= \
208 Test
/resources
/Resources.es-ES.resources \
209 Test
/resources
/Resources.nn-NO.resources
211 CLEAN_FILES
+= $(TEST_RESX_RESOURCES
) $(TEST_RESX_RESOURCES_SATELITE
) $(IL_REPLACE
)
213 include $(topdir
)/build
/library.make
215 $(TEST_RESX_RESOURCES
) $(TEST_RESX_RESOURCES_SATELITE
): %.resources
: %.resx
216 $(RESGEN
) $< || cp
$@.prebuilt
$@
218 TEST_RESOURCES
= $(TEST_RESX_RESOURCES
) $(TEST_RESX_RESOURCES_SATELITE
)
220 satellite_assembly1
= $(test_lib_dir
)/es-ES
/$(patsubst %.dll
,%.resources.dll
,$(test_lib
))
221 satellite_assembly2
= $(test_lib_dir
)/nn-NO
/$(patsubst %.dll
,%.resources.dll
,$(test_lib
))
223 $(test_lib_output
): $(TEST_RESOURCES
) $(satellite_assembly1
) $(satellite_assembly2
) $(test_lib_dir
)
225 mscorlib_for_profile
= $(topdir
)/class
/lib
/$(PROFILE
)/mscorlib.dll
227 $(satellite_assembly1
): Test
/resources
/culture-es-ES.cs Test
/resources
/Resources.es-ES.resources
229 $(CSCOMPILE
) -target
:library
-r
:$(mscorlib_for_profile
) Test
/resources
/culture-es-ES.cs
-resource
:Test
/resources
/Resources.es-ES.resources
-out
:$@
231 $(satellite_assembly2
): Test
/resources
/culture-nn-NO.cs Test
/resources
/Resources.nn-NO.resources
233 $(CSCOMPILE
) -target
:library
-r
:$(mscorlib_for_profile
) Test
/resources
/culture-nn-NO.cs
-resource
:Test
/resources
/Resources.nn-NO.resources
-out
:$@
235 test_load_assembly
= ${test_lib_dir}/TestLoadAssembly.dll
237 $(test_load_assembly
): ..
/..
/..
/external
/corefx
/src
/System.Runtime
/tests
/TestLoadAssembly
/TestLoadAssembly.cs |
$(test_lib_dir
)
238 $(CSCOMPILE
) -target
:library
-r
:$(mscorlib_for_profile
) -out
:${test_lib_dir}/TestLoadAssembly.dll
240 test_module
= $(test_lib_dir
)/System.Reflection.TestModule.dll
242 $(test_module
): ..
/..
/..
/external
/corefx
/src
/System.Runtime
/tests
/TestModule
/System.Reflection.TestModule.dll |
$(test_lib_dir
)
243 cp
$< $(test_lib_dir
)
245 XTEST_LIB_FLAGS
+= -r
:$(test_module
)
247 $(xtest_lib_output
): $(test_load_assembly
) $(test_module
) $(test_lib_dir
)
249 vtsdir_src
= Test
/System.Runtime.Serialization.Formatters.Binary
/VersionTolerantSerialization
250 vtsdir
= $(test_lib_dir
)/vts
252 $(vtsdir
)/1.0/Address.dll \
253 $(vtsdir
)/2.0/Address.dll \
254 $(vtsdir
)/3.0/Address.dll \
255 $(vtsdir
)/4.0/Address.dll \
256 $(vtsdir
)/5.0/Address.dll \
257 $(vtsdir
)/6.0/Address.dll
259 test-vts
: $(vtslibs
) $(test_lib_dir
)/BinarySerializationOverVersionsTest.dll
261 $(vtsdir
)/%/Address.dll
: $(vtsdir_src
)/VersionTolerantSerializationTestLib
/%/Address.cs
263 $(CSCOMPILE
) -target
:library
-warn
:0 -r
:$(mscorlib_for_profile
) -out
:$@
$^
265 $(test_lib_dir
)/BinarySerializationOverVersionsTest.dll
: $(vtsdir_src
)/BinarySerializationOverVersionsTest.cs
$(vtsdir
)/1.0/Address.dll
$(test_nunit_dep
)
267 $(CSCOMPILE
) $(test_nunit_ref
) -warn
:0 \
268 -r
:$(vtsdir
)/1.0/Address.dll \
269 -r
:$(mscorlib_for_profile
) \
270 -r
:$(topdir
)/class
/lib
/$(PROFILE
)/System.dll \
272 $(vtsdir_src
)/BinarySerializationOverVersionsTest.cs
-out
:$@
273 cp
-f
$(topdir
)/tools
/nunit-lite
/nunit-lite-console
/nunit-lite-console.exe.config.tmpl
$(test_lib_dir
)/BinarySerializationOverVersionsTest.dll.nunitlite.config
275 run-test-vts
: test-vts
276 @echo Running vts tests...
277 PATH
="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME
) $(TEST_RUNTIME_FLAGS
) $(TEST_HARNESS
) $(NOSHADOW_FLAG
) \
278 $(test_lib_dir
)/BinarySerializationOverVersionsTest.dll
286 run-test
: run-test-vts
293 $(vtsdir_src
)/VersionTolerantSerializationTestLib
/1.0/Address.cs \
294 $(vtsdir_src
)/VersionTolerantSerializationTestLib
/2.0/Address.cs \
295 $(vtsdir_src
)/VersionTolerantSerializationTestLib
/3.0/Address.cs \
296 $(vtsdir_src
)/VersionTolerantSerializationTestLib
/4.0/Address.cs \
297 $(vtsdir_src
)/VersionTolerantSerializationTestLib
/5.0/Address.cs \
298 $(vtsdir_src
)/VersionTolerantSerializationTestLib
/6.0/Address.cs \
299 $(vtsdir_src
)/BinarySerializationOverVersionsTest.cs \
300 System.Runtime.CompilerServices
/Unsafe.il \
305 # Android TimeZoneInfo testing....
311 # Remove some code that is protected so we don't have to include all the corlib files.
312 tzi.exe
:System
/AndroidPlatform.cs
$(wildcard System
/TimeZone
*.cs
) ..
/..
/build
/common
/Consts.cs ..
/..
/build
/common
/Locale.cs ..
/Mono.Options
/Mono.Options
/Options.cs
313 trap
"rm -f $(TMP_FILE1) $(TMP_FILE2)" EXIT INT QUIT TERM
&& \
314 sed
's/Environment\.GetResourceString/string.Format/g' ..
/referencesource
/mscorlib
/system
/timezoneinfo.cs
> $(TMP_FILE1
) && \
315 sed
's/StringBuilder\.DefaultCapacity/100/g' ..
/referencesource
/mscorlib
/system
/text
/stringbuildercache.cs
> $(TMP_FILE2
) && \
316 $(MCS
) /debug
+ /out
:$@
-unsafe
-nowarn
:612,618 -d
:INSIDE_CORLIB
,MONO_CULTURE_DATA
-d
:LIBC
$(REFERENCE_SOURCES_FLAGS
) "/d:SELF_TEST;NET_1_1;NET_2_0;MOBILE;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;MONODROID;ANDROID" $^
$(TMP_FILE1
) $(TMP_FILE2
)
319 mkdir
-p android
/tzdb
/usr
/share
/zoneinfo
320 mkdir
-p android
/tzdb
/misc
/zoneinfo
/zoneinfo
321 android_root
=`adb shell echo '$$ANDROID_ROOT' | tr -d "\r"` ; \
322 android_data
=`adb shell echo '$$ANDROID_DATA' | tr -d "\r"` ; \
323 adb
$(ADB_TARGET
) pull
$$android_root/usr
/share
/zoneinfo android
/tzdb
/usr
/share
/zoneinfo || true
; \
324 adb
$(ADB_TARGET
) pull
$$android_data/misc
/zoneinfo
/tzdata android
/tzdb
/misc
/zoneinfo || true
326 android-dump-tzdata
: tzi.exe android-pull-tzdb
328 __XA_OVERRIDE_TIMEZONE_ID__
=America
/New_York ANDROID_ROOT
="`pwd`/android/tzdb" ANDROID_DATA
="`pwd`/android/tzdb" $(TEST_RUNTIME
) tzi.exe
-o android
/tzdata