scons: Whenever possible decide what to do based on platform and not compiler.
Because compilers like GCC and Clang are effectively available everywhere so their presence/absence is seldom conclusive. Furthermore, all compilers we use now have stdint.h. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
c068610a7d
commit
9a25c8af1b
|
@ -8,10 +8,9 @@ if env['suncc']:
|
||||||
print 'warning: not building svga'
|
print 'warning: not building svga'
|
||||||
Return()
|
Return()
|
||||||
|
|
||||||
if env['gcc'] or env['clang']:
|
env.Append(CPPDEFINES = [
|
||||||
env.Append(CPPDEFINES = [
|
'HAVE_STDINT_H',
|
||||||
'HAVE_STDINT_H',
|
])
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
env.Prepend(CPPPATH = [
|
||||||
'include',
|
'include',
|
||||||
|
|
|
@ -4,12 +4,10 @@ env = env.Clone()
|
||||||
|
|
||||||
env.PkgUseModules('DRM')
|
env.PkgUseModules('DRM')
|
||||||
|
|
||||||
if env['gcc'] or env['clang'] or env['icc']:
|
env.Append(CPPDEFINES = [
|
||||||
env.Append(CCFLAGS = ['-fvisibility=hidden'])
|
'HAVE_STDINT_H',
|
||||||
env.Append(CPPDEFINES = [
|
'-D_FILE_OFFSET_BITS=64',
|
||||||
'HAVE_STDINT_H',
|
])
|
||||||
'-D_FILE_OFFSET_BITS=64',
|
|
||||||
])
|
|
||||||
|
|
||||||
env.Prepend(CPPPATH = [
|
env.Prepend(CPPPATH = [
|
||||||
'#/src/gallium/drivers/svga',
|
'#/src/gallium/drivers/svga',
|
||||||
|
|
|
@ -52,8 +52,7 @@ for s in mapi_sources:
|
||||||
#
|
#
|
||||||
# Assembly sources
|
# Assembly sources
|
||||||
#
|
#
|
||||||
if (env['gcc'] or env['clang']) and \
|
if env['platform'] not in ('cygwin', 'darwin', 'windows'):
|
||||||
env['platform'] not in ('cygwin', 'darwin', 'windows'):
|
|
||||||
GLAPI = '#src/mapi/glapi/'
|
GLAPI = '#src/mapi/glapi/'
|
||||||
sources = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
|
sources = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,7 @@ format_unpack = env.CodeGenerate(
|
||||||
#
|
#
|
||||||
# Assembly sources
|
# Assembly sources
|
||||||
#
|
#
|
||||||
if (env['gcc'] or env['clang']) and \
|
if env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
|
||||||
env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
|
|
||||||
if env['machine'] == 'x86':
|
if env['machine'] == 'x86':
|
||||||
env.Append(CPPDEFINES = [
|
env.Append(CPPDEFINES = [
|
||||||
'USE_X86_ASM',
|
'USE_X86_ASM',
|
||||||
|
|
Loading…
Reference in New Issue