Skip to content

rustllvm conditional build #3701

Closed
Closed
@lucab

Description

@lucab

In rustllvm, Rustwrapper.cpp uses an external symbol (DebugFlag), which is conditionally exported by LLVM in llvm/Support/Debug.h in between an #ifndef NDEBUG block.

Unfortunately the Debian packaged llvm is currently configured to define it:

$ llvm-config --cxxflags
-I/usr/lib/llvm-3.1/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -O2 -fomit-frame-pointer -fvisibility-inlines-hidden -fno-exceptions -fPIC -Woverloaded-virtual -Wcast-qual

Thus rust fails to build. Would adding a #ifndef inside LLVMSetDebug() suffice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions