File tree 3 files changed +19
-5
lines changed
3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ re-pcre2 = []
48
48
re-onig = [" onig" ]
49
49
re-stdcpp = []
50
50
re-re2 = []
51
+ libcxx = []
51
52
re-dphobos = []
52
53
re-dphobos-dmd = [" re-dphobos" ]
53
54
re-dphobos-dmd-ct = [" re-dphobos-dmd" ]
Original file line number Diff line number Diff line change @@ -20,10 +20,20 @@ fn main() {
20
20
}
21
21
if env:: var ( "CARGO_FEATURE_RE_STDCPP" ) . is_ok ( ) {
22
22
// stdcpp is a C++ library, so we need to compile our shim layer.
23
- cc:: Build :: new ( )
24
- . cpp ( true )
25
- . file ( "src/ffi/stdcpp.cpp" )
26
- . compile ( "libcstdcpp.a" ) ;
23
+ if !env:: var ( "CARGO_FEATURE_LIBCXX" ) . is_ok ( ) {
24
+ // use default stdlib
25
+ cc:: Build :: new ( )
26
+ . cpp ( true )
27
+ . file ( "src/ffi/stdcpp.cpp" )
28
+ . compile ( "libcstdcpp.a" ) ;
29
+ } else {
30
+ // use libc++ stdlib
31
+ cc:: Build :: new ( )
32
+ . cpp ( true )
33
+ . file ( "src/ffi/stdcpp.cpp" )
34
+ . cpp_link_stdlib ( "c++" )
35
+ . compile ( "libcstdcpp.a" ) ;
36
+ }
27
37
}
28
38
if env:: var ( "CARGO_FEATURE_RE_RE2" ) . is_ok ( ) {
29
39
// RE2 is a C++ library, so we need to compile our shim layer.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
usage () {
4
- echo " Usage: $( basename $0 ) [dphobos-dmd | dphobos-ldc | dphobos-dmd-ct | dphobos-ldc-ct | rust | rust-bytes | pcre1 | pcre2 | stdcpp | re2 | onig | tcl ]" >&2
4
+ echo " Usage: $( basename $0 ) [dphobos-dmd | dphobos-ldc | dphobos-dmd-ct | dphobos-ldc-ct | rust | rust-bytes | pcre1 | pcre2 | stdcpp | stdcpp-libcxx | re2 | onig | tcl ]" >&2
5
5
exit 1
6
6
}
7
7
@@ -33,6 +33,9 @@ case $which in
33
33
stdcpp)
34
34
exec cargo bench --bench bench --features re-stdcpp " $@ "
35
35
;;
36
+ stdcpp-libcxx)
37
+ exec cargo bench --bench bench --features ' re-stdcpp libcxx' " $@ "
38
+ ;;
36
39
re2)
37
40
exec cargo bench --bench bench --features re-re2 " $@ "
38
41
;;
You can’t perform that action at this time.
0 commit comments