Skip to content

Commit

Permalink
build: Set march to IvyBridge for supported platforms build: Enable s…
Browse files Browse the repository at this point in the history
…pecific instructions (AVX / SSE4.2) instead of using march
  • Loading branch information
Xcedf committed Dec 31, 2024
1 parent 867a4a7 commit 7c6c2ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ case "$platform" in # Adjust compilation options based on platform
sys_cflags='-Wno-error=redundant-decls'
opts="$opts --disable-werror"
postbuild='package_linux'
if [ "$target_arch" == "x86_64" ]; then
sys_cflags="$sys_cflags -msse4.2 -mavx"
fi
;;
Darwin)
echo "Compiling for MacOS for $target_arch..."
Expand Down Expand Up @@ -233,7 +236,7 @@ case "$platform" in # Adjust compilation options based on platform
;;
CYGWIN*|MINGW*|MSYS*)
echo 'Compiling for Windows...'
sys_cflags='-Wno-error'
sys_cflags='-Wno-error -msse4.2 -mavx'
CFLAGS="${CFLAGS} -lIphlpapi -lCrypt32" # workaround for linking libs on mingw
opts="$opts --disable-fortify-source"
postbuild='package_windows' # set the above function to be called after build
Expand All @@ -242,7 +245,7 @@ case "$platform" in # Adjust compilation options based on platform
win64-cross)
echo 'Cross-compiling for Windows...'
export AR=${AR:-$CROSSAR}
sys_cflags='-Wno-error'
sys_cflags='-Wno-error -msse4.2 -mavx'
opts="$opts --cross-prefix=$CROSSPREFIX --static --disable-fortify-source"
postbuild='package_wincross' # set the above function to be called after build
target="qemu-system-i386w.exe"
Expand Down

0 comments on commit 7c6c2ff

Please sign in to comment.