1#!/usr/bin/env python 2# encoding: utf-8 3# Thomas Nagy 2009-2018 (ita) 4 5""" 6Detect the Clang++ C++ compiler 7""" 8 9from waflib.Tools import ccroot, ar, gxx 10from waflib.Configure import conf 11 12@conf 13def 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 21def configure(conf): 22 conf.find_clangxx() 23 conf.find_program(['llvm-ar', 'ar'], var='AR') 24 conf.find_ar() 25 conf.gxx_common_flags() 26 conf.gxx_modifier_platform() 27 conf.cxx_load_tools() 28 conf.cxx_add_flags() 29 conf.link_add_flags() 30 31