File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
2
3
+ // backtrace-rs requires a feature check on Android targets, so
4
+ // we need to run its build.rs as well. Note that we use an
5
+ // include! rather than #[path = ""] because backtrace-rs's main
6
+ // function is private.
7
+ #[ allow( unused_extern_crates) ]
8
+ mod backtrace_rs_build_rs {
9
+ include ! ( "../backtrace/build.rs" ) ;
10
+
11
+ #[ inline]
12
+ pub fn call_main ( ) {
13
+ main ( ) ;
14
+ }
15
+ }
16
+
3
17
fn main ( ) {
4
18
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
5
19
let target = env:: var ( "TARGET" ) . expect ( "TARGET was not set" ) ;
@@ -49,4 +63,6 @@ fn main() {
49
63
}
50
64
println ! ( "cargo:rustc-env=STD_ENV_ARCH={}" , env:: var( "CARGO_CFG_TARGET_ARCH" ) . unwrap( ) ) ;
51
65
println ! ( "cargo:rustc-cfg=backtrace_in_libstd" ) ;
66
+
67
+ backtrace_rs_build_rs:: call_main ( ) ;
52
68
}
Original file line number Diff line number Diff line change
1
+ // Used from backtrace-rs' build script to detect the value of the `__ANDROID_API__`
2
+ // builtin #define
3
+
4
+ APIVERSION __ANDROID_API__
You can’t perform that action at this time.
0 commit comments