Fix the unittests Ninja build. On Windows, GLAPI defaults to __declspec(dllimport), while GLAPICALL is empty, leading to declaration mismatches. Either should be empty for the unit tests since we link statically, for all platforms. Change-Id: I2dde0ca35108678fd9767895e0120ee4b0d7030f Reviewed-on: https://swiftshader-review.googlesource.com/19128 Tested-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/tests/unittests/BUILD.gn b/tests/unittests/BUILD.gn index 10f5fa5..7cb1cc1 100644 --- a/tests/unittests/BUILD.gn +++ b/tests/unittests/BUILD.gn
@@ -31,7 +31,11 @@ include_dirs = [ "../../include" ] # Khronos headers - defines = [ "GL_GLEXT_PROTOTYPES" ] + defines = [ + "GL_GLEXT_PROTOTYPES", + "GL_APICALL=", + "GLAPI=", + ] # Make sure we're loading SwiftShader's libraries, not ANGLE's or the system # provided ones. On Windows an explicit LoadLibrary("swiftshader\lib*.dll")