From: Gleb Balykov Date: Tue, 7 Dec 2021 13:28:24 +0000 (+0300) Subject: Fix linux x86 build error (partial cherry-pick of https://github.com/dotnet/runtime... X-Git-Tag: accepted/tizen/unified/20221103.165808~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17dad868de931074fa20facbefe5f736bfe97f50;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix linux x86 build error (partial cherry-pick of https://github.com/dotnet/runtime/pull/60817) --- diff --git a/src/coreclr/vm/CMakeLists.txt b/src/coreclr/vm/CMakeLists.txt index 5cb683b..9b10c73 100644 --- a/src/coreclr/vm/CMakeLists.txt +++ b/src/coreclr/vm/CMakeLists.txt @@ -945,9 +945,11 @@ list(APPEND VM_SOURCES_DAC # gcdecode.cpp is included by both JIT and VM. to avoid duplicate definitions we need to # treat it in a special way when statically linking with both VM and JIT if(CLR_CMAKE_TARGET_ARCH_I386) - list(APPEND VM_SOURCES_DAC - gcdecode.cpp - ) + if(CLR_CMAKE_TARGET_WIN32) + list(APPEND VM_SOURCES_DAC + gcdecode.cpp + ) + endif() list(APPEND VM_SOURCES_WKS_SPECIAL gcdecode.cpp ) diff --git a/src/coreclr/vm/i386/virtualcallstubcpu.hpp b/src/coreclr/vm/i386/virtualcallstubcpu.hpp index c6515ab..41d2653 100644 --- a/src/coreclr/vm/i386/virtualcallstubcpu.hpp +++ b/src/coreclr/vm/i386/virtualcallstubcpu.hpp @@ -429,7 +429,7 @@ struct VTableCallHolder return 2 + (offsetOfIndirection >= 0x80 ? 6 : 3) + (offsetAfterIndirection >= 0x80 ? 6 : 3) + 4; } - static VTableCallHolder* VTableCallHolder::FromVTableCallEntry(PCODE entry) { LIMITED_METHOD_CONTRACT; return (VTableCallHolder*)entry; } + static VTableCallHolder* FromVTableCallEntry(PCODE entry) { LIMITED_METHOD_CONTRACT; return (VTableCallHolder*)entry; } private: // VTableCallStub follows here. It is dynamically sized on allocation because it could