Commit 1fae3556 by Jamie Madill

Add dEQP Linux GN integration.

BUG=angleproject:1272 Change-Id: I20cb8968221c25bb374b3cc71d7ca619a35f1a2f Reviewed-on: https://chromium-review.googlesource.com/320781Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 5f80d016
......@@ -384,6 +384,9 @@ util_gypi = exec_script("//build/gypi_to_gn.py",
config("angle_util_config") {
include_dirs = [ "util" ]
if (is_linux) {
libs = [ "X11" ]
}
}
static_library("angle_util") {
......@@ -419,6 +422,7 @@ static_library("angle_util") {
]
deps = [
":angle_common",
":libEGL",
":libGLESv2",
]
......
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//testing/test.gni")
import("//build/config/chromecast_build.gni")
import("//third_party/angle/build/angle_common.gni")
unittests_gypi = exec_script("//build/gypi_to_gn.py",
......@@ -136,8 +137,8 @@ if (is_win) {
### dEQP tests
###-----------------------------------------------------
# TODO(jmadill): Linux build
if (is_win) {
# TODO(jmadill): Other platforms.
if (is_win || is_linux) {
deqp_gypi = exec_script("//build/gypi_to_gn.py",
[
rebase_path("deqp.gypi"),
......@@ -155,16 +156,33 @@ if (is_win) {
}
defines = deqp_gypi.deqp_defines
defines += [ "_MBCS" ]
if (is_linux) {
# Ask the system headers to expose all the regular function otherwise
# dEQP doesn't compile and produces warnings about implicitly defined
# functions.
# This has to be GNU_SOURCE as on Linux dEQP uses syscall()
defines += [ "_GNU_SOURCE" ]
}
}
deqp_undefine_configs = [
"//build/config/compiler:chromium_code",
"//build/config/win:lean_and_mean",
"//build/config/win:nominmax",
"//build/config/win:unicode",
"//build/config/compiler:no_rtti",
]
if (is_win) {
deqp_undefine_configs += [
"//build/config/win:lean_and_mean",
"//build/config/win:nominmax",
"//build/config/win:unicode",
]
}
if (is_linux) {
deqp_undefine_configs += [ "//build/config/gcc:no_exceptions" ]
}
static_library("angle_deqp_decpp") {
configs -= deqp_undefine_configs
public_configs = [
......@@ -177,6 +195,11 @@ if (is_win) {
config("angle_deqp_libtester_config") {
defines = [ "ANGLE_DEQP_LIBTESTER_IMPLEMENTATION" ]
if (is_clang) {
# TODO(jmadill): Remove this once we fix dEQP.
cflags_cc = [ "-Wno-delete-non-virtual-dtor" ]
}
}
static_library("angle_deqp_libtester") {
......@@ -192,6 +215,10 @@ if (is_win) {
if (is_win) {
sources += rebase_path(deqp_gypi.deqp_libtester_sources_win, ".", "../..")
}
if (is_linux) {
sources +=
rebase_path(deqp_gypi.deqp_libtester_sources_unix, ".", "../..")
}
}
config("angle_deqp_gtest_support_config") {
......@@ -210,6 +237,12 @@ if (is_win) {
public_configs = [ ":angle_deqp_gtest_support_config" ]
sources = deqp_gypi.deqp_gpu_test_expectations_sources
sources += [ "//gpu/angle_deqp_tests_main.cc" ]
# Taken from gpu/BUILD.gn
# TODO(jmadill): this should be in a shared location
if (is_linux && !is_chromecast) {
libs = [ "pci" ]
}
}
target_names = [
......@@ -268,6 +301,11 @@ if (is_win) {
sources = [
"deqp_support/angle_deqp_gtest.cpp",
]
if (is_linux && !is_component_build) {
# Set rpath to find *.so files even in a non-component build.
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
}
}
}
......@@ -967,6 +967,14 @@
'<(deqp_path)/framework/delibs/dethread/win32/deThreadLocalWin32.c',
'<(deqp_path)/framework/delibs/dethread/win32/deThreadWin32.c',
],
'deqp_libtester_sources_unix':
[
'<(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',
],
'deqp_gpu_test_expectations_sources':
[
'third_party/gpu_test_expectations/gpu_info.cc',
......@@ -1028,17 +1036,6 @@
'_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',
],
}],
],
},
'conditions':
......@@ -1376,6 +1373,10 @@
{
'sources': [ '<@(deqp_libtester_sources_win)', ],
}],
['(OS=="linux" and use_x11==1) or OS=="mac"',
{
'sources': [ '<@(deqp_libtester_sources_unix)', ],
}],
],
},
......
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