Fix host name, debuggability and embed CRT

This commit is contained in:
schellap 2016-01-13 21:35:31 -08:00 committed by Senthil
parent f2ac0d341b
commit b4b482006b
11 changed files with 73 additions and 21 deletions

View file

@ -17,25 +17,29 @@ try {
if (Test-Path "env:\ProgramFiles(x86)") {
$pf = (cat "env:\ProgramFiles(x86)")
}
& "$pf\MSBuild\14.0\Bin\MSBuild.exe" ALL_BUILD.vcxproj /p:Configuration="$Configuration"
$BuildConfiguration = $Configuration
if ($Configuration -eq "Release") {
$BuildConfiguration = "RelWithDebInfo"
}
& "$pf\MSBuild\14.0\Bin\MSBuild.exe" ALL_BUILD.vcxproj /p:Configuration="$BuildConfiguration"
if (!$?) {
Write-Host "Command failed: $pf\MSBuild\14.0\Bin\MSBuild.exe" ALL_BUILD.vcxproj /p:Configuration="$Configuration"
Write-Host "Command failed: $pf\MSBuild\14.0\Bin\MSBuild.exe" ALL_BUILD.vcxproj /p:Configuration="$BuildConfiguration"
Exit 1
}
if (!(Test-Path $HostDir)) {
mkdir $HostDir | Out-Null
}
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\$Configuration\corehost.exe" $HostDir
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\dll\$Configuration\clihost.dll" $HostDir
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\$BuildConfiguration\corehost.exe" $HostDir
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\dll\$BuildConfiguration\hostpolicy.dll" $HostDir
if (Test-Path "$RepoRoot\src\corehost\cmake\$Rid\cli\$Configuration\corehost.pdb")
if (Test-Path "$RepoRoot\src\corehost\cmake\$Rid\cli\$BuildConfiguration\corehost.pdb")
{
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\$Configuration\corehost.pdb" $HostDir
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\$BuildConfiguration\corehost.pdb" $HostDir
}
if (Test-Path "$RepoRoot\src\corehost\cmake\$Rid\cli\dll\$Configuration\clihost.pdb")
if (Test-Path "$RepoRoot\src\corehost\cmake\$Rid\cli\dll\$BuildConfiguration\hostpolicy.pdb")
{
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\dll\$Configuration\clihost.pdb" $HostDir
cp "$RepoRoot\src\corehost\cmake\$Rid\cli\dll\$BuildConfiguration\hostpolicy.pdb" $HostDir
}
} finally {
popd

View file

@ -26,9 +26,9 @@ make
# Publish to artifacts
[ -d "$HOST_DIR" ] || mkdir -p $HOST_DIR
if [[ "$OSNAME" == "osx" ]]; then
COREHOST_LIBNAME=libclihost.dylib
COREHOST_LIBNAME=libhostpolicy.dylib
else
COREHOST_LIBNAME=libclihost.so
COREHOST_LIBNAME=libhostpolicy.so
fi
cp "$REPOROOT/src/corehost/cmake/$RID/cli/corehost" $HOST_DIR
cp "$REPOROOT/src/corehost/cmake/$RID/cli/dll/${COREHOST_LIBNAME}" $HOST_DIR

View file

@ -78,7 +78,7 @@ cp -rec "$RuntimeOutputDir\*" "$OutputDir\bin"
# Deploy the CLR host to the output
cp "$HostDir\corehost.exe" "$OutputDir\bin"
cp "$HostDir\clihost.dll" "$OutputDir\bin"
cp "$HostDir\hostpolicy.dll" "$OutputDir\bin"
# corehostify externally-provided binaries (csc, vbc, etc.)
$BinariesForCoreHost | ForEach-Object {

View file

@ -77,9 +77,9 @@ cp -R $RUNTIME_OUTPUT_DIR/* $OUTPUT_DIR/bin
# Deploy CLR host to the output
if [[ "$OSNAME" == "osx" ]]; then
COREHOST_LIBNAME=libclihost.dylib
COREHOST_LIBNAME=libhostpolicy.dylib
else
COREHOST_LIBNAME=libclihost.so
COREHOST_LIBNAME=libhostpolicy.so
fi
cp "$HOST_DIR/corehost" "$OUTPUT_DIR/bin"
cp "$HOST_DIR/${COREHOST_LIBNAME}" "$OUTPUT_DIR/bin"