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

MSVC changes #8732

Merged
merged 2 commits into from Aug 14, 2020
Merged

MSVC changes #8732

merged 2 commits into from Aug 14, 2020

Conversation

bevanweiss
Copy link
Contributor

Add support for compilation on x64 toolchain (x86 cl.exe was running out of heap space in vm.cpp)

Also took the opportunity to change compile optimisation from /Ox to /O2, as /O2 provides better optimisation than does /Ox

Also, we shouldn't be explicitly setting compiler tool defines (__cpp_lib_bitops), so remove that from types.h

Add support for compilation on x64 toolchain (x86 cl.exe was running out of heap space in vm.cpp)

Also took the opportunity to change compile optimisation from /Ox to /O2, as /O2 provides better optimisation than does /Ox

Also, we shouldn't be explicitely setting compiler tool defines (__cpp_lib_bitops), so remove that from types.h
@MSuih
Copy link
Member

MSuih commented Aug 14, 2020

__cpp_lib_bitops needs to be defined or else some recent-ish msvc versions cannot compile rpcs3: https://github.com/microsoft/STL/blob/0cbd1b2470412909b3681902ce0470609d7ae86e/stl/inc/bit#L34

I'd wait a bit for people to update their compilers before removing that define.

Edit: Even the azure build failed because of it.

As noted, we've done something we shouldn't have with MSVC compiler specific defines.  But to avoid breaking the MSVC build environment, leave this define in there until the MSVC version when it is actually exposed by the compiler itself (v16.8).
@bevanweiss
Copy link
Contributor Author

__cpp_lib_bitops needs to be defined or else some recent-ish msvc versions cannot compile rpcs3: https://github.com/microsoft/STL/blob/0cbd1b2470412909b3681902ce0470609d7ae86e/stl/inc/bit#L34

I'd wait a bit for people to update their compilers before removing that define.

Edit: Even the azure build failed because of it.

I think somehow we got into this tricky situation where we are defining a name which is strictly reserved for the tools.
I've pushed an update which brings back the define, but only for earlier MSVC releases.

Copy link
Contributor

@elad335 elad335 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder that this is a hotfix, quick merge this.

@AniLeo AniLeo merged commit 01d3585 into RPCS3:master Aug 14, 2020
@bevanweiss bevanweiss deleted the fix_MSVC_compile_error branch August 15, 2020 06:39
@Megamouse
Copy link
Contributor

so in which way was this a hotfix again?

@kd-11
Copy link
Contributor

kd-11 commented Aug 15, 2020

Spams this:
1>RPCS3\rpcs3\Utilities\types.h(21,1): warning C4067: unexpected tokens following preprocessor directive - expected a newline when building with VS 16.6.5

@bevanweiss
Copy link
Contributor Author

Spams this:
1>RPCS3\rpcs3\Utilities\types.h(21,1): warning C4067: unexpected tokens following preprocessor directive - expected a newline when building with VS 16.6.5

Yeah.. that'll be my fault for this poor effort (L21):
#ifndef __cpp_lib_bitops && _MSC_VER < 1928

It should read:
#if !defined(__cpp_lib_bitops) && (_MSC_VER < 1928)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants