clangxx.py (647B)
1 #!/usr/bin/env python 2 # encoding: utf-8 3 # Thomas Nagy 2009-2018 (ita) 4 5 """ 6 Detect the Clang++ C++ compiler 7 """ 8 9 from waflib.Tools import ccroot, ar, gxx 10 from waflib.Configure import conf 11 12 @conf 13 def find_clangxx(conf): 14 """ 15 Finds the program clang++, and executes it to ensure it really is clang++ 16 """ 17 cxx = conf.find_program('clang++', var='CXX') 18 conf.get_cc_version(cxx, clang=True) 19 conf.env.CXX_NAME = 'clang' 20 21 def configure(conf): 22 conf.cxx_add_flags() 23 conf.find_clangxx() 24 conf.find_program(['llvm-ar', 'ar'], var='AR') 25 conf.find_ar() 26 conf.gxx_common_flags() 27 conf.gxx_modifier_platform() 28 conf.cxx_load_tools() 29 conf.link_add_flags()