mirror of
https://github.com/servo/servo.git
synced 2025-06-29 03:23:41 +01:00
Add mozjs feature for profiling.
This commit is contained in:
parent
f45bea7e7c
commit
896aae1c14
5 changed files with 16 additions and 12 deletions
|
@ -283,6 +283,7 @@ class MachCommands(CommandBase):
|
|||
|
||||
opts += ["--target", target]
|
||||
|
||||
env = self.build_env(target=target, is_build=True)
|
||||
self.ensure_bootstrapped(target=target)
|
||||
self.ensure_clobbered()
|
||||
|
||||
|
@ -291,6 +292,10 @@ class MachCommands(CommandBase):
|
|||
if debug_mozjs:
|
||||
features += ["debugmozjs"]
|
||||
|
||||
if with_frame_pointer:
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C force-frame-pointers=yes"
|
||||
features += ["profilemozjs"]
|
||||
|
||||
if self.config["build"]["webgl-backtrace"]:
|
||||
features += ["webgl-backtrace"]
|
||||
if self.config["build"]["dom-backtrace"]:
|
||||
|
@ -300,15 +305,11 @@ class MachCommands(CommandBase):
|
|||
opts += ["--features", "%s" % ' '.join(features)]
|
||||
|
||||
build_start = time()
|
||||
env = self.build_env(target=target, is_build=True)
|
||||
env["CARGO_TARGET_DIR"] = target_path
|
||||
|
||||
if with_debug_assertions:
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
|
||||
|
||||
if with_frame_pointer:
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C force-frame-pointers=yes"
|
||||
|
||||
if android:
|
||||
if "ANDROID_NDK" not in env:
|
||||
print("Please set the ANDROID_NDK environment variable.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue