From: Vinson Lee Date: Wed, 25 Jul 2012 06:02:18 +0000 (-0700) Subject: scons: Fix build with clang. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f109ca4e8ca2c1f0a60b52fa79dd907777e8bee;p=mesa.git scons: Fix build with clang. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/scons/gallium.py b/scons/gallium.py index 001a5def1a7..458651b4513 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -140,6 +140,7 @@ def generate(env): env['gcc'] = 'gcc' in os.path.basename(env['CC']).split('-') env['msvc'] = env['CC'] == 'cl' env['suncc'] = env['platform'] == 'sunos' and os.path.basename(env['CC']) == 'cc' + env['clang'] = env['CC'] == 'clang' if env['msvc'] and env['toolchain'] == 'default' and env['machine'] == 'x86_64': # MSVC x64 support is broken in earlier versions of scons @@ -482,7 +483,7 @@ def generate(env): env.Append(SHLINKFLAGS = shlinkflags) # We have C++ in several libraries, so always link with the C++ compiler - if env['gcc']: + if env['gcc'] or env['clang']: env['LINK'] = env['CXX'] # Default libs diff --git a/src/gallium/winsys/svga/drm/SConscript b/src/gallium/winsys/svga/drm/SConscript index ee782c8b031..2d511d2bb5e 100644 --- a/src/gallium/winsys/svga/drm/SConscript +++ b/src/gallium/winsys/svga/drm/SConscript @@ -4,7 +4,7 @@ env = env.Clone() env.PkgUseModules('DRM') -if env['gcc']: +if env['gcc'] or env['clang']: env.Append(CCFLAGS = ['-fvisibility=hidden']) env.Append(CPPDEFINES = [ 'HAVE_STDINT_H',