Skip to content

Commit

Permalink
android/ohos: Fix wrong production cfg (servo#33488)
Browse files Browse the repository at this point in the history
Our build script sets `servo_production` and not `production`.

Signed-off-by: Jonathan Schwender <[email protected]>
  • Loading branch information
jschwe authored Sep 18, 2024
1 parent bd632fc commit 313fc66
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions ports/servoshell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,3 @@ sig = "1.0"
webxr = { git = "https://github.com/servo/webxr", features = ["ipc", "glwindow", "headless", "openxr-api"] }
windows-sys = { workspace = true, features = ["Win32_Graphics_Gdi"] }
libservo = { path = "../../components/servo", features = ["no-wgl"] }

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(production)'] }
2 changes: 1 addition & 1 deletion ports/servoshell/egl/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub extern "C" fn Java_org_servo_servoview_JNIServo_init<'local>(

// We only redirect stdout and stderr for non-production builds, since it is
// only used for debugging purposes. This saves us one thread in production.
#[cfg(not(production))]
#[cfg(not(servo_production))]
if let Err(e) = super::log::redirect_stdout_and_stderr() {
error!("Failed to redirect stdout and stderr to logcat due to: {e:?}");
}
Expand Down
2 changes: 1 addition & 1 deletion ports/servoshell/egl/ohos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ fn initialize_logging_once() {

// We only redirect stdout and stderr for non-production builds, since it is
// only used for debugging purposes. This saves us one thread in production.
#[cfg(not(production))]
#[cfg(not(servo_production))]
if let Err(e) = super::log::redirect_stdout_and_stderr() {
error!("Failed to redirect stdout and stderr to hilog due to: {e:?}");
}
Expand Down

0 comments on commit 313fc66

Please sign in to comment.