rustflags.extend(["-C", "linker=%s-gcc" % host_gnu_type])
for f in ldflags:
rustflags.extend(["-C", "link-arg=%s" % f])
+ ## TODO: Right now, we incorrectly point to SYSTEM_REGISTRY in the debug
+ # symbols for this Debian cargo package itself. This is because we use
+ # SYSTEM_REGISTRY below, but instead we should rather point to /usr/src
+ # (and add a cargo-src package that uses this path).
rustflags.extend(["--remap-path-prefix",
"%s=%s/%s" % (sourcepath(), SYSTEM_REGISTRY, cratespec.replace("_", "-"))])