Skip to content

Commit

Permalink
Fix Compilation of Etterna on M1 Macs
Browse files Browse the repository at this point in the history
Etterna currently *needs* to be compiled as a x86_64 program, even on M1 macs.
This is for a number of reasons, including the fact that we directly use x86_64 vector instructions in the calc code.

Without this change, the clang -m64 switch in the ffmpeg cmake will cause us to attempt to build ffmpeg as an aarch64 binary, which can't be linked
 with the x86_64 architecture code generated by the rest of our build process.

Explicitly adding in the flag to compile for x86_64 fixes this problem,
 and lets us build Etterna on M1 macs to produce a binary runnable with Rosetta V2
  • Loading branch information
bluebandit21 authored and jameskr97 committed Oct 11, 2021
1 parent 4cbb53a commit 53ee619
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/Helpers/SetupFFMPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif()
if(APPLE)
list(APPEND FFMPEG_CONFIGURE
"--arch=x86_64"
"--cc=clang -m64"
"--cc=clang -arch x86_64"
"--enable-sse")
endif()
list(APPEND FFMPEG_CONFIGURE "--enable-gpl")
Expand Down

0 comments on commit 53ee619

Please sign in to comment.