From 85c90d018b5a177f2460dc3dfbefc39e7a315859 Mon Sep 17 00:00:00 2001 From: Bannerets Date: Thu, 5 Oct 2023 23:11:37 +0000 Subject: [PATCH] addon: Use C++17 The build was failing on gcc 7. --- README.md | 2 +- packages/tdl/binding.gyp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7e091c4..f86a22b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ TDLib version 1.5.0 or newer is required. - The tdjson shared library (`libtdjson.so` on Linux, `libtdjson.dylib` on macOS, `tdjson.dll` on Windows) - In some cases, a C++ compiler and Python installed to build the node addon[^1] -[^1]: `tdl` is packaged with pre-built addons for Windows (x86_64), GNU/Linux (x86_64, glibc >= 2.17), and macOS (x86_64, aarch64). If a pre-built binary is not available for your system, then the node addon will be built using node-gyp, requiring Python and a C++ toolchain (C++14 is required) to be installed (on Windows, MSVS or Build Tools). Pass `--build-from-source` to never use the pre-built binaries. Note that macOS aarch64 binaries aren't tested. +[^1]: `tdl` is packaged with pre-built addons for Windows (x86_64), GNU/Linux (x86_64, glibc >= 2.17), and macOS (x86_64, aarch64). If a pre-built binary is not available for your system, then the node addon will be built using node-gyp, requiring Python and a C++ toolchain (C++17 is required) to be installed (on Windows, MSVS or Build Tools). Pass `--build-from-source` to never use the pre-built binaries. Note that macOS aarch64 binaries aren't tested. ## Installation diff --git a/packages/tdl/binding.gyp b/packages/tdl/binding.gyp index cd12376..34cad28 100644 --- a/packages/tdl/binding.gyp +++ b/packages/tdl/binding.gyp @@ -7,7 +7,7 @@ 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'cflags': [ '-Wall', '-Wextra' ], - 'cflags_cc': [ '-Wall', '-Wextra', '-std=c++14' ], + 'cflags_cc': [ '-Wall', '-Wextra', '-std=c++17' ], 'sources': [ 'addon/td.cpp' ], @@ -29,7 +29,7 @@ 'xcode_settings': { 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden 'WARNING_CFLAGS': [ '-Wall', '-Wextra' ], - 'OTHER_CPLUSPLUSFLAGS': [ '-std=c++14' ], + 'OTHER_CPLUSPLUSFLAGS': [ '-std=c++17' ], 'MACOSX_DEPLOYMENT_TARGET': '10.14' } }]