libhydrogen
libhydrogen copied to clipboard
do not explicitly pass -arch
Explicitly passing -arch breaks the build for me for arm64-osx and x64-osx.
Can this be changed to -mcpu=
instead? Or better, check if -march=
is supported by the compiler?
Hm I think -march
is not a good idea in general, at least in the context of vcpkg when binaries are distributed to other computers:
-march: Generate instructions for the machine type cpu-type. In contrast to -mtune=cpu-type, which merely tunes the generated code for the specified cpu-type, -march=cpu-type allows GCC to generate code that may not run at all on processors other than the one indicated.
-mcpu=
was replaced by -mtune
. At least for vcpkg it would be better to tune for all CPUs and when a user knows that the code will only run on a specific CPU they can pass -mtune
manually.
libhydrogen's primary targets are embedded systems, where generating code specifically for a target is useful.
I see. Maybe we could make it an option.