build_compile_with_c_20_support.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Shelley Vohr <[email protected]>
  3. Date: Wed, 4 Sep 2024 16:39:23 +0200
  4. Subject: build: compile with C++20 support
  5. Refs https://github.com/nodejs/node/pull/45427
  6. V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8/+/5587859.
  7. This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.
  8. diff --git a/common.gypi b/common.gypi
  9. index 74616453e2e047acbb9e25f2f93ebeab06011669..bce15fc4a8b3f2fa0b5a588e6a2b28d2b8b6ac45 100644
  10. --- a/common.gypi
  11. +++ b/common.gypi
  12. @@ -518,7 +518,7 @@
  13. '-fno-rtti',
  14. '-fno-exceptions',
  15. '-fno-strict-aliasing',
  16. - '-std=gnu++17',
  17. + '-std=gnu++20',
  18. ],
  19. 'defines': [ '__STDC_FORMAT_MACROS' ],
  20. 'ldflags': [ '-rdynamic' ],
  21. @@ -688,7 +688,7 @@
  22. ['clang==1', {
  23. 'xcode_settings': {
  24. 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
  25. - 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17
  26. + 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++20', # -std=gnu++20
  27. 'CLANG_CXX_LIBRARY': 'libc++',
  28. },
  29. }],