aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/build_commands.py
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-03-22 16:04:24 -0400
committerJosh Matthews <josh@joshmatthews.net>2019-03-25 16:13:56 -0400
commit896aae1c1410256fcfa46a7f11cf38f6b766359a (patch)
treea7e16416ff4df320c8ca5a1bd24f187933057708 /python/servo/build_commands.py
parentf45bea7e7c6924fa3120521b496fb9cc161dcbef (diff)
downloadservo-896aae1c1410256fcfa46a7f11cf38f6b766359a.tar.gz
servo-896aae1c1410256fcfa46a7f11cf38f6b766359a.zip
Add mozjs feature for profiling.
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r--python/servo/build_commands.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index 63a91c677dc..3db788a0be5 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -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.")