Skip to content

Commit

Permalink
Publish PDB for libnethost static library. (dotnet#38054)
Browse files Browse the repository at this point in the history
* Publish PDB for libnethost static library.
  • Loading branch information
AaronRobinsonMSFT authored Jun 20, 2020
1 parent 8439668 commit e1297d6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/installer/corehost/cli/nethost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,22 @@ include(../lib_static.cmake)
add_definitions(-DFEATURE_LIBHOST=1)
add_definitions(-DNETHOST_EXPORT)

# Copy static lib PDB to the project output directory
if (WIN32)
set_target_properties(libnethost PROPERTIES
COMPILE_PDB_NAME "libnethost"
COMPILE_PDB_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}"
)
endif(WIN32)

install(FILES ../coreclr_delegates.h DESTINATION corehost)
install(FILES ../hostfxr.h DESTINATION corehost)
install(FILES nethost.h DESTINATION corehost)
install(TARGETS libnethost DESTINATION corehost)
install_with_stripped_symbols(nethost TARGETS corehost)

# Only Windows creates a symbols file for static libs.
if (WIN32)
install_with_stripped_symbols(libnethost TARGETS corehost)
else()
install(TARGETS libnethost DESTINATION corehost)
endif(WIN32)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
<NativeBinary Include="$(DotNetHostBinDir)/comhost.dll" />
<NativeBinary Include="$(DotNetHostBinDir)/ijwhost.dll" />
<NativeBinary Include="$(DotNetHostBinDir)/ijwhost.lib" />
<!-- The libnethost.lib is a static library for the nethost scenario.
The symbols file is also shipped to enable users to fully debug
binaries that link against the static version. -->
<NativeBinary Include="$(DotNetHostBinDir)/libnethost.lib" />
<NativeBinary Include="$(DotNetHostBinDir)/PDB/libnethost.pdb" />
</ItemGroup>

<ItemGroup Condition="'$(PackageTargetRuntime)' != ''">
Expand Down

0 comments on commit e1297d6

Please sign in to comment.