mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
util: Turn on ndebug
in release mode, and fix task-state to not crash
when `ndebug` is on.
This commit is contained in:
parent
4863eb65e9
commit
fda3791487
2 changed files with 12 additions and 5 deletions
|
@ -34,11 +34,13 @@ default = ["glutin_app", "window"]
|
||||||
window = ["glutin_app/window"]
|
window = ["glutin_app/window"]
|
||||||
headless = ["glutin_app/headless"]
|
headless = ["glutin_app/headless"]
|
||||||
|
|
||||||
[profile.release]
|
# Uncomment to profile on Linux:
|
||||||
opt-level = 3
|
#
|
||||||
debug = true
|
# [profile.release]
|
||||||
rpath = false
|
# opt-level = 3
|
||||||
lto = false
|
# debug = true
|
||||||
|
# rpath = false
|
||||||
|
# lto = false
|
||||||
|
|
||||||
[dependencies.compositing]
|
[dependencies.compositing]
|
||||||
path = "../compositing"
|
path = "../compositing"
|
||||||
|
|
|
@ -26,9 +26,14 @@ bitflags! {
|
||||||
macro_rules! task_types ( ( $( $fun:ident = $flag:ident ; )* ) => (
|
macro_rules! task_types ( ( $( $fun:ident = $flag:ident ; )* ) => (
|
||||||
impl TaskState {
|
impl TaskState {
|
||||||
$(
|
$(
|
||||||
|
#[cfg(not(ndebug))]
|
||||||
pub fn $fun(self) -> bool {
|
pub fn $fun(self) -> bool {
|
||||||
self.contains($flag)
|
self.contains($flag)
|
||||||
}
|
}
|
||||||
|
#[cfg(ndebug)]
|
||||||
|
pub fn $fun(self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue