Debian Codegraph @

waflib/Tools/clang.py

raw
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Krzysztof Kosiński 2014
4
5 """
6 Detect the Clang C compiler
7 """
8
9 from waflib.Tools import ccroot, ar, gcc
10 from waflib.Configure import conf
11
12 @conf
13 def find_clang(conf):
14 """
15 Finds the program clang and executes it to ensure it really is clang
16 """
17 cc = conf.find_program('clang', var='CC')
18 conf.get_cc_version(cc, clang=True)
19 conf.env.CC_NAME = 'clang'
20
21 def configure(conf):
22 conf.find_clang()
23 conf.find_program(['llvm-ar', 'ar'], var='AR')
24 conf.find_ar()
25 conf.gcc_common_flags()
26 conf.gcc_modifier_platform()
27 conf.cc_load_tools()
28 conf.cc_add_flags()
29 conf.link_add_flags()