Skip to content

build.rs: only add -mno-avx when targeting x86_64 #258

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chenrui333
Copy link

fixes #253

-mno-avx is x86_64 specific and since llvm@18, it fails with error: unsupported option

$ echo 'int main(){return 0;}' |
>   /opt/homebrew/opt/llvm\@17/bin/clang -x c - -c \
>     --target=arm64-apple-macosx -mno-avx -o /dev/null
clang: warning: argument unused during compilation: '-mno-avx' [-Wunused-command-line-argument]

$ echo 'int main(){return 0;}' |
  /opt/homebrew/opt/llvm\@18/bin/clang -x c - -c \
    --target=arm64-apple-macosx -mno-avx -o /dev/null
clang: error: unsupported option '-mno-avx' for target 'arm64-apple-macosx'

@chenrui333
Copy link
Author

cc @dot-asm

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

Successfully merging this pull request may close these issues.

Compilation issues on macOS 15
1 participant