Skip to content

Commit b26eeff

Browse files
committed
Auto merge of #26213 - semarie:openbsd-morestack, r=alexcrichton
don't try to bind __morestack symbol under OpenBSD as the platform don't have morestack support. r? @alexcrichton it unbreak build under OpenBSD. Does some others platforms don't have morestack too ? They should be impacted by this problem too.
2 parents e89bb24 + b804c24 commit b26eeff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rustllvm/ExecutionEngineWrapper.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ using namespace llvm;
1616
using namespace llvm::sys;
1717
using namespace llvm::object;
1818

19-
// libmorestack is not used on Windows
20-
#if !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__Bitrig__)
19+
// libmorestack is not used on other platforms
20+
#if defined(__linux__) || defined(__APPLE__)
2121
extern "C" void __morestack(void);
2222

2323
static void* morestack_addr() {
@@ -35,7 +35,7 @@ class RustJITMemoryManager : public SectionMemoryManager
3535

3636
uint64_t getSymbolAddress(const std::string &Name) override
3737
{
38-
#if !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__Bitrig__)
38+
#if defined(__linux__) || defined(__APPLE__)
3939
if (Name == "__morestack" || Name == "___morestack")
4040
return reinterpret_cast<uint64_t>(__morestack);
4141
if (Name == "__morestack_addr" || Name == "___morestack_addr")

0 commit comments

Comments
 (0)