Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

render: drop libEGL dependency if gles2 is disabled #3241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

render: drop libEGL dependency if gles2 is disabled #3241

wants to merge 1 commit into from

Conversation

jbeich
Copy link
Contributor

@jbeich jbeich commented Oct 5, 2021

Disabling gles2 currently violates reproducibility due to opportunistic lookup of libEGL even when auto-detection is disabled.

$ meson setup --auto-features=disabled _build
$ readelf -d _build/libwlroots.so | grep NEEDED.\*GL
 0x0000000000000001 NEEDED               Shared library: [libEGL.so.1]
$ nm --undefined-only -D _build/libwlroots.so | fgrep egl
                 U eglBindAPI
                 U eglCreateContext
                 U eglDestroyContext
                 U eglGetCurrentContext
                 U eglGetCurrentDisplay
                 U eglGetCurrentSurface
                 U eglGetError
                 U eglGetProcAddress
                 U eglInitialize
                 U eglMakeCurrent
                 U eglQueryContext
                 U eglQueryString
                 U eglReleaseThread
                 U eglTerminate

egl = dependency('egl', required: 'gles2' in renderers)
if egl.found()
if 'gles2' in renderers or 'auto' in renderers
egl = dependency('egl')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this isn't quite right. If running with auto, we'll want to look for the egl dep, and disable the gles2 renderer if it's missing. Here the egl dep is mandatory.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think we just need to wrap the original code as-is in the if 'gles2' in renderers or 'auto' in renderers condition you've added above and it should be good to go.

For `required` to disable search the value needs to be of `feature` type.
Checking `gles2` via `in` keyword returns a `bool` but `required: false`
makes the dependency optional instead of disabled.
@emersion
Copy link
Member

emersion commented Nov 1, 2021

wlroots has migrated to gitlab.freedesktop.org. This pull request has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3241

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants