Issue 79720
Summary Darwin: cross compiling with -mfpmath=sse generates error when builiding with an arm64 slice
Labels new issue
Assignees
Reporter kencu
    When cross-compiling a project (in this case graphite https://github.com/silnrsi/graphite) errors occur when trying to build as both -arch=arm64 -arch=x86_64 at one time.

The build uses ```-mfpmath=sse -msse2``` which are valid flags for the Intel compilation. Rather than simply being ignored by arm64 compilation phase, an error is generated:

```
error: unknown FP unit 'sse'
```

I believe this occurs because the arm compilation does not recognize the fpmath setting:

https://github.com/llvm/llvm-project/blob/7089c012ec08450b1d8050b6b1d85a00505aa51a/clang/lib/Basic/Targets.cpp#L802

To allow cross-compilation to proceed smoothly, would it not be best for that setting to be ignored, rather than generate an error?

Is there a better approach, other than separate builds and a post-build lipo phase?

Thanks to all.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to