Skip to content

Move corehost under src/native #48071

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

Merged
merged 4 commits into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'coreclr'))</CoreClrProjectRoot>
<MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'mono'))</MonoProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'installer'))</InstallerProjectRoot>
<SharedNativeRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'native'))</SharedNativeRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tasks'))</RepoTasksDir>
<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
Expand Down
2 changes: 1 addition & 1 deletion docs/design/features/framework-version-resolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Each framework reference consists of these values
* Version - for example `3.0.1`
* Roll-forward setting - for example `Minor`

*In the code the framework reference is represented by an instance of [`fx_reference_t`](https://github.com/dotnet/runtime/blob/master/src/installer/corehost/cli/fx_reference.h).*
*In the code the framework reference is represented by an instance of [`fx_reference_t`](https://github.com/dotnet/runtime/blob/master/src/native/corehost/fx_reference.h).*

In the `.runtimeconfig.json` these values are defined like this:
``` json
Expand Down
4 changes: 2 additions & 2 deletions docs/design/features/native-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ One such scenario is a COM host on multiple threads. The app is not running any
At the same time it gives the native app (`comhost` in this case) the ability to query and modify runtime properties in between the `hostfxr_initialize...` and `hostfxr_get_runtime_delegate` calls on the `first host context`.

### API usage
The `hostfxr` exports are defined in the [hostfxr.h](https://github.com/dotnet/runtime/blob/master/src/installer/corehost/cli/hostfxr.h) header file.
The runtime helper and method signatures for loading managed components are defined in [coreclr_delegates.h](https://github.com/dotnet/runtime/blob/master/src/installer/corehost/cli/coreclr_delegates.h) header file.
The `hostfxr` exports are defined in the [hostfxr.h](https://github.com/dotnet/runtime/blob/master/src/native/corehost/hostfxr.h) header file.
The runtime helper and method signatures for loading managed components are defined in [coreclr_delegates.h](https://github.com/dotnet/runtime/blob/master/src/native/corehost/coreclr_delegates.h) header file.

Currently we don't plan to ship these files, but it's possible to take them from the repo and use it.

Expand Down
2 changes: 1 addition & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@

<!-- Host sets -->
<ItemGroup Condition="$(_subset.Contains('+host.native+'))">
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost\corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
<ProjectToBuild Include="@(CorehostProjectToBuild)" Pack="true" Category="host" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
Use IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and there's an existing
warning in the macOS build when dsymutil tries to strip symbols.
-->
<Message Text="$(MSBuildProjectDirectory)\build.sh $(BuildArgs)" Importance="High"/>
<Exec Command="$(MSBuildProjectDirectory)\build.sh $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
<Message Text="$(SharedNativeRoot)\corehost\build.sh $(BuildArgs)" Importance="High"/>
<Exec Command="$(SharedNativeRoot)\corehost\build.sh $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
</Target>

<Target Name="BuildCoreHostWindows"
Expand Down Expand Up @@ -103,8 +103,8 @@
IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and there's an existing
warning in the native build.
-->
<Message Text="$(MSBuildProjectDirectory)\build.cmd $(BuildArgs)" Importance="High"/>
<Exec Command="$(MSBuildProjectDirectory)\build.cmd $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
<Message Text="$(SharedNativeRoot)\corehost\build.cmd $(BuildArgs)" Importance="High"/>
<Exec Command="$(SharedNativeRoot)\corehost\build.cmd $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
</Target>

<Target Name="PrependWindowsHeaderIncludeToVersionHeaderFile"
Expand Down
20 changes: 0 additions & 20 deletions src/installer/corehost/cli/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cmake_minimum_required(VERSION 3.6.2)

if (CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15)
cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0091 NEW)
endif()

project(corehost)

include(../../../eng/native/configurepaths.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)

if(MSVC)
if (MSVC)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4996>)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4267>)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4018>)
Expand All @@ -23,4 +23,19 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES GNU)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-use-cxa-atexit>)
endif()

add_subdirectory(cli)
add_subdirectory(hostcommon)
add_subdirectory(fxr)
add_subdirectory(hostpolicy)

if (NOT RUNTIME_FLAVOR STREQUAL Mono)
add_subdirectory(apphost)
add_subdirectory(dotnet)
add_subdirectory(nethost)
add_subdirectory(test_fx_ver)
add_subdirectory(test)

if(CLR_CMAKE_TARGET_WIN32)
add_subdirectory(comhost)
add_subdirectory(ijwhost)
endif()
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(SOURCES

set(HEADERS
../bundle_marker.h
../../../hostfxr_resolver.h
../../hostfxr_resolver.h
)

if(CLR_CMAKE_TARGET_WIN32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(SOURCES

set(HEADERS
../bundle_marker.h
../../../hostfxr_resolver.h
../../hostfxr_resolver.h
)

add_definitions(-D_NO_ASYNCRTIMP)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "bundle_marker.h"

#if defined(_WIN32)
#include "cli/apphost/apphost.windows.h"
#include "apphost/apphost.windows.h"
#endif

#define CURHOST_TYPE _X("apphost")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/fxr)
# CMake does not recommend using globbing since it messes with the freshness checks
list(APPEND SOURCES
${CMAKE_CURRENT_LIST_DIR}/fxr_resolver.cpp
${CMAKE_CURRENT_LIST_DIR}/../corehost.cpp
${CMAKE_CURRENT_LIST_DIR}/corehost.cpp
)
list(APPEND HEADERS
${CMAKE_CURRENT_LIST_DIR}/../hostfxr_resolver.h
${CMAKE_CURRENT_LIST_DIR}/hostfxr_resolver.h
)

add_executable(${DOTNET_PROJECT_NAME} ${SOURCES} ${RESOURCES})
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ list(APPEND HEADERS
${CMAKE_CURRENT_LIST_DIR}/trace.h
${CMAKE_CURRENT_LIST_DIR}/utils.h
${CMAKE_CURRENT_LIST_DIR}/pal.h
${CMAKE_CURRENT_LIST_DIR}/../../error_codes.h
${CMAKE_CURRENT_LIST_DIR}/../error_codes.h
${CMAKE_CURRENT_LIST_DIR}/../fxr/fx_ver.h
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ list(APPEND HEADERS
${CMAKE_CURRENT_LIST_DIR}/../bundle/file_entry.h
${CMAKE_CURRENT_LIST_DIR}/../bundle/manifest.h
${CMAKE_CURRENT_LIST_DIR}/../bundle/runner.h
${CMAKE_CURRENT_LIST_DIR}/../../coreclr_resolver.h
${CMAKE_CURRENT_LIST_DIR}/../coreclr_resolver.h
)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.