Add __chkstk to the list of host symbols known to XLA/CPU on windows.
PiperOrigin-RevId: 294337304 Change-Id: I61f0a386d2a2dbd7cd68c105d3081448bc639ddf
This commit is contained in:
parent
432ef2bee2
commit
12b968f470
@ -212,6 +212,12 @@ llvm::JITSymbol SimpleOrcJIT::FindCompiledSymbol(const std::string& name) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
// This function is used by compiler-generated code on windows, but it's not
|
||||
// declared anywhere. The signature does not matter, we just need the address.
|
||||
extern "C" void __chkstk(size_t);
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
// Register some known symbols with the CustomCallTargetRegistry.
|
||||
bool RegisterKnownJITSymbols() {
|
||||
@ -364,6 +370,10 @@ bool RegisterKnownJITSymbols() {
|
||||
reinterpret_cast<void*>(__msan_unpoison), "Host");
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
registry->Register("__chkstk", reinterpret_cast<void*>(__chkstk), "Host");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user