From 333cc1f06f7713e1d58b9b122b809b68beadbcb4 Mon Sep 17 00:00:00 2001 From: om-ghante Date: Tue, 3 Nov 2026 23:23:51 +0530 Subject: [PATCH] build: remove duplicate C++ standard flags from LIEF LIEF's lief.gyp explicitly sets -std=gnu++17 in cflags_cc and xcode_settings, while common.gypi already sets -std=gnu++20 project-wide. This results in both flags being passed to the compiler (-std=gnu++20 -std=gnu++17). Since the last flag wins, LIEF was silently compiling as C++17 instead of the intended project-wide C++20. Remove the explicit -std=gnu++17 flags from cflags_cc and xcode_settings.OTHER_CPLUSPLUSFLAGS, and the msvs_settings LanguageStandard override (stdcpp17), so LIEF uses the project-wide C++20 standard. Fixes: https://github.com/nodejs/node/issues/62129 Assisted-by: Antigravity Signed-off-by: om-ghante --- deps/LIEF/lief.gyp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/deps/LIEF/lief.gyp b/deps/LIEF/lief.gyp index 288a4af03978..b156f4c682a9 100644 --- a/deps/LIEF/lief.gyp +++ b/deps/LIEF/lief.gyp @@ -565,14 +565,7 @@ 'cflags': [ '-fPIC' ], - # We need c++17 to compile without std::format and avoid conflicts with spdlog. - 'msvs_settings': { - 'VCCLCompilerTool': { - 'LanguageStandard': 'stdcpp17', - }, - }, 'cflags_cc': [ - '-std=gnu++17', '-fPIC', '-fvisibility=hidden', '-fvisibility-inlines-hidden', @@ -585,7 +578,6 @@ ], 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS': [ - '-std=gnu++17', '-fPIC', '-fvisibility=hidden', '-fvisibility-inlines-hidden',