File tree Expand file tree Collapse file tree 2 files changed +1824
-3
lines changed Expand file tree Collapse file tree 2 files changed +1824
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ fn main() {
39
39
} ;
40
40
41
41
// Instruct cargo to statically link quickjs.
42
- println ! ( "cargo:rustc-link-search=native=D:\\ Workspace\\ quickjspp\\ .bin\\ Release\\ x64\\ " ) ;
43
42
println ! ( "cargo:rustc-link-search=native={}" , lib) ;
44
43
println ! ( "cargo:rustc-link-lib=static={}" , LIB_NAME ) ;
45
44
@@ -124,8 +123,18 @@ fn main() {
124
123
. opt_level ( 2 )
125
124
. compile ( LIB_NAME ) ;
126
125
127
- std:: fs:: copy ( embed_path. join ( "bindings.rs" ) , out_path. join ( "bindings.rs" ) )
128
- . expect ( "Could not copy bindings.rs" ) ;
126
+ // if in 32bit target copy bindings-32.rs, else copy bindings.rs
127
+ let target = env:: var ( "TARGET" ) . unwrap ( ) ;
128
+ if target. contains ( "i686" ) {
129
+ std:: fs:: copy (
130
+ embed_path. join ( "bindings-32.rs" ) ,
131
+ out_path. join ( "bindings.rs" ) ,
132
+ )
133
+ . expect ( "Could not copy bindings-32.rs" ) ;
134
+ } else {
135
+ std:: fs:: copy ( embed_path. join ( "bindings.rs" ) , out_path. join ( "bindings.rs" ) )
136
+ . expect ( "Could not copy bindings.rs" ) ;
137
+ }
129
138
}
130
139
131
140
#[ cfg( feature = "patched" ) ]
You can’t perform that action at this time.
0 commit comments