Add an optional --debug-mozjs argument to mach build that enables a non-optimized, debug build of mozjs and rust-mozjs. Update the Cargo snapshot to enable new feature support.

This commit is contained in:
Josh Matthews 2014-10-10 15:46:03 -04:00
parent a258746269
commit a1b2f4b590
9 changed files with 38 additions and 24 deletions

8
Cargo.lock generated
View file

@ -263,9 +263,9 @@ dependencies = [
[[package]] [[package]]
name = "js" name = "js"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-mozjs#0d1700b4bb5981f75a4c75b7df75d8f28e499479" source = "git+https://github.com/servo/rust-mozjs#1ec216a2577c03738fa11a78958bb2a0fd3f7fbd"
dependencies = [ dependencies = [
"mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)", "mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#0dd618fcc78fe7aa64e4e2a3b0f7f0d8a2f0f08a)",
] ]
[[package]] [[package]]
@ -319,7 +319,7 @@ source = "git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb93
[[package]] [[package]]
name = "mozjs-sys" name = "mozjs-sys"
version = "0.0.0" version = "0.0.0"
source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88" source = "git+https://github.com/servo/mozjs#0dd618fcc78fe7aa64e4e2a3b0f7f0d8a2f0f08a"
[[package]] [[package]]
name = "msg" name = "msg"
@ -396,7 +396,7 @@ dependencies = [
"gfx 0.0.1", "gfx 0.0.1",
"html5ever 0.0.0 (git+https://github.com/servo/html5ever?ref=servo#0bdd6087dc8df6a92c96e1859bbb4ebbb0be7c1f)", "html5ever 0.0.0 (git+https://github.com/servo/html5ever?ref=servo#0bdd6087dc8df6a92c96e1859bbb4ebbb0be7c1f)",
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)", "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#0d1700b4bb5981f75a4c75b7df75d8f28e499479)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#1ec216a2577c03738fa11a78958bb2a0fd3f7fbd)",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",

View file

@ -13,17 +13,17 @@
//! "CSS 2.1" or "CSS 2.2" refers to the editor's draft of the W3C "Cascading Style Sheets Level 2 //! "CSS 2.1" or "CSS 2.2" refers to the editor's draft of the W3C "Cascading Style Sheets Level 2
//! Revision 2 (CSS 2.2) Specification" available here: //! Revision 2 (CSS 2.2) Specification" available here:
//! //!
//! http://dev.w3.org/csswg/css2/ //! http://dev.w3.org/csswg/css2/
//! //!
//! "INTRINSIC" refers to L. David Baron's "More Precise Definitions of Inline Layout and Table //! "INTRINSIC" refers to L. David Baron's "More Precise Definitions of Inline Layout and Table
//! Layout" available here: //! Layout" available here:
//! //!
//! http://dbaron.org/css/intrinsic/ //! http://dbaron.org/css/intrinsic/
//! //!
//! "CSS-SIZING" refers to the W3C "CSS Intrinsic & Extrinsic Sizing Module Level 3" document //! "CSS-SIZING" refers to the W3C "CSS Intrinsic & Extrinsic Sizing Module Level 3" document
//! available here: //! available here:
//! //!
//! http://dev.w3.org/csswg/css-sizing/ //! http://dev.w3.org/csswg/css-sizing/
#![deny(unsafe_block)] #![deny(unsafe_block)]

View file

@ -7,7 +7,7 @@
//! This follows the "More Precise Definitions of Inline Layout and Table Layout" proposal written //! This follows the "More Precise Definitions of Inline Layout and Table Layout" proposal written
//! by L. David Baron (Mozilla) here: //! by L. David Baron (Mozilla) here:
//! //!
//! http://dbaron.org/css/intrinsic/ //! http://dbaron.org/css/intrinsic/
//! //!
//! Hereafter this document is referred to as INTRINSIC. //! Hereafter this document is referred to as INTRINSIC.

View file

@ -9,6 +9,9 @@ build = "make -f makefile.cargo"
name = "script" name = "script"
path = "lib.rs" path = "lib.rs"
[features]
debugmozjs = ['js/debugmozjs']
[dependencies.plugins] [dependencies.plugins]
path = "../plugins" path = "../plugins"

View file

@ -583,29 +583,29 @@ fn matches_compound_selector<'a,E,N>(selector: &CompoundSelector,
/// A result of selector matching, includes 3 failure types, /// A result of selector matching, includes 3 failure types,
/// ///
/// NotMatchedAndRestartFromClosestLaterSibling /// NotMatchedAndRestartFromClosestLaterSibling
/// NotMatchedAndRestartFromClosestDescendant /// NotMatchedAndRestartFromClosestDescendant
/// NotMatchedGlobally /// NotMatchedGlobally
/// ///
/// When NotMatchedGlobally appears, stop selector matching completely since /// When NotMatchedGlobally appears, stop selector matching completely since
/// the succeeding selectors never matches. /// the succeeding selectors never matches.
/// It is raised when /// It is raised when
/// Child combinator cannot find the candidate element. /// Child combinator cannot find the candidate element.
/// Descendant combinator cannot find the candidate element. /// Descendant combinator cannot find the candidate element.
/// ///
/// When NotMatchedAndRestartFromClosestDescendant appears, the selector /// When NotMatchedAndRestartFromClosestDescendant appears, the selector
/// matching does backtracking and restarts from the closest Descendant /// matching does backtracking and restarts from the closest Descendant
/// combinator. /// combinator.
/// It is raised when /// It is raised when
/// NextSibling combinator cannot find the candidate element. /// NextSibling combinator cannot find the candidate element.
/// LaterSibling combinator cannot find the candidate element. /// LaterSibling combinator cannot find the candidate element.
/// Child combinator doesn't match on the found element. /// Child combinator doesn't match on the found element.
/// ///
/// When NotMatchedAndRestartFromClosestLaterSibling appears, the selector /// When NotMatchedAndRestartFromClosestLaterSibling appears, the selector
/// matching does backtracking and restarts from the closest LaterSibling /// matching does backtracking and restarts from the closest LaterSibling
/// combinator. /// combinator.
/// It is raised when /// It is raised when
/// NextSibling combinator doesn't match on the found element. /// NextSibling combinator doesn't match on the found element.
/// ///
/// For example, when the selector "d1 d2 a" is provided and we cannot *find* /// For example, when the selector "d1 d2 a" is provided and we cannot *find*
/// an appropriate ancestor node for "d1", this selector matching raises /// an appropriate ancestor node for "d1", this selector matching raises

View file

@ -257,7 +257,7 @@ dependencies = [
[[package]] [[package]]
name = "js" name = "js"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-mozjs#0d1700b4bb5981f75a4c75b7df75d8f28e499479" source = "git+https://github.com/servo/rust-mozjs#1ec216a2577c03738fa11a78958bb2a0fd3f7fbd"
dependencies = [ dependencies = [
"mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)", "mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)",
] ]
@ -390,7 +390,7 @@ dependencies = [
"gfx 0.0.1", "gfx 0.0.1",
"html5ever 0.0.0 (git+https://github.com/servo/html5ever?ref=servo#0bdd6087dc8df6a92c96e1859bbb4ebbb0be7c1f)", "html5ever 0.0.0 (git+https://github.com/servo/html5ever?ref=servo#0bdd6087dc8df6a92c96e1859bbb4ebbb0be7c1f)",
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)", "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#0d1700b4bb5981f75a4c75b7df75d8f28e499479)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#1ec216a2577c03738fa11a78958bb2a0fd3f7fbd)",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",

6
ports/cef/Cargo.lock generated
View file

@ -10,7 +10,7 @@ dependencies = [
"gfx 0.0.1", "gfx 0.0.1",
"glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#a15c2d04b8969aea653841d1d79e5fdf68de664b)", "glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#a15c2d04b8969aea653841d1d79e5fdf68de664b)",
"glfw_app 0.0.1", "glfw_app 0.0.1",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#0d1700b4bb5981f75a4c75b7df75d8f28e499479)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#1ec216a2577c03738fa11a78958bb2a0fd3f7fbd)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#eac91e00db9af155f3004b408a18cb6d9f462a25)", "layers 0.1.0 (git+https://github.com/servo/rust-layers#eac91e00db9af155f3004b408a18cb6d9f462a25)",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
@ -274,7 +274,7 @@ dependencies = [
[[package]] [[package]]
name = "js" name = "js"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-mozjs#0d1700b4bb5981f75a4c75b7df75d8f28e499479" source = "git+https://github.com/servo/rust-mozjs#1ec216a2577c03738fa11a78958bb2a0fd3f7fbd"
dependencies = [ dependencies = [
"mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)", "mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)",
] ]
@ -407,7 +407,7 @@ dependencies = [
"gfx 0.0.1", "gfx 0.0.1",
"html5ever 0.0.0 (git+https://github.com/servo/html5ever?ref=servo#0bdd6087dc8df6a92c96e1859bbb4ebbb0be7c1f)", "html5ever 0.0.0 (git+https://github.com/servo/html5ever?ref=servo#0bdd6087dc8df6a92c96e1859bbb4ebbb0be7c1f)",
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)", "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#0d1700b4bb5981f75a4c75b7df75d8f28e499479)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#1ec216a2577c03738fa11a78958bb2a0fd3f7fbd)",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",

View file

@ -108,7 +108,7 @@ class MachCommands(CommandBase):
tgz_file = "cargo-nightly-%s.tar.gz" % host_triple() tgz_file = "cargo-nightly-%s.tar.gz" % host_triple()
# FIXME(#3582): use https. # FIXME(#3582): use https.
nightly_url = "http://static.rust-lang.org/cargo-dist/2014-10-02/%s" % tgz_file nightly_url = "http://static.rust-lang.org/cargo-dist/2014-10-21/%s" % tgz_file
download("Cargo nightly", nightly_url, tgz_file) download("Cargo nightly", nightly_url, tgz_file)

View file

@ -31,11 +31,15 @@ class MachCommands(CommandBase):
default=None, default=None,
action='store_true', action='store_true',
help='Build for Android') help='Build for Android')
@CommandArgument('--debug-mozjs',
default=None,
action='store_true',
help='Enable debug assertions in mozjs')
@CommandArgument('--verbose', '-v', @CommandArgument('--verbose', '-v',
action='store_true', action='store_true',
help='Print verbose output') help='Print verbose output')
def build(self, target=None, release=False, jobs=None, android=None, def build(self, target=None, release=False, jobs=None, android=None,
verbose=False): verbose=False, debug_mozjs=False):
self.ensure_bootstrapped() self.ensure_bootstrapped()
if android is None: if android is None:
@ -51,6 +55,13 @@ class MachCommands(CommandBase):
if verbose: if verbose:
opts += ["-v"] opts += ["-v"]
features = []
if debug_mozjs:
features += ["script/debugmozjs"]
if features:
opts += ["--features", "%s" % ' '.join(features)]
build_start = time() build_start = time()
if android: if android:
make_opts = [] make_opts = []