Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mono] Linking statically ICU shim on mono #35790

Merged
merged 52 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c996d5e
Implementation the linking of shim globalization into mono runtime.
thaystg Apr 15, 2020
fc6ec08
Adding ICU_CFLAGS to configure.ac
thaystg Apr 15, 2020
da6f766
Implementing globalization shim linked on mono runtime on windows.
thaystg Apr 17, 2020
6f0bb5c
Implementing ICU shim on mono on windows.
thaystg Apr 25, 2020
806ab54
Adding files that I forgot.
thaystg Apr 25, 2020
d1cd362
Merge remote-tracking branch 'origin/master' into thays_shim_globaliz…
thaystg Apr 25, 2020
63b31b3
using dllimport as suggested by Aleksey
thaystg Apr 27, 2020
9dbce14
Fixing lastindexof
thaystg Apr 27, 2020
e582815
Using dllimport
thaystg Apr 27, 2020
a17b189
Removing unrelated changes
thaystg Apr 27, 2020
b570c23
removing unused include
thaystg Apr 27, 2020
2571f55
Adding end of line in pal_compiler.h
thaystg Apr 27, 2020
efa2cb5
Trying to build on Linux
thaystg Apr 29, 2020
2459b39
Removing to do on windows
thaystg Apr 29, 2020
c233c3f
Enabling only for NETCORE
thaystg Apr 29, 2020
2d41932
removing usage of top_src_dir
thaystg Apr 29, 2020
13bd64d
Try to search on "dlopen(null" and if doesn't find try to search on l…
thaystg Apr 30, 2020
5626e11
Fix MacOs.
thaystg Apr 30, 2020
5b6820a
Compiling only when netcore for windows, and remove warning of label …
thaystg Apr 30, 2020
55f7fc9
Compilation on windows
thaystg May 4, 2020
78886b3
Fix compilation on windows
thaystg May 4, 2020
1e66f98
Fixing what CoffeeFlux suggested.
thaystg May 4, 2020
b07315c
Fix MacOs.
thaystg May 4, 2020
a9ed865
Fix windows compilation
thaystg May 4, 2020
3d5d97b
Trying to fix android compilation.
thaystg May 4, 2020
31200b3
Unchanging permissions of this file.
thaystg May 5, 2020
2d25950
Removing hardcoded include path.
thaystg May 5, 2020
fbd44f2
Fixing what was suggested by @safern
thaystg May 5, 2020
d641726
Merge branch 'thays_shim_globalization_mono' of github.com:thaystg/ru…
thaystg May 5, 2020
2657cb6
Changing what was suggested by safern
thaystg May 5, 2020
1bebc32
Changing what was suggested by safern
thaystg May 5, 2020
2bf4f50
Update src/mono/netcore/System.Private.CoreLib/src/System/Globalizati…
thaystg May 5, 2020
b483e41
Fixing what safern explained.
thaystg May 5, 2020
376764a
Fixing windows includes.
thaystg May 5, 2020
8327179
Removing unused var.
thaystg May 5, 2020
5c06e56
Changing what was suggested by @lateralusX
thaystg May 6, 2020
1af719d
Fixing test failure.
thaystg May 6, 2020
06460ff
Changing includes order as suggested by @lateralusX
thaystg May 7, 2020
1a884ad
Fix mono compilation
thaystg May 7, 2020
dc17ef9
Removing dynamic link to icu libraries.
thaystg May 7, 2020
3bbdf1e
Fixing side effect running System.Net.ServicePoint.Tests.
thaystg May 8, 2020
2e45cbe
Moving implementation of ResolveSatelliteAssembly back to AssemblyLoa…
thaystg May 8, 2020
d83a61c
Fixing side effect on Mac.
thaystg May 8, 2020
11c7a3d
Fixing side when compiling with netcore configuration but without glo…
thaystg May 9, 2020
2737b96
Fix cross compilation
thaystg May 9, 2020
d990080
Fix cross compilation
thaystg May 9, 2020
d7eefa3
Fixing loading functions at __Internal on android x86.
thaystg May 12, 2020
03bdce3
Adding include only for android.
thaystg May 12, 2020
8da62b1
Merge remote-tracking branch 'upstream/master' into thays_shim_global…
thaystg May 13, 2020
676b58e
Fixing android.
thaystg May 14, 2020
e974e46
Fixing android compilation on mono.
thaystg May 15, 2020
464656a
Fixing android x64 has the same problem that there is in x86.
thaystg May 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/libraries/Common/src/Interop/Interop.Libraries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ internal static partial class Interop
{
internal static partial class Libraries
{
#if MONO
internal const string GlobalizationNative = "__Internal";
#else
internal const string GlobalizationNative = "libSystem.Globalization.Native";
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
// See the LICENSE file in the project root for more information.
//

#include <stdlib.h>
#include "pal_icushim_internal.h"

#if defined(TARGET_UNIX)
#include <dlfcn.h>
#elif defined(TARGET_WINDOWS)
#include <windows.h>
#include <libloaderapi.h>
#include <errhandlingapi.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>

#include "pal_icushim_internal.h"
#include "pal_icushim.h"

// Define pointers to all the used ICU functions
Expand Down
3 changes: 1 addition & 2 deletions src/libraries/System.Globalization/tests/IcuTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ namespace System.Globalization.Tests
public class IcuTests
{
private static bool IsIcuCompatiblePlatform => PlatformDetection.IsNotWindows ||
(!PlatformDetection.IsMonoRuntime &&
PlatformDetection.IsWindows10Version1903OrGreater);
PlatformDetection.IsWindows10Version1903OrGreater;

[ConditionalFact(nameof(IsIcuCompatiblePlatform))]
public static void IcuShouldBeUsedByDefault()
Expand Down
35 changes: 35 additions & 0 deletions src/mono/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6795,6 +6795,41 @@ AC_COMPILE_IFELSE(
AC_MSG_RESULT(no)
])

# for icu shim
if test x$with_core = xonly; then
ICU_SHIM_PATH=../../../libraries/Native/Unix/System.Globalization.Native
if test x$target_osx = xyes; then
ORIG_CPPFLAGS=$CPPFLAGS
# adding icu path to pkg_config_path
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig
export PKG_CONFIG_PATH
CPPFLAGS="`pkg-config --cflags-only-I icu-uc`"
AC_CHECK_LIB(icucore, ucol_open, [],
[AC_MSG_ERROR([Cannot find libicucore, skipping build for System.Globalization.Native. .NET globalization is not expected to function.])])
AC_DEFINE(ICU_LIBS, -licucore, [adding -licucore])
AC_CHECK_HEADER(unicode/utypes.h, [have_sys_icu=yes], [have_sys_icu=no])
if test x$have_sys_icu = xyes; then
ICU_CFLAGS="$CPPFLAGS -DOSX_ICU_LIBRARY_PATH=AS_ESCAPE(\"/usr/lib/libicucore.dylib\", '\"') -DTARGET_UNIX -DU_DISABLE_RENAMING -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option -Wno-deprecated-declarations"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are these warnings coming from? Not saying they look bad, just wondering why this specific list.

fi
CPPFLAGS=$ORIG_CPPFLAGS
elif test x$host_linux = xyes; then
AC_CHECK_LIB(icuuc, main, [],
[AC_MSG_ERROR([Cannot find libicuuc, try installing libicu-dev (or the appropriate package for your platform).])])
AC_CHECK_LIB(icui18n, main, [],
[AC_MSG_ERROR([Cannot find libicui18n, try installing libicu-dev (or the appropriate package for your platform).])])
AC_DEFINE(ICU_LIBS, [-licuuc, -licui18n], [adding -licuuc and -licui18n])
AC_CHECK_HEADER(unicode/utypes.h, [have_sys_icu=yes], [have_sys_icu=no])
if test x$have_sys_icu = xyes; then
ICU_CFLAGS="-DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
fi
fi

AC_SUBST(ICU_CFLAGS)
AC_SUBST(ICU_LIBS)
AC_SUBST(ICU_SHIM_PATH)
fi
AM_CONDITIONAL(HAVE_SYS_ICU, test x$have_sys_icu = xyes)

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
Expand Down
27 changes: 24 additions & 3 deletions src/mono/mono/metadata/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Z_LIBS=$(BUNDLE_ZLIB_PATH)
endif
endif

noinst_LTLIBRARIES = libmonoruntime-config.la $(support_libraries) $(boehm_libraries) $(sgen_libraries)
noinst_LTLIBRARIES = libmonoruntime-config.la $(support_libraries) $(boehm_libraries) $(sgen_libraries) $(shim_libraries)

lib_LTLIBRARIES = $(icall_table_libraries) $(ilgen_libraries)

Expand Down Expand Up @@ -136,6 +136,27 @@ libmonoruntime_support_la_SOURCES = support.c
libmonoruntime_support_la_LDFLAGS = $(Z_LIBS)
libmonoruntime_support_la_CFLAGS = $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @ZLIB_CFLAGS@

if ENABLE_NETCORE
if HAVE_SYS_ICU
shim_libraries = libmonoruntime-shimglobalization.la

libmonoruntime_shimglobalization_la_SOURCES = \
@ICU_SHIM_PATH@/pal_calendarData.c \
@ICU_SHIM_PATH@/pal_casing.c \
@ICU_SHIM_PATH@/pal_collation.c \
@ICU_SHIM_PATH@/pal_idna.c \
@ICU_SHIM_PATH@/pal_locale.c \
@ICU_SHIM_PATH@/pal_localeNumberData.c \
@ICU_SHIM_PATH@/pal_localeStringData.c \
@ICU_SHIM_PATH@/pal_normalization.c \
@ICU_SHIM_PATH@/pal_timeZoneInfo.c \
@ICU_SHIM_PATH@/pal_icushim.c

libmonoruntime_shimglobalization_la_LDFLAGS = @ICU_LIBS@
libmonoruntime_shimglobalization_la_CFLAGS = @ICU_CFLAGS@ -I$(top_srcdir)/../libraries/Native/Unix/Common/
endif
endif

#
# This library contains the icall tables if the runtime was configured with --disable-icall-tables
#
Expand Down Expand Up @@ -424,12 +445,12 @@ if !ENABLE_MSVC_ONLY
libmonoruntime_la_SOURCES = $(common_sources) $(icall_tables_sources) $(ilgen_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources)
# Add CXX_ADD_CFLAGS per-library until/unless https://github.com/dotnet/corefx/pull/31342.
libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES) @CXX_ADD_CFLAGS@
libmonoruntime_la_LIBADD = libmonoruntime-config.la $(support_libraries)
libmonoruntime_la_LIBADD = libmonoruntime-config.la $(support_libraries) $(shim_libraries)

libmonoruntimesgen_la_SOURCES = $(common_sources) $(icall_tables_sources) $(ilgen_sources) $(gc_dependent_sources) $(sgen_sources)
# Add CXX_ADD_CFLAGS per-library until/unless https://github.com/dotnet/corefx/pull/31342.
libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@
libmonoruntimesgen_la_LIBADD = libmonoruntime-config.la $(support_libraries)
libmonoruntimesgen_la_LIBADD = libmonoruntime-config.la $(support_libraries) $(shim_libraries)

endif # !ENABLE_MSVC_ONLY

Expand Down
10 changes: 10 additions & 0 deletions src/mono/mono/metadata/native-library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,9 @@ lookup_pinvoke_call_impl (MonoMethod *method, MonoLookupPInvokeStatus *status_ou
#endif

#ifdef ENABLE_NETCORE
#ifndef HOST_WIN32
retry_with_libcoreclr:
#endif
// FIXME: these flags are not getting passed correctly
module = netcore_lookup_native_library (alc, image, new_scope, 0);
#else
Expand All @@ -1262,6 +1265,13 @@ lookup_pinvoke_call_impl (MonoMethod *method, MonoLookupPInvokeStatus *status_ou
addr = pinvoke_probe_for_symbol (module, piinfo, new_import, &error_msg);

if (!addr) {
#if defined(ENABLE_NETCORE) && !defined(HOST_WIN32)
if (strcmp (new_scope, "__Internal") == 0) {
g_free ((char *)new_scope);
new_scope = g_strdup ("libcoreclr.so");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should have a tracking item somewhere about revisiting this since we won't be using the libmono->libcoreclr rename hack forever.

goto retry_with_libcoreclr;
}
#endif
status_out->err_code = LOOKUP_PINVOKE_ERR_NO_SYM;
status_out->err_arg = g_strdup (new_import);
goto exit;
Expand Down
6 changes: 3 additions & 3 deletions src/mono/mono/utils/mono-dl-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ mono_dl_convert_flags (int flags)

#ifdef ENABLE_NETCORE
// Specifying both will default to LOCAL
if (flags & MONO_DL_LOCAL)
lflags |= RTLD_LOCAL;
else if (flags & MONO_DL_GLOBAL)
if (flags & MONO_DL_GLOBAL && !(flags & MONO_DL_LOCAL))
lflags |= RTLD_GLOBAL;
else
lflags |= RTLD_LOCAL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting just to note that this is a significant behavioral change to ensure we default to RTLD_LOCAL on both OSX and Linux. This was the intention from the start and was discussed beforehand, but is worth bringing attention to.

#else
lflags = flags & MONO_DL_LOCAL ? RTLD_LOCAL : RTLD_GLOBAL;
#endif
Expand Down
16 changes: 8 additions & 8 deletions src/mono/msvc/libmono-dynamic.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
<ClCompile>
<AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);_DEBUG;%(PreprocessorDefinitions);TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
Expand All @@ -123,8 +123,8 @@
<ClCompile>
<AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);WIN64;_DEBUG;%(PreprocessorDefinitions);TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<DisableSpecificWarnings>4996;4018;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
Expand All @@ -147,8 +147,8 @@
<ClCompile>
<AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);NDEBUG;%(PreprocessorDefinitions);TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<WarningLevel>Level3</WarningLevel>
<WholeProgramOptimization>true</WholeProgramOptimization>
Expand Down Expand Up @@ -176,8 +176,8 @@
<ClCompile>
<AdditionalOptions>/D /NODEFAULTLIB:LIBCD" " %(AdditionalOptions)</AdditionalOptions>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(MONO_LLVM_DEFAULT_INCLUDE_DIR);$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;$(GC_DEFINES);MONO_DLL_EXPORT;LLVM_API_VERSION=$(MONO_LLVM_DEFAULT_API_VERSION);WIN64;NDEBUG;%(PreprocessorDefinitions);TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<WarningLevel>Level3</WarningLevel>
<WholeProgramOptimization>true</WholeProgramOptimization>
Expand Down
1 change: 1 addition & 0 deletions src/mono/msvc/libmonoruntime.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)monozlib.targets" />
<Import Project="$(MSBuildThisFileDirectory)shimglobalization.targets" Condition="'$(MONO_ENABLE_NETCORE)'=='true'"/>
<Import Project="$(MSBuildThisFileDirectory)libmonoruntime-common.targets" />
<Import Project="$(MSBuildThisFileDirectory)libmonoruntime-win32.targets" />
<Import Project="$(MSBuildThisFileDirectory)libmonoruntime-posix.targets" />
Expand Down
1 change: 1 addition & 0 deletions src/mono/msvc/libmonoruntime.targets.filters
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)monozlib.targets.filters" />
<Import Project="$(MSBuildThisFileDirectory)shimglobalization.targets.filters"/>
<Import Project="$(MSBuildThisFileDirectory)libmonoruntime-common.targets.filters" />
<Import Project="$(MSBuildThisFileDirectory)libmonoruntime-win32.targets.filters" />
<Import Project="$(MSBuildThisFileDirectory)libmonoruntime-posix.targets.filters" />
Expand Down
16 changes: 8 additions & 8 deletions src/mono/msvc/libmonoruntime.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);_DEBUG;%(PreprocessorDefinitions);TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
Expand All @@ -111,8 +111,8 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);WIN64;_DEBUG;%(PreprocessorDefinitions);TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE;$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
Expand All @@ -125,8 +125,8 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);NDEBUG;%(PreprocessorDefinitions);TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<StringPooling>true</StringPooling>
</ClCompile>
Expand All @@ -141,8 +141,8 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_LIB;$(GC_DEFINES);WIN64;NDEBUG;%(PreprocessorDefinitions;TARGET_WINDOWS;PALEXPORT=extern "C" __declspec(dllexport)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(SHIM_GLOBALIZATION);$(SHIM_GLOBALIZATION_COMMON);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<StringPooling>true</StringPooling>
</ClCompile>
Expand Down
2 changes: 2 additions & 0 deletions src/mono/msvc/mono.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
<LIBGC_CPPFLAGS_INCLUDE>$(MONO_LIBGC_INCLUDE_DIR)</LIBGC_CPPFLAGS_INCLUDE>
<GLIB_CFLAGS_INCLUDE>$(MONO_EGLIB_SOURCE_DIR)</GLIB_CFLAGS_INCLUDE>
<MONO_LLVM_DEFAULT_API_VERSION>610</MONO_LLVM_DEFAULT_API_VERSION>
<SHIM_GLOBALIZATION>$(top_srcdir)/../libraries/Native/Unix/System.Globalization.Native</SHIM_GLOBALIZATION>
<SHIM_GLOBALIZATION_COMMON>$(top_srcdir)/../libraries/Native/Unix/Common</SHIM_GLOBALIZATION_COMMON>
<MONO_LLVM_DEFAULT_INCLUDE_DIR>$(MONO_DIR)/external/llvm-project/llvm/include</MONO_LLVM_DEFAULT_INCLUDE_DIR>
</PropertyGroup>
<PropertyGroup Label="Static-C-Runtime" Condition="'$(MONO_USE_STATIC_C_RUNTIME)'=='true'">
Expand Down
Loading