From 8b35c4094a44e3d47ebfa5c7ff11b15ec6b22b05 Mon Sep 17 00:00:00 2001 From: Samson <16504129+sagudev@users.noreply.github.com> Date: Sun, 16 Jun 2024 11:24:07 +0200 Subject: Add `--with-asan` (#31429) --- python/servo/post_build_commands.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python/servo/post_build_commands.py') diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 8e6c10c84c0..0671a42611a 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -80,7 +80,7 @@ class PostBuildCommands(CommandBase): help="Command-line arguments to be passed through to Servo") @CommandBase.common_command_arguments(build_configuration=False, build_type=True) def run(self, params, build_type: BuildType, android=None, debugger=False, debugger_cmd=None, - headless=False, software=False, bin=None, emulator=False, usb=False, nightly=None): + headless=False, software=False, bin=None, emulator=False, usb=False, nightly=None, with_asan=False): env = self.build_env() env["RUST_BACKTRACE"] = "1" if software: @@ -133,7 +133,7 @@ class PostBuildCommands(CommandBase): shell.communicate(bytes("\n".join(script) + "\n", "utf8")) return shell.wait() - args = [bin or self.get_nightly_binary_path(nightly) or self.get_binary_path(build_type)] + args = [bin or self.get_nightly_binary_path(nightly) or self.get_binary_path(build_type, asan=with_asan)] if headless: args.append('-z') @@ -205,12 +205,12 @@ class PostBuildCommands(CommandBase): 'params', nargs='...', help="Command-line arguments to be passed through to Servo") @CommandBase.common_command_arguments(build_configuration=False, build_type=True) - def rr_record(self, build_type: BuildType, bin=None, nightly=None, params=[]): + def rr_record(self, build_type: BuildType, bin=None, nightly=None, with_asan=False, params=[]): env = self.build_env() env["RUST_BACKTRACE"] = "1" servo_cmd = [bin or self.get_nightly_binary_path(nightly) - or self.get_binary_path(build_type)] + params + or self.get_binary_path(build_type, asan=with_asan)] + params rr_cmd = ['rr', '--fatal-errors', 'record'] try: check_call(rr_cmd + servo_cmd) -- cgit v1.2.3