Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Detect M1 Mac and disable ASAN default #14

Open
ProducerMatt opened this issue Sep 12, 2022 · 2 comments
Open

Detect M1 Mac and disable ASAN default #14

ProducerMatt opened this issue Sep 12, 2022 · 2 comments

Comments

@ProducerMatt
Copy link
Owner

ASAN redbean is currently broken on M1. It would be good if the default "asan" instead defaulted to MODE= when run on an M1. However I don't know how to detect whether the host is an M1.

@ProducerMatt
Copy link
Owner Author

Will this work?

# Use default redbean if on M1 Mac. Else use ASAN
if which arch && [ "$(arch)" != "x86_64" ]; then
    RB_MODE= # default
else
    RB_MODE="asan-" # Memory hardening goodness for bug/exploit prevention
fi

@ProducerMatt
Copy link
Owner Author

Added to build.sh. If someone can contribute matching condition for the Makefile let me know. d81c2e7

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

No branches or pull requests

1 participant