diff options
author | lateralusX <lateralusx.github@gmail.com> | 2019-05-09 19:33:00 +0300 |
---|---|---|
committer | lateralusX <lateralusx.github@gmail.com> | 2019-05-09 19:33:00 +0300 |
commit | 2a703e72ff9001c9c872f1629ce0842e061a1c8a (patch) | |
tree | bde2f616360779c763fe8d53c2991bab3f979d43 /msvc | |
parent | 8928ed6fd89d03c26d3428cf390c1f5384e8686f (diff) |
Add log profiler support to Mono MSVC build.
Several fixes to the log profiler in order to work on Windows.
* Add new dynamic library project to build log profiler on Windows MSVC.
* Fix dependecy between log profiler and Mono.
* Rewrite command pipe logic on Windows since it's not supported to select
on both sockets and pipes.
* Several additional socket fixes needed for log profiler to work on Windows.
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/libmonoutils-win32.targets | 1 | ||||
-rw-r--r-- | msvc/libmonoutils-win32.targets.filters | 3 | ||||
-rw-r--r-- | msvc/mono-profiler-log.vcxproj | 174 | ||||
-rw-r--r-- | msvc/mono-profiler-log.vcxproj.filters | 27 | ||||
-rw-r--r-- | msvc/mono.sln | 15 |
5 files changed, 218 insertions, 2 deletions
diff --git a/msvc/libmonoutils-win32.targets b/msvc/libmonoutils-win32.targets index c1484ed9e66..2c237d9d7a5 100644 --- a/msvc/libmonoutils-win32.targets +++ b/msvc/libmonoutils-win32.targets @@ -3,5 +3,6 @@ <ItemGroup Label="win32_sources"> <ClCompile Include="$(MonoSourceLocation)\mono\utils\os-event-win32.c" /> <ClCompile Include="$(MonoSourceLocation)\mono\utils\mono-os-wait-win32.c" /> + <ClCompile Include="$(MonoSourceLocation)\mono\utils\mono-os-semaphore-win32.c" /> </ItemGroup> </Project> diff --git a/msvc/libmonoutils-win32.targets.filters b/msvc/libmonoutils-win32.targets.filters index 122e39eedaf..eab5c88e8a4 100644 --- a/msvc/libmonoutils-win32.targets.filters +++ b/msvc/libmonoutils-win32.targets.filters @@ -7,6 +7,9 @@ <ClCompile Include="$(MonoSourceLocation)\mono\utils\mono-os-wait-win32.c"> <Filter>Source Files$(MonoUtilsFilterSubFolder)\win32</Filter> </ClCompile> + <ClCompile Include="$(MonoSourceLocation)\mono\utils\mono-os-semaphore-win32.c"> + <Filter>Source Files$(MonoUtilsFilterSubFolder)\win32</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <Filter Include="Source Files$(MonoUtilsFilterSubFolder)\win32"> diff --git a/msvc/mono-profiler-log.vcxproj b/msvc/mono-profiler-log.vcxproj new file mode 100644 index 00000000000..f745c7381eb --- /dev/null +++ b/msvc/mono-profiler-log.vcxproj @@ -0,0 +1,174 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{8C02A728-7A50-43CE-B507-BDFC05B7EA94}</ProjectGuid> + <RootNamespace>mono-profiler-log</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="mono.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="mono.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="mono.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="mono.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mono-profiler-log</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mono-profiler-log</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mono-profiler-log</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mono-profiler-log</TargetName> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\bin\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\$(ProjectName)$(MONO_TARGET_SUFFIX)\$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;MONO_DLL_EXPORT;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <WarningLevel>Level3</WarningLevel> + <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <StringPooling>true</StringPooling> + </ClCompile> + <Link> + <AdditionalDependencies>$(MONO_LIBMONO_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + <ProjectReference> + <LinkLibraryDependencies>false</LinkLibraryDependencies> + </ProjectReference> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;MONO_DLL_EXPORT;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <WarningLevel>Level3</WarningLevel> + <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <StringPooling>true</StringPooling> + </ClCompile> + <Link> + <AdditionalDependencies>$(MONO_LIBMONO_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + <ProjectReference> + <LinkLibraryDependencies>false</LinkLibraryDependencies> + </ProjectReference> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;MONO_DLL_EXPORT;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalDependencies>$(MONO_LIBMONO_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + <ProjectReference> + <LinkLibraryDependencies>false</LinkLibraryDependencies> + </ProjectReference> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(MONO_DIR);$(MONO_INCLUDE_DIR);$(GLIB_CFLAGS_INCLUDE);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;MONO_DLL_EXPORT;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalDependencies>$(MONO_LIBMONO_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + <ProjectReference> + <LinkLibraryDependencies>false</LinkLibraryDependencies> + </ProjectReference> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\mono\profiler\log-args.c" /> + <ClCompile Include="..\mono\profiler\log.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="eglib.vcxproj"> + <Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project> + </ProjectReference> + <ProjectReference Include="libmono-dynamic.vcxproj"> + <Project>{675f4175-ffb1-480d-ad36-f397578844d4}</Project> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\mono\profiler\log.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/msvc/mono-profiler-log.vcxproj.filters b/msvc/mono-profiler-log.vcxproj.filters new file mode 100644 index 00000000000..662a0050d36 --- /dev/null +++ b/msvc/mono-profiler-log.vcxproj.filters @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Header Files"> + <UniqueIdentifier>{BD730379-6140-4E93-8B3B-9DD624E75542}</UniqueIdentifier> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{118A98DC-B9FE-4B14-B20E-0DFBFBE084BA}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files"> + <UniqueIdentifier>{84C17491-B180-444E-BFF3-1846DE426B13}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\mono\profiler\log.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\mono\profiler\log-args.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\mono\profiler\log.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/msvc/mono.sln b/msvc/mono.sln index 0828ead4e51..0cb250b9215 100644 --- a/msvc/mono.sln +++ b/msvc/mono.sln @@ -208,6 +208,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build-external-llvm", "buil {92AE7622-5F58-4234-9A26-9EC71876B3F4} = {92AE7622-5F58-4234-9A26-9EC71876B3F4} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mono-profiler-log", "mono-profiler-log.vcxproj", "{8C02A728-7A50-43CE-B507-BDFC05B7EA94}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -432,6 +434,14 @@ Global {C3D4C623-55F8-4653-980D-61AA629B4E1D}.Release|Win32.Build.0 = Release|Win32 {C3D4C623-55F8-4653-980D-61AA629B4E1D}.Release|x64.ActiveCfg = Release|x64 {C3D4C623-55F8-4653-980D-61AA629B4E1D}.Release|x64.Build.0 = Release|x64 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Debug|Win32.Build.0 = Debug|Win32 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Debug|x64.ActiveCfg = Debug|x64 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Debug|x64.Build.0 = Debug|x64 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Release|Win32.ActiveCfg = Release|Win32 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Release|Win32.Build.0 = Release|Win32 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Release|x64.ActiveCfg = Release|x64 + {8C02A728-7A50-43CE-B507-BDFC05B7EA94}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -471,11 +481,12 @@ Global {675F4175-FFB1-480D-AD36-F397578844D4} = {DE3617B4-17A8-4E5F-A00F-BA43D956881F} {E41DDF41-0916-454B-A7C2-6E410E45CAFD} = {7AF3635B-001C-42BF-94B9-C036CFDCA71D} {C3D4C623-55F8-4653-980D-61AA629B4E1D} = {7AF3635B-001C-42BF-94B9-C036CFDCA71D} + {8C02A728-7A50-43CE-B507-BDFC05B7EA94} = {4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - AMDCaPersistentConfig = Debug|Win32 - AMDCaPersistentStartup = mono AMDCaProjectFile = C:\Users\Owner\Development\monogit\mono\msvc\CodeAnalyst\mono.caw + AMDCaPersistentStartup = mono + AMDCaPersistentConfig = Debug|Win32 EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} |