Fix missing version info in host binaries (#34520)
authorElinor Fung <47805090+elinor-fung@users.noreply.github.com>
Mon, 6 Apr 2020 17:23:46 +0000 (10:23 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Apr 2020 17:23:46 +0000 (10:23 -0700)
src/installer/corehost/build.proj
src/installer/corehost/cli/common.cmake
src/installer/corehost/cli/hostmisc/CMakeLists.txt

index 9de06c6..0d6d91e 100644 (file)
@@ -28,6 +28,7 @@
       <CMakeBuildDir>$(IntermediateOutputRootPath)corehost\cmake\</CMakeBuildDir>
 
       <BuildArgs>$(Configuration) $(TargetArchitecture) -apphostver "$(AppHostVersion)" -hostver "$(HostVersion)" -fxrver "$(HostResolverVersion)" -policyver "$(HostPolicyVersion)" -commithash "$(LatestCommit)" -os $(TargetOS)</BuildArgs>
+      <BuildArgs>$(BuildArgs) -cmakeargs "-DVERSION_FILE_PATH=$(NativeVersionFile)"</BuildArgs>
       <BuildArgs Condition="'$(PortableBuild)' != 'true'">$(BuildArgs) -portablebuild=false</BuildArgs>
       <BuildArgs Condition="'$(CrossBuild)' == 'true'">$(BuildArgs) -cross</BuildArgs>
       <BuildArgs Condition="'$(Compiler)' != ''">$(BuildArgs) $(Compiler)</BuildArgs>
index 8a4641c..5f92896 100644 (file)
@@ -24,8 +24,12 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/../)
 include_directories(${CMAKE_CURRENT_LIST_DIR}/hostmisc)
 
 set(RESOURCES)
-if(CLR_CMAKE_TARGET_WIN32 AND NOT SKIP_VERSIONING)
-    list(APPEND RESOURCES ${CMAKE_CURRENT_LIST_DIR}/native.rc)
+if (NOT SKIP_VERSIONING)
+    if(CLR_CMAKE_TARGET_WIN32)
+        list(APPEND RESOURCES ${CMAKE_CURRENT_LIST_DIR}/native.rc)
+    else()
+        list(APPEND SOURCES ${VERSION_FILE_PATH})
+    endif()
 endif()
 
 if(CLR_CMAKE_TARGET_WIN32)
index 8db9d85..1b67c65 100644 (file)
@@ -32,8 +32,7 @@ if(CLR_CMAKE_TARGET_WIN32)
         longfile.h)
 else()
     list(APPEND SOURCES
-        pal.unix.cpp
-        ${VERSION_FILE_PATH})
+        pal.unix.cpp)
 endif()
 
 set(SKIP_VERSIONING 1)