waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

clang.py (623B)


      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.cc_add_flags()
     23 	conf.find_clang()
     24 	conf.find_program(['llvm-ar', 'ar'], var='AR')
     25 	conf.find_ar()
     26 	conf.gcc_common_flags()
     27 	conf.gcc_modifier_platform()
     28 	conf.cc_load_tools()
     29 	conf.link_add_flags()