]> git.proxmox.com Git - rustc.git/commitdiff
cargo wrapper: ensure debug symbols are not stripped
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 25 Jun 2024 12:24:05 +0000 (14:24 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 25 Jun 2024 12:32:25 +0000 (14:32 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/bin/cargo

index 3cd86db41494eb045b386c325250c3f0c162c605..4b66dafd36bcc43838512a5e22b1f9fbbec888ac 100755 (executable)
@@ -91,7 +91,7 @@ def prepare_debian(cargo_home, registry, cratespec, host_gnu_type, ldflags, link
     elif not os.path.exists(registry_path):
         raise ValueError("non-existent registry: %s" % registry)
 
-    rustflags = "-C debuginfo=2 --cap-lints warn".split()
+    rustflags = "-C debuginfo=2 -C strip=none --cap-lints warn".split()
     rustflags.extend(["-C", "linker=%s-gcc" % host_gnu_type])
     for f in ldflags:
         rustflags.extend(["-C", "link-arg=%s" % f])
@@ -123,6 +123,9 @@ directory = "{0}"
 
 [build]
 rustflags = {1}
+
+[profile.release]
+debug = true
 """.format(registry_path, repr(rustflags)))
 
     return 0