Lines 37-43
Link Here
|
37 |
|
37 |
|
38 |
import SCons.Util |
38 |
import SCons.Util |
39 |
|
39 |
|
40 |
import aixcc |
|
|
41 |
import link |
40 |
import link |
42 |
|
41 |
|
43 |
cplusplus = __import__('c++', globals(), locals(), []) |
42 |
cplusplus = __import__('c++', globals(), locals(), []) |
Lines 62-73
Link Here
|
62 |
env['SHLIBSUFFIX'] = '.a' |
61 |
env['SHLIBSUFFIX'] = '.a' |
63 |
|
62 |
|
64 |
def exists(env): |
63 |
def exists(env): |
65 |
path, _cc, _shcc, version = aixcc.get_xlc(env) |
64 |
# TODO: sync with link.smart_link() to choose a linker |
66 |
if path and _cc: |
65 |
linkers = { 'CXX': ['aixc++'], 'CC': ['aixcc'] } |
67 |
xlc = os.path.join(path, _cc) |
66 |
alltools = [] |
68 |
if os.path.exists(xlc): |
67 |
for langvar, linktools in linkers.items(): |
69 |
return xlc |
68 |
if langvar in env: # use CC over CXX when user specified CC but not CXX |
70 |
return None |
69 |
return SCons.Tool.FindTool(linktools, env) |
|
|
70 |
alltools.extend(linktools) |
71 |
return SCons.Tool.FindTool(alltools, env) |
71 |
|
72 |
|
72 |
# Local Variables: |
73 |
# Local Variables: |
73 |
# tab-width:4 |
74 |
# tab-width:4 |