Skip to content

Commit b804c24

Browse files
committed
inverse the logic in code inclusion
instead of enumerate the (long) list of platforms to exclude, use only the short list of platforms to include. should fixes __morestack symbol problem under openbsd
1 parent c85f307 commit b804c24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rustllvm/ExecutionEngineWrapper.cpp

Lines changed: 3 additions & 3 deletions
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)