Skip to content

Unnecessary build files left in the target directory #89

@Kobzol

Description

@Kobzol

When jemalloc-sys builds the jemalloc native dependency, it first creates a build directory on disk, then runs make and make install, which installs a copy of the built libs into a lib directory, amongst other things. However, after the build finishes, the build directory is still kept on disk. It takes ~220 MiB on my x64 Linux, which is quite a lot! Especially considering that it can exist in multiple copies (debug/release, multiple repos using jemalloc etc.).

I think that the build.rs script should delete the build directory from disk once the compilation (make install) successfully finishes, since it shouldn't be needed anymore, and I don't think that Cargo will ever reuse it (if something relevant changes, Cargo will compile jemalloc from scratch in a different directory, AFAIK).

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions