File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,13 +8,11 @@ fn main() -> Result<(), Box<dyn Error>> {
8
8
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
9
9
println ! ( "cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS" ) ;
10
10
println ! ( "cargo:rerun-if-env-changed=CARGO_CFG_TARGET_ARCH" ) ;
11
- // While OUT_DIR is set for both build.rs and compiling the crate, PROFILE is only set in
12
- // build.rs. So, export it to crate compilation as well.
13
- let profile = env:: var ( "PROFILE" ) . unwrap ( ) ;
14
- println ! ( "cargo:rustc-env=PROFILE={profile}" ) ;
11
+
15
12
if target_os != "android" && target_arch != "wasm32" {
16
13
return Ok ( ( ) ) ;
17
14
}
15
+ let profile = env:: var ( "PROFILE" ) . unwrap ( ) ;
18
16
let mut dir = PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . unwrap ( ) ) ;
19
17
// Strip `$profile/build/*/out`.
20
18
let ok = dir. ends_with ( "out" )
You can’t perform that action at this time.
0 commit comments