summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2013-04-24 22:02:18 +0100
committerJosé Fonseca <jfonseca@vmware.com>2013-04-25 11:59:01 +0100
commit1687932d2b54746349f3129aff14bfbdf9e8fb25 (patch)
treeb80b254d57be79e0ceccdfd9d3dda7aff2a85fd9 /src
parentf0c296773d5c5a9c3d933a51ce6c5580a7e2c4e0 (diff)
scons: Support clang.
clang is supports most gcc options / extensions, with a some exceptions. The biggest advantage of using clang is that compilation times are much short. One can tell scons to use clang when building by invoking it as CC=clang CXX=clang++ scons libgl-xlib
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/SConscript2
-rw-r--r--src/mapi/glapi/SConscript3
-rw-r--r--src/mesa/SConscript3
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/SConscript b/src/gallium/drivers/svga/SConscript
index 94c35ed712d..2051a3e0a87 100644
--- a/src/gallium/drivers/svga/SConscript
+++ b/src/gallium/drivers/svga/SConscript
@@ -6,7 +6,7 @@ if env['suncc']:
print 'warning: not building svga'
Return()
-if env['gcc']:
+if env['gcc'] or env['clang']:
env.Append(CPPDEFINES = [
'HAVE_STDINT_H',
'HAVE_SYS_TYPES_H',
diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
index 79cbb6a40d1..ac11148ffcf 100644
--- a/src/mapi/glapi/SConscript
+++ b/src/mapi/glapi/SConscript
@@ -49,7 +49,8 @@ for s in mapi_sources:
#
# Assembly sources
#
-if env['gcc'] and env['platform'] not in ('cygwin', 'darwin', 'windows'):
+if (env['gcc'] or env['clang']) and \
+ env['platform'] not in ('cygwin', 'darwin', 'windows'):
GLAPI = '#src/mapi/glapi/'
if env['machine'] == 'x86':
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index 3cd0f87ef5f..15b62692a62 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -351,7 +351,8 @@ get_hash_header = env.CodeGenerate(
#
# Assembly sources
#
-if env['gcc'] and env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
+if (env['gcc'] or env['clang']) and \
+ env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
if env['machine'] == 'x86':
env.Append(CPPDEFINES = [
'USE_X86_ASM',