Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compile with msvc, clang and gcc on Windows #14114

Merged
merged 19 commits into from
Jul 11, 2023
Merged

Conversation

oltolm
Copy link
Contributor

@oltolm oltolm commented Jun 29, 2023

I added support for compiling rpcs3 with msvc, clang and gcc on Windows using cmake. I also fixed some compilation errors and warnings and cleaned up some cmake scripts. I tested it on Windows and Linux.

On Windows you can use clang in the msys2 clang64 environment or gcc in the msys2 mingw64 environment. See https://www.msys2.org/docs/environments/.

You can generate a VS solution with:

cmake --preset msvc -DQt5_DIR=<path to Qt5 directory>

I realize that there are a lot of changes. I guess I could reduce the amount of changes by disabling some warning instead of fixing them.

Utilities/JIT.cpp Outdated Show resolved Hide resolved
rpcs3/util/asm.hpp Outdated Show resolved Hide resolved
3rdparty/pine/pine_server.h Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
rpcs3/util/simd.hpp Outdated Show resolved Hide resolved
rpcs3/util/simd.hpp Outdated Show resolved Hide resolved
@kd-11
Copy link
Contributor

kd-11 commented Jun 29, 2023

Added some comments. Something to keep in mind - we support building on anemic CI machines so some blocks guarded by __AVX__ or __RTM__ may be missing on released builds. Also we cannot globally enable these because we support some really ancient processors and compilers may inject unsupported bytecode during optimization passes. There were some optimizations that was locked behind an AVX check and this actually made release builds slower than self-compiled which is a pre-existing problem.

rpcs3/util/cpu_stats.cpp Outdated Show resolved Hide resolved
rpcs3/util/cpu_stats.cpp Outdated Show resolved Hide resolved
CMakePresets.json Outdated Show resolved Hide resolved
@Megamouse Megamouse added OS: Windows Build and CI Anything related to the build process and continuous integration labels Jun 30, 2023
rpcs3/Emu/Cell/Modules/libsynth2.cpp Outdated Show resolved Hide resolved
rpcs3/Crypto/unedat.h Outdated Show resolved Hide resolved
rpcs3/Emu/Memory/vm.cpp Outdated Show resolved Hide resolved
rpcs3/util/asm.hpp Show resolved Hide resolved
rpcs3/util/atomic.hpp Outdated Show resolved Hide resolved
rpcs3/util/atomic.hpp Outdated Show resolved Hide resolved
rpcs3/util/fence.hpp Outdated Show resolved Hide resolved
rpcs3/util/simd.hpp Outdated Show resolved Hide resolved
rpcs3/util/sysinfo.cpp Outdated Show resolved Hide resolved
rpcs3/util/tsc.hpp Outdated Show resolved Hide resolved
@Nekotekina
Copy link
Member

Some missing stat() changes in File.cpp

@Nekotekina
Copy link
Member

But overall, LGTM

rpcs3/util/atomic.hpp Outdated Show resolved Hide resolved
@elad335 elad335 merged commit 0c94606 into RPCS3:master Jul 11, 2023
@oltolm oltolm deleted the win32 branch July 11, 2023 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build and CI Anything related to the build process and continuous integration OS: Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants