File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ endif()
4242
4343include (limit_jobs )
4444# Configure Seastar compile options to align with Scylla
45+ if (DEFINED ENV{NIX_CC})
46+ add_compile_definitions (FMT_USE_CONSTEVAL=0 )
47+ endif ()
4548set (CMAKE_CXX_STANDARD "23" CACHE INTERNAL "" )
4649set (CMAKE_CXX_EXTENSIONS ON CACHE INTERNAL "" )
4750set (CMAKE_CXX_SCAN_FOR_MODULES OFF CACHE INTERNAL "" )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ set(disabled_warnings
66 overloaded-virtual
77 unsupported-friend
88 enum-constexpr-conversion
9+ unnecessary-virtual-specifier
910 unused-parameter)
1011include (CheckCXXCompilerFlag )
1112foreach (warning ${disabled_warnings} )
Original file line number Diff line number Diff line change @@ -1548,6 +1548,7 @@ def get_warning_options(cxx):
15481548 '-Wno-unsupported-friend' ,
15491549 '-Wno-missing-field-initializers' ,
15501550 '-Wno-deprecated-copy' ,
1551+ '-Wno-unnecessary-virtual-specifier' ,
15511552 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728
15521553 '-Wno-psabi' ,
15531554 '-Wno-enum-constexpr-conversion' ,
@@ -1675,6 +1676,9 @@ def dynamic_linker_option():
16751676if args .target != '' :
16761677 user_cflags += ' -march=' + args .target
16771678
1679+ if os .environ .get ('NIX_CC' ):
1680+ user_cflags += ' -DFMT_USE_CONSTEVAL=0'
1681+
16781682for mode in modes :
16791683 # Those flags are passed not only to Scylla objects, but also to libraries
16801684 # that we compile ourselves.
Original file line number Diff line number Diff line change 3939 lib = pkgs . lib ;
4040 llvm = pkgs . llvmPackages ;
4141
42+ antlr3Cpp = pkgs . antlr3 . overrideAttrs ( old : {
43+ postInstall = ( old . postInstall or "" ) + ''
44+ sed -i \
45+ -e 's/const ANTLR_INT32[[:space:]]*m_decisionNumber;/ANTLR_INT32 m_decisionNumber;/' \
46+ -e 's/const ANTLR_INT32\* const[[:space:]]*m_eot;/const ANTLR_INT32* m_eot;/' \
47+ -e 's/const ANTLR_INT32\* const[[:space:]]*m_eof;/const ANTLR_INT32* m_eof;/' \
48+ -e 's/const ANTLR_INT32\* const[[:space:]]*m_min;/const ANTLR_INT32* m_min;/' \
49+ -e 's/const ANTLR_INT32\* const[[:space:]]*m_max;/const ANTLR_INT32* m_max;/' \
50+ -e 's/const ANTLR_INT32\* const[[:space:]]*m_accept;/const ANTLR_INT32* m_accept;/' \
51+ -e 's/const ANTLR_INT32\* const[[:space:]]*m_special;/const ANTLR_INT32* m_special;/' \
52+ -e 's/const ANTLR_INT32\* const \*const[[:space:]]*m_transition;/const ANTLR_INT32* const * m_transition;/' \
53+ "$out/include/antlr3cyclicdfa.hpp"
54+ '' ;
55+ } ) ;
56+
4257 pythonEnv = pkgs . python3 . withPackages (
4358 ps : with ps ; [
4459 aiohttp
107122 flake = true ;
108123 shell = true ;
109124 srcPath = self ;
110- antlr3Package = pkgs . antlr3 ;
125+ antlr3Package = antlr3Cpp ;
111126 fmtPackage = pkgs . fmt_10 . overrideAttrs ( old : {
112127 cmakeFlags = ( old . cmakeFlags or [ ] ) ++ [
113128 "-DFMT_TEST=OFF"
You can’t perform that action at this time.
0 commit comments