From df71aa2f1ef738c8970cdaae63ec15363163137c Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Sun, 21 May 2023 11:33:22 +0530 Subject: [PATCH 1/3] Avoid relinking plugin dylibs The `copy_dependencies` logic is invoking `change_non_system_libraries_path` with absolute paths to gstreamer *plugin dylibs*. `change_non_system_libraries_path` skips editing links in servo binary to relocatable dylibs, but the since the plugins have absolute paths, they are treated as 'non-relocable' and it will try to edit the *non-existent* (since plugins are loaded dynamically) link in servo bin. These unnecessary calls to change_link_name is cause of the slowness identified in #29764 This PR fixes the issue by ensuring plugins are not included in the call to change_non_system_libraries_path Signed-off-by: Mukilan Thiyagarajan --- python/servo/build_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 1f69637ad85..ed018029349 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -858,8 +858,8 @@ def copy_dependencies(binary_path, lib_path, gst_root): # Update binary libraries binary_dependencies = set(otool(binary_path)) - binary_dependencies = binary_dependencies.union(macos_plugins()) change_non_system_libraries_path(binary_dependencies, relative_path, binary_path) + binary_dependencies = binary_dependencies.union(macos_plugins()) # Update dependencies libraries need_checked = binary_dependencies From 6abee33f91d4591e333ff08de438b25599e5325b Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Sun, 21 May 2023 11:41:04 +0530 Subject: [PATCH 2/3] Print message when packaging macos dylibs --- python/servo/build_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index ed018029349..45dcef9ceec 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -631,6 +631,7 @@ class MachCommands(CommandBase): if has_media_stack: gst_root = gstreamer_root(target, env) + print("Packaging gstreamer dylibs") if not package_gstreamer_dylibs(gst_root, servo_path): return 1 From 84d13eacbda42c37b51ff6082ce705a4c868eb4c Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Sun, 21 May 2023 12:15:00 +0530 Subject: [PATCH 3/3] Count post-cargo build steps in elapsed time --- python/servo/build_commands.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 45dcef9ceec..b65321cb5d3 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -557,8 +557,6 @@ class MachCommands(CommandBase): features=features, **kwargs ) - elapsed = time() - build_start - # Do some additional things if the build succeeded if status == 0: if android and not no_package: @@ -656,6 +654,7 @@ class MachCommands(CommandBase): # Generate Desktop Notification if elapsed-time > some threshold value + elapsed = time() - build_start elapsed_delta = datetime.timedelta(seconds=int(elapsed)) build_message = f"{'Succeeded' if status == 0 else 'Failed'} in {elapsed_delta}" self.notify("Servo build", build_message)