Skip to content

Build libbacktrace with mmapio.c instead of read.c #298

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

Aaron1011
Copy link
Member

Fixes #289

mmap should be available on all platforms we support, so we can use
libbacktrace's more efficient mmap-based code.

@alexcrichton
Copy link
Member

It looks like Windows may need to be exempted and continue to use the older implementation?

@Aaron1011
Copy link
Member Author

@alexcrichton: At this point, we might want to just switch to using the configure script from libbacktrace, so that we don't need to maintain our own hacky mmap detection.

Do you have a strong preference for the current approach of hardcoding the relevant paths into build.rs?

@alexcrichton
Copy link
Member

Having maintained running the configure script for years, yes I have quite a strong preference for never going back to that. It's ok if you label it "hacky" but I would personally label it "vastly more reliable than anything we had before" from my experience.

I would be fine with writing down "if windows compile this file, else that file"

@Aaron1011
Copy link
Member Author

@alexcrichton: Fair enough - I'll add an explicit check for Windows.

Fixes rust-lang#289

`mmap` should be available on all platforms we support (except Windows),
so we can use `libbacktrace`'s more efficient mmap-based code.
@Aaron1011
Copy link
Member Author

@alexcrichton: Updated

@alexcrichton alexcrichton merged commit c5f56d1 into rust-lang:master Mar 3, 2020
@alexcrichton
Copy link
Member

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile libbacktrace with mmapio.c instead of read.c
2 participants