[Mesa-dev] [PATCH] scons: Remove gles option.
Jose Fonseca
jfonseca at vmware.com
Fri Oct 19 15:49:11 UTC 2018
SCons never had parity with autoconf. It never gained enough traction
to replace autoconf, so it become this thing which is mostly use by
VMware and others who care about Windows.
Maybe one day meson will replace SCons. But I certainly have no plans
to have scons replace anything anymore.
Jose
On 19/10/18 16:28, Liviu Prodea wrote:
>
>
>
>
>
>
>
> On Friday, October 19, 2018, 6:04:28 PM GMT+3, Liviu Prodea <liviuprodea at yahoo.com> wrote:
>
>
>
>
>
>
>
>
> I think I found autotools build equivalent for gles=y. It is --enable-shared-glapi. And the docs say it is needed to support applications that mix OpenGL and OpenGL ES:
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mesa3d.org%2Fegl.html&data=02%7C01%7Cjfonseca%40vmware.com%7C94ebe6edaed045e7fbc008d635d77afe%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636755596930665492&sdata=tjgrqRqwIRY8wcfCaaV3v3lsP8kbnjlb%2B2WG%2FxfE3Sk%3D&reserved=0
>
> and Meson equivalent is shared-glapi:
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fmesa%2Fmesa%2Fblob%2Fmaster%2Fmeson_options.txt&data=02%7C01%7Cjfonseca%40vmware.com%7C94ebe6edaed045e7fbc008d635d77afe%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636755596930665492&sdata=pBeisAPjw5OWraF36VHD%2FHStVKFJDuznhc%2BoNKLQ8tg%3D&reserved=0
>
> Apparently Scons is the only build system that has gles=no default. The other 2 actively maintained build systems have both equivalent options default to true.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>
> On Friday, October 19, 2018, 4:15:48 PM GMT+3, Brian Paul <brianp at vmware.com> wrote:
>
>
>
>
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> On 10/19/2018 06:33 AM, Jose Fonseca wrote:
>> It's broken, and WGL state tracker is always built with GLES support
>> noawadays.
>> ---
>> common.py | 2 --
>> src/SConscript | 7 -------
>> src/gallium/state_trackers/osmesa/SConscript | 4 +---
>> src/gallium/state_trackers/wgl/SConscript | 4 +---
>> src/gallium/targets/libgl-gdi/SConscript | 6 ------
>> src/gallium/targets/libgl-xlib/SConscript | 6 ------
>> src/mapi/glapi/SConscript | 6 +-----
>> src/mapi/shared-glapi/SConscript | 9 +--------
>> src/mesa/SConscript | 4 +---
>> src/mesa/drivers/osmesa/SConscript | 4 +---
>> 10 files changed, 6 insertions(+), 46 deletions(-)
>>
>> diff --git a/common.py b/common.py
>> index 113fc7f5c12..f4f2bb44c1c 100644
>> --- a/common.py
>> +++ b/common.py
>> @@ -99,8 +99,6 @@ def AddOptions(opts):
>> 'enable static code analysis where available', 'no'))
>> opts.Add(BoolOption('asan', 'enable Address Sanitizer', 'no'))
>> opts.Add('toolchain', 'compiler toolchain', default_toolchain)
>> - opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support',
>> - 'no'))
>> opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
>> opts.Add(BoolOption('openmp', 'EXPERIMENTAL: compile with openmp (swrast)',
>> 'no'))
>> diff --git a/src/SConscript b/src/SConscript
>> index 95ea061c4bb..54350a9cdcc 100644
>> --- a/src/SConscript
>> +++ b/src/SConscript
>> @@ -42,10 +42,6 @@ env.Append(CPPPATH = ["#" + env['build_dir']])
>> if env['platform'] != 'windows':
>> SConscript('loader/SConscript')
>>
>> -# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
>> -# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
>> -# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
>> -# enable OpenGL ES support.
>> SConscript('mapi/glapi/gen/SConscript')
>> SConscript('mapi/glapi/SConscript')
>>
>> @@ -61,8 +57,5 @@ if not env['embedded']:
>> if env['platform'] == 'haiku':
>> SConscript('egl/SConscript')
>>
>> - if env['gles']:
>> - SConscript('mapi/shared-glapi/SConscript')
>> -
>> SConscript('gallium/SConscript')
>>
>> diff --git a/src/gallium/state_trackers/osmesa/SConscript b/src/gallium/state_trackers/osmesa/SConscript
>> index f5519f13762..be67d0fe739 100644
>> --- a/src/gallium/state_trackers/osmesa/SConscript
>> +++ b/src/gallium/state_trackers/osmesa/SConscript
>> @@ -14,10 +14,8 @@ if env['platform'] == 'windows':
>> env.AppendUnique(CPPDEFINES = [
>> 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
>> 'WIN32_LEAN_AND_MEAN', # https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmsdn2.microsoft.com%2Fen-us%2Flibrary%2F6dwk3a1z.aspx&data=02%7C01%7Cjfonseca%40vmware.com%7C94ebe6edaed045e7fbc008d635d77afe%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636755596930665492&sdata=keOzo6Ret8LKwXsSFEWGZlrBf0I6UsfjTbMDh12ujaw%3D&reserved=0
>> + '_GLAPI_NO_EXPORTS', # prevent _glapi_* from being declared __declspec(dllimport)
>> ])
>> - if not env['gles']:
>> - # prevent _glapi_* from being declared __declspec(dllimport)
>> - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
>>
>> st_osmesa = env.ConvenienceLibrary(
>> target ='st_osmesa',
>> diff --git a/src/gallium/state_trackers/wgl/SConscript b/src/gallium/state_trackers/wgl/SConscript
>> index a7fbb07a89a..bbf5ebd9764 100644
>> --- a/src/gallium/state_trackers/wgl/SConscript
>> +++ b/src/gallium/state_trackers/wgl/SConscript
>> @@ -14,10 +14,8 @@ env.AppendUnique(CPPDEFINES = [
>> '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
>> 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
>> 'WIN32_LEAN_AND_MEAN', # https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmsdn2.microsoft.com%2Fen-us%2Flibrary%2F6dwk3a1z.aspx&data=02%7C01%7Cjfonseca%40vmware.com%7C94ebe6edaed045e7fbc008d635d77afe%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636755596930665492&sdata=keOzo6Ret8LKwXsSFEWGZlrBf0I6UsfjTbMDh12ujaw%3D&reserved=0
>> + '_GLAPI_NO_EXPORTS', # prevent _glapi_* from being declared __declspec(dllimport)
>> ])
>> -if not env['gles']:
>> - # prevent _glapi_* from being declared __declspec(dllimport)
>> - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
>>
>> wgl = env.ConvenienceLibrary(
>> target ='wgl',
>> diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
>> index 132cb73358d..94feca24ef3 100644
>> --- a/src/gallium/targets/libgl-gdi/SConscript
>> +++ b/src/gallium/targets/libgl-gdi/SConscript
>> @@ -48,12 +48,6 @@ else:
>>
>> env['no_import_lib'] = 1
>>
>> -# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
>> -# shared_glapi respectively
>> -if env['gles']:
>> - env.Prepend(LIBPATH = [shared_glapi.dir])
>> - glapi = [bridge_glapi, 'libglapi']
>> -
>> opengl32 = env.SharedLibrary(
>> target ='opengl32',
>> source = sources,
>> diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
>> index fb7a0ce50e3..b49b4e6fe2a 100644
>> --- a/src/gallium/targets/libgl-xlib/SConscript
>> +++ b/src/gallium/targets/libgl-xlib/SConscript
>> @@ -18,12 +18,6 @@ env.Append(CPPDEFINES = ['USE_XSHM'])
>> env.Prepend(LIBS = env['X11_LIBS'])
>> env.Prepend(LIBPATH = env['X11_LIBPATH'])
>>
>> -# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
>> -# shared_glapi respectively
>> -if env['gles']:
>> - env.Prepend(LIBPATH = [shared_glapi.dir])
>> - glapi = [bridge_glapi, 'glapi']
>> -
>> env.Prepend(LIBS = [
>> st_xlib,
>> ws_xlib,
>> diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
>> index 08fed6c0d35..118da1d53f7 100644
>> --- a/src/mapi/glapi/SConscript
>> +++ b/src/mapi/glapi/SConscript
>> @@ -19,12 +19,8 @@ if env['platform'] == 'windows':
>> '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
>> 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
>> 'KHRONOS_DLL_EXPORTS', # declare gl* as __declspec(dllexport) in Khronos headers
>> + '_GLAPI_NO_EXPORTS', # prevent _glapi_* from being declared __declspec(dllimport)
>> ])
>> - if env['gles']:
>> - env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS'])
>> - else:
>> - # prevent _glapi_* from being declared __declspec(dllimport)
>> - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
>>
>> env.Append(CPPPATH = [
>> '#/src',
>> diff --git a/src/mapi/shared-glapi/SConscript b/src/mapi/shared-glapi/SConscript
>> index 5d74bd6813f..060c61dadce 100644
>> --- a/src/mapi/shared-glapi/SConscript
>> +++ b/src/mapi/shared-glapi/SConscript
>> @@ -113,11 +113,4 @@ if env['platform'] == 'windows':
>> else:
>> shared_glapi = env.FindIxes(shared_glapi, 'SHLIBPREFIX', 'SHLIBSUFFIX')
>>
>> -# build glapi bridge as a convenience libarary for libgl-xlib/libgl-gdi
>> -bridge_glapi_objects = mapi_objects(env, 'glapi', 'bridge')
>> -bridge_glapi = env.ConvenienceLibrary(
>> - target = 'glapi_bridge',
>> - source = bridge_glapi_objects,
>> -)
>> -
>> -Export(['shared_glapi', 'bridge_glapi'])
>> +Export(['shared_glapi'])
>> diff --git a/src/mesa/SConscript b/src/mesa/SConscript
>> index 5a21b64f561..eaf23fbae18 100644
>> --- a/src/mesa/SConscript
>> +++ b/src/mesa/SConscript
>> @@ -27,10 +27,8 @@ if env['platform'] == 'windows':
>> env.Append(CPPDEFINES = [
>> '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
>> 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
>> + '_GLAPI_NO_EXPORTS', # prevent _glapi_* from being declared __declspec(dllimport)
>> ])
>> - if not env['gles']:
>> - # prevent _glapi_* from being declared __declspec(dllimport)
>> - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
>>
>> # parse Makefile.sources
>> source_lists = env.ParseSourceList('Makefile.sources')
>> diff --git a/src/mesa/drivers/osmesa/SConscript b/src/mesa/drivers/osmesa/SConscript
>> index 064f3da5da9..b08a79eb8a5 100644
>> --- a/src/mesa/drivers/osmesa/SConscript
>> +++ b/src/mesa/drivers/osmesa/SConscript
>> @@ -28,10 +28,8 @@ if env['platform'] == 'windows':
>> env.AppendUnique(CPPDEFINES = [
>> '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
>> 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
>> + '_GLAPI_NO_EXPORTS', # prevent _glapi_* from being declared __declspec(dllimport)
>> ])
>> - if not env['gles']:
>> - # prevent _glapi_* from being declared __declspec(dllimport)
>> - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
>>
>> sources += ['osmesa.def']
>>
>>
More information about the mesa-dev
mailing list