third_party:waf: update to upstream 2.0.4 release
[bbaumbach/samba.git] / third_party / waf / waflib / extras / c_bgxlc.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 # harald at klimachs.de
8
9 """
10 IBM XL Compiler for Blue Gene
11 """
12
13 from waflib.Tools import ccroot,ar
14 from waflib.Configure import conf
15
16 from waflib.Tools import xlc # method xlc_common_flags
17 from waflib.Tools.compiler_c import c_compiler
18 c_compiler['linux'].append('c_bgxlc')
19
20 @conf
21 def find_bgxlc(conf):
22         cc = conf.find_program(['bgxlc_r','bgxlc'], var='CC')
23         conf.get_xlc_version(cc)
24         conf.env.CC = cc
25         conf.env.CC_NAME = 'bgxlc'
26
27 def configure(conf):
28         conf.find_bgxlc()
29         conf.find_ar()
30         conf.xlc_common_flags()
31         conf.env.LINKFLAGS_cshlib = ['-G','-Wl,-bexpfull']
32         conf.env.LINKFLAGS_cprogram = []
33         conf.cc_load_tools()
34         conf.cc_add_flags()
35         conf.link_add_flags()
36