mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #23095 - jdm:mozjsprofiling, r=jdm
Use mozjs profiling feature when building with frame pointer enabled This makes it possible to get more meaningful profiles with #23080. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix part of #23081 - [x] There are no tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23095) <!-- Reviewable:end -->
This commit is contained in:
commit
7b8a898ac2
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