thirdparty:waf: New files for waf 1.9.10
[bbaumbach/samba-autobuild/.git] / third_party / waf / waflib / Tools / clangxx.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 # Thomas Nagy 2009-2016 (ita)
8
9 """
10 Detect the Clang++ C++ compiler
11 """
12
13 from waflib.Tools import ccroot, ar, gxx
14 from waflib.Configure import conf
15
16 @conf
17 def find_clangxx(conf):
18         """
19         Finds the program clang++, and executes it to ensure it really is clang++
20         """
21         cxx = conf.find_program('clang++', var='CXX')
22         conf.get_cc_version(cxx, clang=True)
23         conf.env.CXX_NAME = 'clang'
24
25 def configure(conf):
26         conf.find_clangxx()
27         conf.find_program(['llvm-ar', 'ar'], var='AR')
28         conf.find_ar()
29         conf.gxx_common_flags()
30         conf.gxx_modifier_platform()
31         conf.cxx_load_tools()
32         conf.cxx_add_flags()
33         conf.link_add_flags()