Skip to content

Commit

Permalink
infer path to the coreclr_static.lib
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov committed May 27, 2020
1 parent 0eaeb3d commit 215c14c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/installer/corehost/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ set "__LinkArgs= "
set "__LinkLibraries= "
set __PortableBuild=0
set __IncrementalNativeBuild=0
set __BuildType=Debug
set __TargetOS=Windows_NT

:Arg_Loop
if [%1] == [] goto :ToolsVersion
if /i [%1] == [Release] ( set CMAKE_BUILD_TYPE=Release&&shift&goto Arg_Loop)
if /i [%1] == [Release] ( set CMAKE_BUILD_TYPE=Release&&set __BuildType=Release&&shift&goto Arg_Loop)
if /i [%1] == [Debug] ( set CMAKE_BUILD_TYPE=Debug&&shift&goto Arg_Loop)

if /i [%1] == [AnyCPU] ( set __BuildArch=x64&&set __VCBuildArch=x86_amd64&&shift&goto Arg_Loop)
Expand Down
3 changes: 2 additions & 1 deletion src/installer/corehost/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ __MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs"
__DistroRidLower="$(echo $__DistroRid | tr '[:upper:]' '[:lower:]')"
__BinDir="$__RootBinDir/bin/$__DistroRidLower.$__BuildType"
__IntermediatesDir="$__RootBinDir/obj/$__DistroRidLower.$__BuildType"
__ObjDir="$__RootBinDir/obj"

export __BinDir __IntermediatesDir
export __BinDir __IntermediatesDir __ObjDir

__CMakeArgs="-DCLI_CMAKE_HOST_VER=\"$__host_ver\" -DCLI_CMAKE_COMMON_HOST_VER=\"$__apphost_ver\" -DCLI_CMAKE_HOST_FXR_VER=\"$__fxr_ver\" $__CMakeArgs"
__CMakeArgs="-DCLI_CMAKE_HOST_POLICY_VER=\"$__policy_ver\" -DCLI_CMAKE_PKG_RID=\"$__DistroRid\" -DCLI_CMAKE_COMMIT_HASH=\"$__commit_hash\" $__CMakeArgs"
Expand Down
7 changes: 6 additions & 1 deletion src/installer/corehost/cli/apphost/static/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ if (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_AR
target_link_libraries(singlefilehost Advapi32.lib shell32.lib)
endif()

# Path like: artifacts/obj/coreclr/Windows_NT.x64.Release/src/dlls/mscoree/coreclr/Release
set(CORECLR_STATIC_LIB_LOCATION $ENV{__ObjDir}/coreclr/$ENV{__TargetOS}.$ENV{__BuildArch}.$ENV{__BuildType}/src/dlls/mscoree/coreclr/$ENV{__BuildType})

message ("Looking for coreclr_static lib at: '${CORECLR_STATIC_LIB_LOCATION}'.")

find_library (CORECLR_STATIC
name coreclr_static
HINTS C:/Hosting01/runtime/artifacts/obj/coreclr/Windows_NT.x64.Release/src/dlls/mscoree/coreclr/Release)
HINTS ${CORECLR_STATIC_LIB_LOCATION})

if(CLR_CMAKE_TARGET_WIN32)
set(CORECLR_LIBRARIES
Expand Down

0 comments on commit 215c14c

Please sign in to comment.