@@ -41,6 +41,8 @@ const SOURCE_FILES: [&str; 18] = [
4141 "cpp/vector_buffer.cpp" ,
4242] ;
4343
44+ const FFI_INCLUDE : & str = "../vortex-ffi/cinclude" ;
45+
4446const DOWNLOAD_MAX_RETRIES : i32 = 3 ;
4547const DOWNLOAD_TIMEOUT : u64 = 90 ;
4648
@@ -302,6 +304,7 @@ fn c2rust(crate_dir: &Path, duckdb_include_dir: &Path) {
302304 . rustified_non_exhaustive_enum ( "DUCKDB_TYPE" )
303305 . size_t_is_usize ( true )
304306 . clang_arg ( format ! ( "-I{}" , duckdb_include_dir. display( ) ) )
307+ . clang_arg ( format ! ( "-I{}" , crate_dir. join( FFI_INCLUDE ) . display( ) ) )
305308 . clang_arg ( format ! ( "-I{}" , crate_dir. join( "cpp/include" ) . display( ) ) )
306309 . generate_comments ( true )
307310 // Tell cargo to invalidate the built crate whenever any of the
@@ -329,12 +332,18 @@ fn c2rust(crate_dir: &Path, duckdb_include_dir: &Path) {
329332}
330333
331334fn cpp ( duckdb_include_dir : & Path ) {
335+ //println!("cargo:rustc-link-arg=-fsanitize=address");
332336 cc:: Build :: new ( )
333337 . std ( "c++20" )
334- . flags ( [ "-Wall" , "-Wextra" , "-Wpedantic" ] )
338+ // Duckdb sources fail -Wno-unused-parameter
339+ . flags ( [ "-Wall" , "-Wextra" , "-Wpedantic" , "-Wno-unused-parameter" ] )
340+ // TODO
341+ //.flag("-fsanitize=address")
335342 . cpp ( true )
343+ . debug ( true )
336344 . include ( duckdb_include_dir)
337345 . include ( "cpp/include" )
346+ . include ( FFI_INCLUDE )
338347 . files ( SOURCE_FILES )
339348 . compile ( "vortex-duckdb-extras" ) ;
340349 // bindgen generates rerun-if-changed for .h/.hpp files
0 commit comments