Some architectures including ARM assumes that plain char is
unsigned unlike x64.
Because CoreCLR has been assuming char is signed, we need to
explictly tell the toolchain the signedness of char type.
Fix #4746
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
# may not generate the same object layout as MSVC.
add_compile_options(-Wno-incompatible-ms-struct)
+ # Some architectures (e.g., ARM) assume char type is unsigned while CoreCLR assumes char is signed
+ # as x64 does. It has been causing issues in ARM (https://github.com/dotnet/coreclr/issues/4746)
+ add_compile_options(-fsigned-char)
+
endif(CLR_CMAKE_PLATFORM_UNIX)
if(CLR_CMAKE_PLATFORM_UNIX_ARM)