thirdparty:waf: New files for waf 1.9.10
[vlendec/samba-autobuild/.git] / third_party / waf / waflib / Tools / clang.py
1 #! /usr/bin/env python
2 # encoding: utf-8
3 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
4
5 #!/usr/bin/env python
6 # encoding: utf-8
7 # Krzysztof KosiƄski 2014
8
9 """
10 Detect the Clang C compiler
11 """
12
13 from waflib.Tools import ccroot, ar, gcc
14 from waflib.Configure import conf
15
16 @conf
17 def find_clang(conf):
18         """
19         Finds the program clang and executes it to ensure it really is clang
20         """
21         cc = conf.find_program('clang', var='CC')
22         conf.get_cc_version(cc, clang=True)
23         conf.env.CC_NAME = 'clang'
24
25 def configure(conf):
26         conf.find_clang()
27         conf.find_program(['llvm-ar', 'ar'], var='AR')
28         conf.find_ar()
29         conf.gcc_common_flags()
30         conf.gcc_modifier_platform()
31         conf.cc_load_tools()
32         conf.cc_add_flags()
33         conf.link_add_flags()