diff options
author | Jonghyun Park <parjong@gmail.com> | 2016-12-06 05:20:53 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-12-05 21:20:53 +0100 |
commit | 14bcf6ddf93ae4f7e897e219aaa8c0e43bb99415 (patch) | |
tree | 1850080822661b00a61f74aa47f6280d7af89055 | |
parent | 0c952dcef303e2ee80e892bca7bf5d0950e225cd (diff) | |
download | coreclr-14bcf6ddf93ae4f7e897e219aaa8c0e43bb99415.tar.gz coreclr-14bcf6ddf93ae4f7e897e219aaa8c0e43bb99415.tar.bz2 coreclr-14bcf6ddf93ae4f7e897e219aaa8c0e43bb99415.zip |
Fix dangling StubLinkerCPU::EmitDelegateInvoke in x86/Linux (#8444)
Several methods in StublicLinkerCPU (including EmitDelegateInvoke) are
available only when FEATURE_STUBS_AS_IL is defined.
This commit encloses their declaration with appropriate macro
(FEATURE_STUBS_AS_IL), and fix related build erros.
-rw-r--r-- | src/vm/comdelegate.cpp | 4 | ||||
-rw-r--r-- | src/vm/i386/cgencpu.h | 4 | ||||
-rw-r--r-- | src/vm/i386/stublinkerx86.h | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/vm/comdelegate.cpp b/src/vm/comdelegate.cpp index 9ba1bdb328..4e3523ee60 100644 --- a/src/vm/comdelegate.cpp +++ b/src/vm/comdelegate.cpp @@ -2395,7 +2395,7 @@ PCODE COMDelegate::TheDelegateInvokeStub() } CONTRACT_END; -#ifdef _TARGET_X86_ +#if defined(_TARGET_X86_) && !defined(FEATURE_STUBS_AS_IL) static PCODE s_pInvokeStub; if (s_pInvokeStub == NULL) @@ -2415,7 +2415,7 @@ PCODE COMDelegate::TheDelegateInvokeStub() RETURN s_pInvokeStub; #else RETURN GetEEFuncEntryPoint(SinglecastDelegateInvokeStub); -#endif // _TARGET_X86_ +#endif // _TARGET_X86_ && !FEATURE_STUBS_AS_IL } // Get the cpu stub for a delegate invoke. diff --git a/src/vm/i386/cgencpu.h b/src/vm/i386/cgencpu.h index 269d64b21c..99f4eb498f 100644 --- a/src/vm/i386/cgencpu.h +++ b/src/vm/i386/cgencpu.h @@ -43,6 +43,10 @@ EXTERN_C void STDCALL PInvokeStackImbalanceHelper(void); EXTERN_C void STDCALL CopyCtorCallStub(void); #endif // !FEATURE_CORECLR +#ifdef FEATURE_STUBS_AS_IL +EXTERN_C void SinglecastDelegateInvokeStub(); +#endif // FEATURE_STUBS_AS_IL + BOOL Runtime_Test_For_SSE2(); #ifdef CROSSGEN_COMPILE diff --git a/src/vm/i386/stublinkerx86.h b/src/vm/i386/stublinkerx86.h index ac37183350..e50486b964 100644 --- a/src/vm/i386/stublinkerx86.h +++ b/src/vm/i386/stublinkerx86.h @@ -377,13 +377,16 @@ class StubLinkerCPU : public StubLinker BOOL bShouldProfile); #endif // FEATURE_COMINTEROP && _TARGET_X86_ +#ifndef FEATURE_STUBS_AS_IL //=========================================================================== // Computes hash code for MulticastDelegate.Invoke() static UINT_PTR HashMulticastInvoke(MetaSig* pSig); +#ifdef _TARGET_X86_ //=========================================================================== // Emits code for Delegate.Invoke() any delegate type VOID EmitDelegateInvoke(); +#endif // _TARGET_X86_ //=========================================================================== // Emits code for MulticastDelegate.Invoke() - sig specific @@ -392,6 +395,7 @@ class StubLinkerCPU : public StubLinker //=========================================================================== // Emits code for Delegate.Invoke() on delegates that recorded creator assembly VOID EmitSecureDelegateInvoke(UINT_PTR hash); +#endif // !FEATURE_STUBS_AS_IL //=========================================================================== // Emits code to adjust for a static delegate target. @@ -405,9 +409,11 @@ class StubLinkerCPU : public StubLinker //Worker function to emit throw helpers for array ops. VOID EmitArrayOpStubThrow(unsigned exConst, unsigned cbRetArg); +#ifndef FEATURE_STUBS_AS_IL //=========================================================================== // Emits code to break into debugger VOID EmitDebugBreak(); +#endif // !FEATURE_STUBS_AS_IL #if defined(_DEBUG) && (defined(_TARGET_AMD64_) || defined(_TARGET_X86_)) && !defined(FEATURE_PAL) //=========================================================================== |