From 896aae1c1410256fcfa46a7f11cf38f6b766359a Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 22 Mar 2019 16:04:24 -0400 Subject: Add mozjs feature for profiling. --- python/servo/build_commands.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'python/servo/build_commands.py') 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.") -- cgit v1.2.3