Skip to content

Commit

Permalink
Merge bitcoin#21869: depends: Add missing -D_LIBCPP_DEBUG=1 to debug …
Browse files Browse the repository at this point in the history
…flags

fa9249a depends: Add missing -D_LIBCPP_DEBUG=1 to debug flags (MarcoFalke)

Pull request description:

  Commands that can be used for testing:

  ```
  $ cat 1.cpp
  #include <vector>

  int main() {
    std::vector<int> foo;
    foo.begin() + 7;
  }
  ```

  ```
  clang++ -stdlib=libc++ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1 -Wall 1.cpp -o exe && ./exe
  g++                    -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1 -Wall 1.cpp -o exe && ./exe

ACKs for top commit:
  practicalswift:
    cr ACK fa9249a: patch looks correct
  fanquake:
    ACK fa9249a - was going to suggest adding this to the macOS CPP flags as well, however it seems doing that is less straight forward. Could be looked at by someone in a followup.

Tree-SHA512: 2ffbaaf0ccb36bcc9fa1a15426566406c6115c8878ff211a4794d982c5d198672d444a20f6c7ae9f341193f6d8118c7cc50896daf98af9553834379e47ddb39e
  • Loading branch information
fanquake authored and PastaPastaPasta committed Jun 28, 2021
1 parent 9580f65 commit 63a921f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion depends/hosts/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ linux_release_CXXFLAGS=$(linux_release_CFLAGS)
linux_debug_CFLAGS=-O1
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)

linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1

ifeq (86,$(findstring 86,$(build_arch)))
i686_linux_CC=gcc -m32
Expand Down

0 comments on commit 63a921f

Please sign in to comment.