Commit c89df2ba by Corentin Wallez

Add loadable_module versions of libEGL and libGLESv2.

Reland with a link fix for Clang on Windows In order to implement the --use-gl=angle Chrome flag on Linux, we need to have the ANGLE .so directly in the build directory however GYP places shared_libraries under lib/ on Linux. On the contrary loadable_modules cannot be linked against so we need to keep the shared_library targets. This commit adds _ANGLE versions of the libEGL and libGLESv2 targets as loadable module that depend on their respective shared library. BUG=522967 Change-Id: Iad968ab786b94b6041c279921de99633d23b48a7 Reviewed-on: https://chromium-review.googlesource.com/318470 Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 1fae3556
...@@ -353,6 +353,14 @@ shared_library("libGLESv2") { ...@@ -353,6 +353,14 @@ shared_library("libGLESv2") {
] ]
} }
if (!is_win) {
shared_library("libGLESv2_ANGLE") {
deps = [
":libGLESv2",
]
}
}
shared_library("libEGL") { shared_library("libEGL") {
sources = rebase_path(gles_gypi.libegl_sources, ".", "src") sources = rebase_path(gles_gypi.libegl_sources, ".", "src")
...@@ -377,6 +385,14 @@ shared_library("libEGL") { ...@@ -377,6 +385,14 @@ shared_library("libEGL") {
] ]
} }
if (!is_win) {
shared_library("libEGL_ANGLE") {
deps = [
":libEGL",
]
}
}
util_gypi = exec_script("//build/gypi_to_gn.py", util_gypi = exec_script("//build/gypi_to_gn.py",
[ rebase_path("util/util.gyp") ], [ rebase_path("util/util.gyp") ],
"scope", "scope",
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
{ {
# Everything below this is duplicated in the GN build. If you change # Everything below this is duplicated in the GN build. If you change
# anything also change angle/BUILD.gn # anything also change angle/BUILD.gn
'variables':
{
'angle_standalone%': 0,
},
'targets': 'targets':
[ [
{ {
...@@ -37,4 +41,21 @@ ...@@ -37,4 +41,21 @@
], ],
}, },
], ],
'conditions':
[
['angle_standalone==0 and OS!="win"',
{
'targets':
[
{
'target_name': 'libEGL_ANGLE',
'type': 'loadable_module',
'dependencies':
[
'libEGL',
],
},
],
}],
],
} }
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
{ {
'variables': 'variables':
{ {
'angle_standalone%': 0,
# These file lists are shared with the GN build. # These file lists are shared with the GN build.
'libangle_common_sources': 'libangle_common_sources':
[ [
...@@ -822,4 +824,21 @@ ...@@ -822,4 +824,21 @@
], ],
}, },
], ],
'conditions':
[
['angle_standalone==0 and OS!="win"',
{
'targets':
[
{
'target_name': 'libGLESv2_ANGLE',
'type': 'loadable_module',
'dependencies':
[
'libGLESv2',
],
},
],
}],
],
} }
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