Skip to content

Commit

Permalink
Enforce c+11 on OSX
Browse files Browse the repository at this point in the history
Recommendation of StackOverflow - https://stackoverflow.com/questions/45047508/error-unknown-type-name-constexpr-during-make-in-mac-os-x

This will allow the snappy include to be detected, otherwise it will fail due to:

... eleveldb/c_src/system/include/snappy.h:199:10: error: unknown type name 'constexpr'
  static constexpr int kBlockLog = 16;

Also required in COMMON_FLAGS so that leveldb will compile with snappy
  • Loading branch information
martinsumner committed Sep 5, 2023
1 parent 2fd90c7 commit 458bfb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build_detect_platform
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ case "$TARGET_OS" in
IFS="$oIFS"
if [ "$1" -ge 13 ]; then
# assume clang compiler
COMMON_FLAGS="-mmacosx-version-min=10.8 -DOS_MACOSX -stdlib=libc++"
COMMON_FLAGS="-mmacosx-version-min=10.8 -DOS_MACOSX -stdlib=libc++ -std=c++11"
CFLAGS="$CFLAGS -std=c++11"
PLATFORM_LDFLAGS="-mmacosx-version-min=10.8"
else
COMMON_FLAGS="-fno-builtin-memcmp -DOS_MACOSX"
Expand Down

0 comments on commit 458bfb4

Please sign in to comment.