@@ -33,7 +33,8 @@ fn main() {
33
33
#[ cfg( not( feature = "cuda" ) ) ]
34
34
let mut dst = Config :: new ( & xgb_root) ;
35
35
36
- let dst = dst. uses_cxx11 ( )
36
+ #[ allow( unused_mut) ]
37
+ let mut dst = dst. uses_cxx11 ( )
37
38
. define ( "BUILD_STATIC_LIB" , "ON" ) ;
38
39
39
40
#[ cfg( target_os = "macos" ) ]
@@ -54,16 +55,12 @@ fn main() {
54
55
55
56
let bindings = bindgen:: Builder :: default ( )
56
57
. header ( "wrapper.h" )
58
+ . blocklist_item ( "std::__1.*" )
57
59
. clang_args ( & [ "-x" , "c++" , "-std=c++11" ] )
58
60
. clang_arg ( format ! ( "-I{}" , xgb_root. join( "include" ) . display( ) ) )
59
61
. clang_arg ( format ! ( "-I{}" , xgb_root. join( "rabit/include" ) . display( ) ) )
60
62
. clang_arg ( format ! ( "-I{}" , xgb_root. join( "dmlc-core/include" ) . display( ) ) ) ;
61
63
62
- #[ cfg( target_os = "linux" ) ]
63
- let bindings = bindings
64
- . clang_arg ( format ! ( "-I/usr/include/c++/11" ) )
65
- . clang_arg ( format ! ( "-I/usr/include/x86_64-linux-gnu/c++/11" ) ) ;
66
-
67
64
#[ cfg( feature = "cuda" ) ]
68
65
let bindings = bindings. clang_arg ( "-I/usr/local/cuda/include" ) ;
69
66
let bindings = bindings
@@ -83,6 +80,7 @@ fn main() {
83
80
// link to appropriate C++ lib
84
81
if target. contains ( "apple" ) {
85
82
println ! ( "cargo:rustc-link-lib=c++" ) ;
83
+ println ! ( "cargo:rustc-link-search=native=/opt/homebrew/opt/libomp/lib" ) ;
86
84
println ! ( "cargo:rustc-link-lib=dylib=omp" ) ;
87
85
} else {
88
86
println ! ( "cargo:rustc-cxxflags=-std=c++17" ) ;
0 commit comments