summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorL. E. Segovia <amy@amyspark.me>2025-08-03 14:25:17 -0300
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-08-25 22:49:37 +0300
commit84c1791a011e4c07ec13cb98d5663b42ce39a18b (patch)
treee40bc57e194feb2dfcbc49fc0b17c5a68d9a99c3 /mesonbuild/backend/backends.py
parent79f17fa86352f3fc041081c783a63d51543eadf4 (diff)
downloadmeson-84c1791a011e4c07ec13cb98d5663b42ce39a18b.tar.gz
linkers: Fix dsymutil being unable to symbolicate binaries with LTO
According to https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-flto, the -object_path_lto flag is needed to preserve the intermediate object files.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 8fe696e4a..9a7700618 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1570,6 +1570,15 @@ class Backend:
cmd = [i.replace('\\', '/') if isinstance(i, str) else i for i in cmd]
return inputs, outputs, cmd
+ def transform_link_args(self, target: build.BuildTarget, args: list[str]) -> list[str]:
+ resolved_args = []
+ for i in args:
+ if '@PRIVATE_DIR@' in i:
+ pdir = self.get_target_private_dir(target)
+ i = i.replace('@PRIVATE_DIR@', pdir)
+ resolved_args.append(i)
+ return resolved_args
+
def get_introspect_command(self) -> str:
return ' '.join(shlex.quote(x) for x in self.environment.get_build_command() + ['introspect'])