@@ -17,6 +17,10 @@ def get_c_compiler_counterpart(compiler: str) -> str:
1717def build (runner : MatrixRunner ):
1818 if platform .system () == "Linux" :
1919 matrix = runner .current_config ()
20+ if "stdlib" in matrix and matrix ["stdlib" ] == "libc++" :
21+ gtest_path = "/tmp/gtest_install_libcxx"
22+ else :
23+ gtest_path = "/tmp/gtest_install"
2024 args = [
2125 "cmake" ,
2226 ".." ,
@@ -35,6 +39,8 @@ def build(runner: MatrixRunner):
3539 f"-DCPPTRACE_USE_EXTERNAL_LIBDWARF=On" ,
3640 f"-DCPPTRACE_USE_EXTERNAL_ZSTD=On" ,
3741 f"-DCPPTRACE_USE_EXTERNAL_GTEST=On" ,
42+ f"-DCMAKE_PREFIX_PATH={ gtest_path } " ,
43+ * (["-DCMAKE_CXX_FLAGS=-stdlib=libc++" ] if "stdlib" in matrix and matrix ["stdlib" ] == "libc++" else [])
3844 ]
3945 return runner .run_command (* args ) and runner .run_command ("ninja" )
4046 elif platform .system () == "Darwin" :
@@ -87,6 +93,7 @@ def build_and_test(runner: MatrixRunner):
8793 if (
8894 last is None
8995 or last ["compiler" ] != current ["compiler" ]
96+ or ("stdlib" in current and last ["stdlib" ] != current ["stdlib" ])
9097 or (platform .system () == "Darwin" and last ["sanitizers" ] != current ["sanitizers" ])
9198 ) and os .path .exists ("build" ):
9299 shutil .rmtree ("build" , ignore_errors = True )
@@ -107,15 +114,26 @@ def build_and_test(runner: MatrixRunner):
107114def run_linux_matrix ():
108115 MatrixRunner (
109116 matrix = {
110- "compiler" : ["g++-10" , "clang++-14" ],
117+ "compiler" : ["g++-10" , "clang++-18" ],
118+ "stdlib" : ["libstdc++" , "libc++" ],
111119 "sanitizers" : ["OFF" , "ON" ],
112120 "build_type" : ["Debug" , "RelWithDebInfo" ],
113121 "shared" : ["OFF" , "ON" ],
114122 "has_dl_find_object" : ["OFF" , "ON" ],
115123 "split_dwarf" : ["OFF" , "ON" ],
116124 "dwarf_version" : ["4" , "5" ],
117125 },
118- exclude = []
126+ exclude = [
127+ {
128+ "compiler" : "g++-10" ,
129+ "stdlib" : "libc++" ,
130+ },
131+ {
132+ # need to workaround https://github.com/llvm/llvm-project/issues/59432 later
133+ "stdlib" : "libc++" ,
134+ "sanitizers" : "ON" ,
135+ },
136+ ]
119137 ).run (build_and_test )
120138
121139def run_macos_matrix ():
0 commit comments