[llvm-bugs] [Bug 32870] New: libcxx/src/debug.cpp and libcxxabi/src/stdlib_exception.cpp are inconsistent wrt _LIBCPP_BUILDING_LIBRARY

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 1 13:57:46 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32870

            Bug ID: 32870
           Summary: libcxx/src/debug.cpp and
                    libcxxabi/src/stdlib_exception.cpp are inconsistent
                    wrt _LIBCPP_BUILDING_LIBRARY
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

stdlib_exception.cpp does:

#define _LIBCPP_BUILDING_LIBRARY
#define _LIBCPP_BUILDING_NEW
#include <new>
#include <exception>


debug.cpp does:

#include "__config"
#include "__debug"


If you don't manually define _LIBCPP_BUILDING_LIBRARY while building debug.cpp
(done in CMakeLists.txt, but we have our own BUILD.gn for libc++), then you get
a bunch of errors. Either way is fine, but shouldn't libc++ and libc++abi be
consistent about if they want this to be defined via a -D switch or if they
define it themselves where needed?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170501/0fe473eb/attachment.html>


More information about the llvm-bugs mailing list