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
This commit is contained in:
José Fonseca
2013-04-24 22:02:18 +01:00
parent f0c296773d
commit 1687932d2b
4 changed files with 18 additions and 14 deletions

View File

@@ -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',