From 9bc78054b675b320bb980de14cabd0a2240d2ac9 Mon Sep 17 00:00:00 2001 From: Toyo Li Date: Fri, 19 Jan 2024 21:04:38 +0800 Subject: [PATCH] refactor for readability Co-authored-by: Christian Clauss --- pylib/gyp/generator/make.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py index 3036a089..ba9be4ba 100644 --- a/pylib/gyp/generator/make.py +++ b/pylib/gyp/generator/make.py @@ -2449,9 +2449,11 @@ def CalculateMakefilePath(build_file, base_name): makedep_arguments = "-MMD" # some linkers don't support --start-group/--end-group (e.g. wasm-ld) - link_commands = LINK_COMMANDS_LINUX.replace(' -Wl,--start-group', '').replace( - ' -Wl,--end-group', '' - ) if gyp.common.CrossCompileRequested() else LINK_COMMANDS_LINUX + link_commands = LINK_COMMANDS_LINUX + if gyp.common.CrossCompileRequested(): + link_commands = link_commands.replace(' -Wl,--start-group', '').replace( + ' -Wl,--end-group', '' + ) header_params = { "default_target": default_target,