Commit 68a9d748 by Corentin Wallez

Compile the dEQP test targets on Mac

BUG=angleproject:891 Change-Id: I4bc2817106c8170684a76972badd38c02c0abf0e Reviewed-on: https://chromium-review.googlesource.com/299852Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 247374cb
...@@ -30,18 +30,18 @@ ...@@ -30,18 +30,18 @@
'conditions': 'conditions':
[ [
['(OS=="win" or OS=="linux")', ['(OS=="win" or OS=="linux" or OS=="mac")',
{ {
# Build the dEQP libraries for all Windows/Linux builds # Build the dEQP libraries for all Windows/Linux builds
'angle_build_deqp_libraries%': 1, 'angle_build_deqp_libraries%': 1,
}], }],
['((OS=="win" or OS=="linux") and angle_build_winrt==0)', ['((OS=="win" or OS=="linux" or OS=="mac") and angle_build_winrt==0)',
{ {
# Build the dEQP GoogleTest support helpers for all Windows/Linux builds except WinRT # Build the dEQP GoogleTest support helpers for all Windows/Linux builds except WinRT
# GoogleTest doesn't support WinRT # GoogleTest doesn't support WinRT
'angle_build_deqp_gtest_support%': 1, 'angle_build_deqp_gtest_support%': 1,
}], }],
['((OS=="win" or OS=="linux") and angle_standalone==1 and angle_build_winrt==0)', ['((OS=="win" or OS=="linux" or OS=="mac") and angle_standalone==1 and angle_build_winrt==0)',
{ {
# Build the dEQP executables for all standalone Windows/Linux builds except WinRT # Build the dEQP executables for all standalone Windows/Linux builds except WinRT
# GYP doesn't support generating standalone WinRT executables # GYP doesn't support generating standalone WinRT executables
...@@ -72,20 +72,38 @@ ...@@ -72,20 +72,38 @@
[ [
'<(deqp_path)/framework/platform/x11', '<(deqp_path)/framework/platform/x11',
], ],
'deqp_libtester_sources': 'deqp_defines':
[ [
'<(deqp_path)/framework/delibs/dethread/unix/deMutexUnix.c', # Ask the system headers to expose all the regular function otherwise
'<(deqp_path)/framework/delibs/dethread/unix/deNamedSemaphoreUnix.c', # dEQP doesn't compile and produces warnings about implicitly defined
'<(deqp_path)/framework/delibs/dethread/unix/deSemaphoreUnix.c', # functions.
'<(deqp_path)/framework/delibs/dethread/unix/deThreadLocalUnix.c', # This has to be GNU_SOURCE as on Linux dEQP uses syscall()
'<(deqp_path)/framework/delibs/dethread/unix/deThreadUnix.c', '_GNU_SOURCE',
],
}],
['OS=="mac"',
{
'deqp_include_dirs':
[
'<(deqp_path)/framework/platform/osx',
], ],
'deqp_defines': 'deqp_defines':
[ [
# Ask the system headers to expose all the regular function otherwise # Ask the system headers to expose all the regular function otherwise
# dEQP doesn't compile and produces warnings about implicitly defined # dEQP doesn't compile and produces warnings about implicitly defined
# functions. # functions.
'_GNU_SOURCE', '_XOPEN_SOURCE=600',
],
}],
['(OS=="linux" and use_x11==1) or OS=="mac"',
{
'deqp_libtester_sources':
[
'<(deqp_path)/framework/delibs/dethread/unix/deMutexUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deNamedSemaphoreUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deSemaphoreUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deThreadLocalUnix.c',
'<(deqp_path)/framework/delibs/dethread/unix/deThreadUnix.c',
], ],
}], }],
], ],
...@@ -1006,7 +1024,6 @@ ...@@ -1006,7 +1024,6 @@
'<(angle_path)/src/tests/deqp_support/tcuRandomOrderExecutor.h', '<(angle_path)/src/tests/deqp_support/tcuRandomOrderExecutor.h',
], ],
}, },
'conditions': 'conditions':
[ [
['angle_build_deqp_libraries==1 and angle_standalone==1', ['angle_build_deqp_libraries==1 and angle_standalone==1',
...@@ -1289,6 +1306,16 @@ ...@@ -1289,6 +1306,16 @@
{ # angle_standalone!=1 { # angle_standalone!=1
'dependencies': [ '<(DEPTH)/third_party/libpng/libpng.gyp:libpng' ], 'dependencies': [ '<(DEPTH)/third_party/libpng/libpng.gyp:libpng' ],
}], }],
['OS=="mac"',
{
'direct_dependent_settings':
{
'xcode_settings':
{
'DYLIB_INSTALL_NAME_BASE': '@rpath',
},
},
}],
], ],
}, },
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#if (DE_OS == DE_OS_WIN32) #if (DE_OS == DE_OS_WIN32)
#include <Windows.h> #include <Windows.h>
#elif (DE_OS == DE_OS_UNIX) #elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX)
#include <sys/unistd.h> #include <sys/unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -66,7 +66,7 @@ deBool deIsDir(const char *filename) ...@@ -66,7 +66,7 @@ deBool deIsDir(const char *filename)
return false; return false;
} }
#elif (DE_OS == DE_OS_UNIX) #elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX)
deBool deIsDir(const char *filename) deBool deIsDir(const char *filename)
{ {
struct stat st; struct stat st;
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
#define ANGLE_EGL_LIBRARY_NAME "libEGL.dll" #define ANGLE_EGL_LIBRARY_NAME "libEGL.dll"
#elif (DE_OS == DE_OS_UNIX) #elif (DE_OS == DE_OS_UNIX)
#define ANGLE_EGL_LIBRARY_NAME "libEGL.so" #define ANGLE_EGL_LIBRARY_NAME "libEGL.so"
#elif (DE_OS == DE_OS_OSX)
#define ANGLE_EGL_LIBRARY_NAME "libEGL.dylib"
#else #else
#error "Unsupported platform" #error "Unsupported platform"
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment