diff options
author | Russel Winder <russel@winder.org.uk> | 2017-06-21 16:47:21 (GMT) |
---|---|---|
committer | Russel Winder <russel@winder.org.uk> | 2017-06-21 16:47:21 (GMT) |
commit | 5c58fce9cf4e0fc3e8d0f44ec9181700f1380092 (patch) | |
tree | ae00dd2059a0d9ad841bf3fb677b1ded3bbd0b6a /src/engine | |
parent | b6e8b657acfdfcbf3672b7c5894bf2166ab0a0c7 (diff) | |
download | SCons-5c58fce9cf4e0fc3e8d0f44ec9181700f1380092.zip SCons-5c58fce9cf4e0fc3e8d0f44ec9181700f1380092.tar.gz SCons-5c58fce9cf4e0fc3e8d0f44ec9181700f1380092.tar.bz2 |
Change the name of the tool to avoid + in filename. Add alias so clang++ still works as a tool name.
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 5 | ||||
-rw-r--r-- | src/engine/SCons/Tool/clangxx.py (renamed from src/engine/SCons/Tool/clang++.py) | 5 | ||||
-rw-r--r-- | src/engine/SCons/Tool/clangxx.xml (renamed from src/engine/SCons/Tool/clang++.xml) | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index e5b4b05..f022a1f 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -101,7 +101,10 @@ for suffix in LaTeXSuffixes: # Tool aliases are needed for those tools whos module names also # occur in the python standard library. This causes module shadowing and # can break using python library functions under python3 -TOOL_ALIASES = {'gettext':'gettext_tool'} +TOOL_ALIASES = { + 'gettext':'gettext_tool', + 'clang++': 'clangxx', +} class Tool(object): def __init__(self, name, toolpath=[], **kw): diff --git a/src/engine/SCons/Tool/clang++.py b/src/engine/SCons/Tool/clangxx.py index 07c89ad..60617db 100644 --- a/src/engine/SCons/Tool/clang++.py +++ b/src/engine/SCons/Tool/clangxx.py @@ -45,8 +45,7 @@ import sys import SCons.Tool import SCons.Util - -cplusplus = __import__(__package__ + '.c++', globals(), locals(), ['*']) +import SCons.Tool.cxx compilers = ['clang++'] @@ -54,7 +53,7 @@ def generate(env): """Add Builders and construction variables for clang++ to an Environment.""" static_obj, shared_obj = SCons.Tool.createObjBuilders(env) - cplusplus.generate(env) + SCons.Tool.cxx.generate(env) env['CXX'] = env.Detect(compilers) or 'clang++' diff --git a/src/engine/SCons/Tool/clang++.xml b/src/engine/SCons/Tool/clangxx.xml index ad30b26..25ed1d4 100644 --- a/src/engine/SCons/Tool/clang++.xml +++ b/src/engine/SCons/Tool/clangxx.xml @@ -23,7 +23,7 @@ See its __doc__ string for a discussion of the format. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd"> -<tool name="clang++"> +<tool name="clangxx"> <summary> <para> Set construction variables for the Clang C++ compiler. |