Commit b5aa26bd by Frank Henigman Committed by Commit Bot

Gyp build support for Chrome OS.

Don't hard code "chromeos" to zero. Fix incorrect assumptions that X11 would always be used on linux. Introduce "angle_use_drm" as the Chrome OS alternative to "angle_use_x11." Define USE_OZONE for Chrome OS. Allow overriding pkg-config. BUG=angleproject:1297 Change-Id: Ie85b5c37f39170e0d11f8fc1bb70c175db6ee334 Reviewed-on: https://chromium-review.googlesource.com/323610Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
parent a3d333c2
...@@ -15,11 +15,14 @@ ...@@ -15,11 +15,14 @@
'angle_build_winphone%': '0', 'angle_build_winphone%': '0',
'conditions': 'conditions':
[ [
['OS=="linux" and use_x11==1 and chromeos==0', { ['OS=="linux" and use_x11==1',
{
'angle_use_glx%': 1, 'angle_use_glx%': 1,
'angle_use_drm%': 0,
}, },
{ {
'angle_use_glx%': 0, 'angle_use_glx%': 0,
'angle_use_drm%': 1,
}], }],
], ],
...@@ -38,6 +41,10 @@ ...@@ -38,6 +41,10 @@
], ],
'conditions': 'conditions':
[ [
['chromeos==1',
{
'defines': [ 'USE_OZONE' ],
}],
['component=="shared_library"', ['component=="shared_library"',
{ {
'defines': [ 'COMPONENT_BUILD' ], 'defines': [ 'COMPONENT_BUILD' ],
......
...@@ -5,24 +5,22 @@ ...@@ -5,24 +5,22 @@
{ {
'variables': 'variables':
{ {
# Assume for the time being that we're never compiling # Chrome OS chroot builds need a special pkg-config,
# standalone ANGLE on Chrome OS. # so make it possible to change.
'chromeos': 0, 'pkg-config%': 'pkg-config',
# Chromium puts the pkg-config command in a variable because
# calling pkg-config directly doesn't work in a sysroot image.
# See Chromium bug 569947 for more information.
# For standalone builds we don't have this problem so we use
# the regular command.
'pkg-config': 'pkg-config',
# Use a nested variable trick to get use_x11 evaluated more # Use a nested variable trick to get use_x11 evaluated more
# eagerly than other conditional variables. # eagerly than other conditional variables.
'variables': 'variables':
{ {
'variables':
{
'chromeos%': 0,
},
'conditions': 'conditions':
[ [
['OS=="linux"', ['OS=="linux" and chromeos==0',
{ {
'use_x11': 1, 'use_x11': 1,
}, },
...@@ -30,9 +28,13 @@ ...@@ -30,9 +28,13 @@
'use_x11': 0, 'use_x11': 0,
}], }],
], ],
# Copy conditionally-set variables out one scope.
'chromeos%': '<(chromeos)',
}, },
# Copy conditionally-set variables out one scope. # Copy conditionally-set variables out one scope.
'use_x11%': '<(use_x11)', 'use_x11%': '<(use_x11)',
'chromeos%': '<(chromeos)',
}, },
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
'angle_enable_d3d11%': 1, 'angle_enable_d3d11%': 1,
'angle_enable_hlsl%': 1, 'angle_enable_hlsl%': 1,
}], }],
['OS=="linux" and use_x11==1 and chromeos==0', ['OS=="linux"',
{ {
'angle_enable_gl%': 1, 'angle_enable_gl%': 1,
}], }],
......
...@@ -1013,6 +1013,9 @@ ...@@ -1013,6 +1013,9 @@
[ [
'<(deqp_path)/framework/platform/x11', '<(deqp_path)/framework/platform/x11',
], ],
}],
['OS=="linux"',
{
'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
...@@ -1373,7 +1376,7 @@ ...@@ -1373,7 +1376,7 @@
{ {
'sources': [ '<@(deqp_libtester_sources_win)', ], 'sources': [ '<@(deqp_libtester_sources_win)', ],
}], }],
['(OS=="linux" and use_x11==1) or OS=="mac"', ['OS=="linux" or OS=="mac"',
{ {
'sources': [ '<@(deqp_libtester_sources_unix)', ], '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