Skip to content

Commit

Permalink
Fix Linux x86 build
Browse files Browse the repository at this point in the history
Related to dotnet#33005
  • Loading branch information
gbalykov committed Apr 4, 2020
1 parent 363b7ad commit 15fdfac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/src/vm/comdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ void COMDelegate::BindToMethod(DELEGATEREF *pRefThis,
GCPROTECT_END();
}

#if defined(TARGET_X86) && defined(TARGET_WINDOWS)
#if defined(TARGET_X86)
// Marshals a managed method to an unmanaged callback provided the
// managed method is static and it's parameters require no marshalling.
PCODE COMDelegate::ConvertToCallback(MethodDesc* pMD)
Expand Down Expand Up @@ -1189,7 +1189,7 @@ PCODE COMDelegate::ConvertToCallback(MethodDesc* pMD)
_ASSERTE(pCode != NULL);
return pCode;
}
#endif // defined(TARGET_X86) && defined(TARGET_WINDOWS)
#endif // defined(TARGET_X86)

// Marshals a delegate to a unmanaged callback.
LPVOID COMDelegate::ConvertToCallback(OBJECTREF pDelegateObj)
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/src/vm/comdelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ class COMDelegate
// Marshals a delegate to a unmanaged callback.
static LPVOID ConvertToCallback(OBJECTREF pDelegate);

#if defined(TARGET_X86) && defined(TARGET_WINDOWS)
#if defined(TARGET_X86)
// Marshals a managed method to an unmanaged callback.
// This is only used on x86 Windows. See usage for further details.
// This is only used on x86. See usage for further details.
static PCODE ConvertToCallback(MethodDesc* pMD);
#endif // defined(TARGET_X86) && defined(TARGET_WINDOWS)
#endif // defined(TARGET_X86)

// Marshals an unmanaged callback to Delegate
static OBJECTREF ConvertToDelegate(LPVOID pCallback, MethodTable* pMT);
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/src/vm/prestub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ PCODE MethodDesc::GetPrecompiledCode(PrepareCodeConfig* pConfig)

#ifdef FEATURE_TIERED_COMPILATION
bool shouldTier = pConfig->GetMethodDesc()->IsEligibleForTieredCompilation();
#if !defined(TARGET_X86) || !defined(TARGET_WINDOWS)
#if !defined(TARGET_X86)
CallerGCMode callerGcMode = pConfig->GetCallerGCMode();
// If the method is eligible for tiering but is being
// called from a Preemptive GC Mode thread or the method
Expand All @@ -458,7 +458,7 @@ PCODE MethodDesc::GetPrecompiledCode(PrepareCodeConfig* pConfig)
codeVersion.SetOptimizationTier(NativeCodeVersion::OptimizationTierOptimized);
shouldTier = false;
}
#endif // !TARGET_X86 || !TARGET_WINDOWS
#endif // !TARGET_X86
#endif // FEATURE_TIERED_COMPILATION

if (pConfig->SetNativeCode(pCode, &pCode))
Expand Down

0 comments on commit 15fdfac

Please sign in to comment.