diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 46307746a319..2e6207e96be6 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -244,6 +244,12 @@ if(USE_SDL) endif() # OpenAL +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") + add_compile_options(-include cstdlib) +elseif(MSVC) + add_compile_options(/FI cstdlib) +endif() + if (NOT ANDROID) add_subdirectory(OpenAL EXCLUDE_FROM_ALL) else() diff --git a/CMakeLists.txt b/CMakeLists.txt index 0492d13184e8..1c5fcf763c83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,6 +132,16 @@ if(MSVC) add_compile_options(/MP) endif() +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64") + add_compile_options(-msse4.1 -mavx2 -mfma -march=native -O3) + else() + add_compile_options(-O3) + endif() +elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/arch:AVX2 /O2) +endif() + if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." ) endif() diff --git a/rpcs3/Emu/RSX/VK/VKCompute.cpp b/rpcs3/Emu/RSX/VK/VKCompute.cpp index 9e9e2a474640..ac056cddb962 100644 --- a/rpcs3/Emu/RSX/VK/VKCompute.cpp +++ b/rpcs3/Emu/RSX/VK/VKCompute.cpp @@ -369,4 +369,4 @@ namespace vk const u32 linear_invocations = utils::aligned_div(word_count, optimal_group_size); compute_task::run(cmd, linear_invocations); } -} +} \ No newline at end of file