This repository was archived by the owner on Mar 23, 2021. It is now read-only.
File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ readme = "README.md"
9
9
keywords = [" RoaringBitmap" , " croaring" , " bitmap" ]
10
10
documentation = " https://docs.rs/croaring"
11
11
12
+ [features ]
13
+ compat = [" croaring-sys/compat" ]
14
+
12
15
[dev-dependencies ]
13
16
proptest = " 0.9"
14
17
roaring = " 0.5.2"
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ documentation = "https://docs.rs/croaring-sys"
9
9
build = " build.rs"
10
10
description = " Raw bindings to CRoaring"
11
11
12
+ [features ]
13
+ compat = []
14
+
12
15
[dependencies ]
13
16
libc = " 0.2.42"
14
17
Original file line number Diff line number Diff line change @@ -5,10 +5,19 @@ use std::env;
5
5
use std:: path:: PathBuf ;
6
6
7
7
fn main ( ) {
8
- cc:: Build :: new ( )
8
+ let mut builder = cc:: Build :: new ( ) ;
9
+ builder
9
10
. flag_if_supported ( "-std=c11" )
10
- . flag_if_supported ( "-march=native" )
11
- . flag_if_supported ( "-O3" )
11
+ . flag_if_supported ( "-O3" ) ;
12
+
13
+ if cfg ! ( feature = "compat" ) {
14
+ builder. define ( "DISABLEAVX" , Some ( "1" ) ) ;
15
+ }
16
+ else {
17
+ builder. flag_if_supported ( "-march=native" ) ;
18
+ }
19
+
20
+ builder
12
21
. file ( "CRoaring/roaring.c" )
13
22
. compile ( "libroaring.a" ) ;
14
23
You can’t perform that action at this time.
0 commit comments