Skip to content

Commit

Permalink
fixes __morestack symbol problem on BSDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Huseby committed Jun 10, 2015
1 parent 01ab4f7 commit 5b2edcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rustllvm/ExecutionEngineWrapper.cpp
Expand Up @@ -17,7 +17,7 @@ using namespace llvm::sys;
using namespace llvm::object;

// libmorestack is not used on Windows
#ifndef _WIN32
#if !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__Bitrig__)
extern "C" void __morestack(void);

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

uint64_t getSymbolAddress(const std::string &Name) override
{
#ifndef _WIN32
#if !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__Bitrig__)
if (Name == "__morestack" || Name == "___morestack")
return reinterpret_cast<uint64_t>(__morestack);
if (Name == "__morestack_addr" || Name == "___morestack_addr")
Expand Down

0 comments on commit 5b2edcd

Please sign in to comment.