File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 2
2
name = " mozjs_sys"
3
3
description = " System crate for the Mozilla SpiderMonkey JavaScript engine."
4
4
repository = " https://github.com/servo/mozjs/"
5
- version = " 0.51.1 "
5
+ version = " 0.51.2 "
6
6
authors = [" Mozilla" ]
7
7
links = " mozjs"
8
8
build = " build.rs"
@@ -29,3 +29,6 @@ libz-sys = "1.0"
29
29
[build-dependencies ]
30
30
bindgen = " 0.36.1"
31
31
cc = " 1.0"
32
+
33
+ [patch .crates-io ]
34
+ libloading = { git = " https://github.com/servo/rust_libloading" , branch = " mac-crash-revert" }
Original file line number Diff line number Diff line change @@ -122,6 +122,14 @@ fn build_jsglue() {
122
122
build. flag_if_supported ( flag) ;
123
123
}
124
124
125
+ let config = format ! ( "{}/js/src/js-confdefs.h" , out. display( ) ) ;
126
+ if cfg ! ( windows) {
127
+ build. flag ( "-FI" ) ;
128
+ } else {
129
+ build. flag ( "-include" ) ;
130
+ }
131
+ build. flag ( & config) ;
132
+
125
133
build. file ( "src/jsglue.cpp" ) ;
126
134
build. include ( out. join ( "dist/include" ) ) ;
127
135
build. compile ( "jsglue" ) ;
@@ -161,14 +169,19 @@ fn build_jsapi_bindings() {
161
169
162
170
if let Ok ( flags) = env:: var ( "CXXFLAGS" ) {
163
171
for flag in flags. split_whitespace ( ) {
164
- builder = builder. clang_arg ( flag) ;
172
+ if !flag. starts_with ( "--sysroot" ) {
173
+ builder = builder. clang_arg ( flag) ;
174
+ }
165
175
}
166
176
}
167
177
168
178
for flag in cc_flags ( ) {
169
179
builder = builder. clang_arg ( flag) ;
170
180
}
171
181
182
+ builder = builder. clang_arg ( "-include" ) ;
183
+ builder = builder. clang_arg ( out. join ( "js/src/js-confdefs.h" ) . to_str ( ) . expect ( "UTF-8" ) ) ;
184
+
172
185
println ! ( "Generting bindings {:?}." , builder. command_line_flags( ) ) ;
173
186
174
187
for ty in UNSAFE_IMPL_SYNC_TYPES {
You can’t perform that action at this time.
0 commit comments