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

Few fixes for Visual Studio builds #175

Merged
merged 3 commits into from
Dec 30, 2019
Merged

Conversation

fanc999
Copy link
Contributor

@fanc999 fanc999 commented Dec 17, 2019

Hi,

This updates the build for Visual Studio builds, as follows:

  • Support Visual Studio 2013 builds better-re-enable erroring out on C4819 when /utf-8 (a Visual Studio 2015+ feature) is not supported, to avoid mis-compilations, and let people know that it is actually possible to build Graphene as-is with Visual Studio 2013, but at the cost of needing to explicitly disable building and running the tests.

  • Disable SSE2 builds for all 32-bit x86 Visual Studio builds. This is because although Visual Studio 2017 and 2019 improved on the __vectorcall calling convention (ABI), that needs to be used for 32-bit x86 builds, which is enough for running Graphene itself with the test programs, but this proved to be not enough to run more involved programs, such as GTK master. Note that x64 Visual Studio builds continue to support SSE2/SSE4.1 as they did before, Visual Studio 2013 included.

With blessings, thank you!

It seems that __vectorcall/ABI is improved in Visual Studio 2017/2019
for 32-bit x86 builds (and tests) of Graphene itself, but is not
robust enough for more involved programs, such as GTK master, to run
without encountering strange access violations.  As a result, disable
SSE2 intrinsics for 32-bit x86 for now until the __vectorcall/ABI
situation gets improved on later Visual Studio iterations.

This affects builds up to the latest Visual Studio 2019 16.4.x,
unfortunately.
The -utf-8 compiler flag is only supported since Visual Studio 2015, so
if that is not supported, fall back to the former behavior of erroring
out on C4819, so that we don't mis-compile things.

Note that this means we can build and run Graphene with Visual Studio
as-is on Visual Studio 2013 and later, but for building the tests,
Visual Studio 2015 or later is required, since Visual Studio 2015 and
later is required to build mutest.
We can actually build and use Graphene on Visual Studio 2013 and later,
but it does not support enough C99 for the dependent mutest test library
that is used for the tests.

Issue a warning that one may proceed building Graphene using Visual
Studio 2013, but it will come at a cost of having to disable building
and running the test programs.
@ebassi ebassi merged commit a59d7ee into ebassi:master Dec 30, 2019
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.

3 participants