c_bgxlc.py 706 B

1234567891011121314151617181920212223242526272829303132
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. # harald at klimachs.de
  4. """
  5. IBM XL Compiler for Blue Gene
  6. """
  7. from waflib.Tools import ccroot,ar
  8. from waflib.Configure import conf
  9. from waflib.Tools import xlc # method xlc_common_flags
  10. from waflib.Tools.compiler_c import c_compiler
  11. c_compiler['linux'].append('c_bgxlc')
  12. @conf
  13. def find_bgxlc(conf):
  14. cc = conf.find_program(['bgxlc_r','bgxlc'], var='CC')
  15. conf.get_xlc_version(cc)
  16. conf.env.CC = cc
  17. conf.env.CC_NAME = 'bgxlc'
  18. def configure(conf):
  19. conf.find_bgxlc()
  20. conf.find_ar()
  21. conf.xlc_common_flags()
  22. conf.env.LINKFLAGS_cshlib = ['-G','-Wl,-bexpfull']
  23. conf.env.LINKFLAGS_cprogram = []
  24. conf.cc_load_tools()
  25. conf.cc_add_flags()
  26. conf.link_add_flags()