sdl/scons: add option to build with llvm-clang(++)
This commit is contained in:
parent
83c4530df2
commit
e5b3d6ddd3
|
@ -22,8 +22,8 @@ opts.AddVariables(
|
||||||
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
|
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
|
||||||
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),
|
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),
|
||||||
BoolVariable('GTK3', 'Enable GTK3 GUI (SDL only)', 0),
|
BoolVariable('GTK3', 'Enable GTK3 GUI (SDL only)', 0),
|
||||||
|
BoolVariable('CLANG', 'Compile with llvm-clang instead of gcc', 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix')
|
AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix')
|
||||||
|
|
||||||
prefix = GetOption('prefix')
|
prefix = GetOption('prefix')
|
||||||
|
@ -60,6 +60,11 @@ if os.environ.has_key('LDFLAGS'):
|
||||||
|
|
||||||
print "platform: ", env['PLATFORM']
|
print "platform: ", env['PLATFORM']
|
||||||
|
|
||||||
|
# compile with clang
|
||||||
|
if env['CLANG']:
|
||||||
|
env.Replace(CC='clang')
|
||||||
|
env.Replace(CXX='clang++')
|
||||||
|
|
||||||
# special flags for cygwin
|
# special flags for cygwin
|
||||||
# we have to do this here so that the function and lib checks will go through mingw
|
# we have to do this here so that the function and lib checks will go through mingw
|
||||||
if env['PLATFORM'] == 'cygwin':
|
if env['PLATFORM'] == 'cygwin':
|
||||||
|
|
Loading…
Reference in New Issue