summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-02-07 11:56:05 +0000
committerL. E. Segovia <amy@centricular.com>2024-02-08 01:29:47 +0000
commite50f5a085b81fd34fbf59ebeb3fdc64800dbe741 (patch)
tree1690f8a55496f006d48f11ca2ee00a39daa0965f
parentb765f7e3f59fa188bb29c80490ce5bc6753f66f8 (diff)
rust: Appease the linter when handling the LDFLAGS injection step
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1341>
-rw-r--r--cerbero/build/build.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/cerbero/build/build.py b/cerbero/build/build.py
index 61286954..56d25ae5 100644
--- a/cerbero/build/build.py
+++ b/cerbero/build/build.py
@@ -1285,11 +1285,10 @@ class Cargo(Build, ModifyEnvBase):
# See https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#linkers
linker = self.get_env('RUSTC_LINKER')
link_args = []
- args = iter(shlex.split(self.get_env('LDFLAGS', '')))
# We need to extract necessary linker flags from LDFLAGS which is
# passed to the compiler
- for arg in args:
- link_args += ['-C', f"link-args={arg}"]
+ for arg in shlex.split(self.get_env('LDFLAGS', '')):
+ link_args += ['-C', f"link-arg={arg}"]
s = f'[target.{self.target_triple}]\n' \
f'linker = "{linker}"\n' \
f'rustflags = {link_args!r}\n'