Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clang, clang++ to default tool search #4600

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
methods don't have a problem if passed an OE instance.
- Fix a problem with compilation_db component initialization - the
entries for assembler files were not being set up correctly.
- Add clang and clang++ to the default tool search orders for POSIX
and Windows platforms. These will be searched for after gcc and g++,
respectively. Does not affect expliclity requested tool lists.
Note: on Windows, SCons currently only has builtin support for
clang, not for clang-cl, the version of the frontend that uses
cl.exe-compatible command line switches.


RELEASE 4.8.1 - Tue, 03 Sep 2024 17:22:20 -0700
Expand Down
7 changes: 7 additions & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ IMPROVEMENTS
Calling AddOption with the full set of arguments (option names and
attributes) to set up the option is still the recommended approach.

- Add clang and clang++ to the default tool search orders for POSIX
and Windows platforms. These will be searched for after gcc and g++,
respectively. Does not affect expliclity requested tool lists. Note:
on Windows, SCons currently only has builtin support for clang, not
for clang-cl, the version of the frontend that uses cl.exe-compatible
command line switches.

PACKAGING
---------

Expand Down
8 changes: 4 additions & 4 deletions SCons/Tool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,8 @@ def tool_list(platform, env):
if str(platform) == 'win32':
"prefer Microsoft tools on Windows"
linkers = ['mslink', 'gnulink', 'ilink', 'linkloc', 'ilink32']
c_compilers = ['msvc', 'mingw', 'gcc', 'intelc', 'icl', 'icc', 'cc', 'bcc32']
cxx_compilers = ['msvc', 'intelc', 'icc', 'g++', 'cxx', 'bcc32']
c_compilers = ['msvc', 'mingw', 'gcc', 'clang', 'intelc', 'icl', 'icc', 'cc', 'bcc32']
cxx_compilers = ['msvc', 'intelc', 'icc', 'g++', 'clang++', 'cxx', 'bcc32']
assemblers = ['masm', 'nasm', 'gas', '386asm']
fortran_compilers = ['gfortran', 'g77', 'ifl', 'cvf', 'f95', 'f90', 'fortran']
ars = ['mslib', 'ar', 'tlib']
Expand Down Expand Up @@ -757,8 +757,8 @@ def tool_list(platform, env):
else:
"prefer GNU tools on all other platforms"
linkers = ['gnulink', 'ilink']
c_compilers = ['gcc', 'intelc', 'icc', 'cc']
cxx_compilers = ['g++', 'intelc', 'icc', 'cxx']
c_compilers = ['gcc', 'clang', 'intelc', 'icc', 'cc']
cxx_compilers = ['g++', 'clang++', 'intelc', 'icc', 'cxx']
assemblers = ['gas', 'nasm', 'masm']
fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77']
ars = ['ar', ]
Expand Down
3 changes: 3 additions & 0 deletions doc/man/scons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ searches in order for the
&MSVC; tools,
the MinGW tool chain,
the Intel compiler tools,
the GCC tools,
the LLVM/clang tools,
and the PharLap ETS compiler.
On Windows system which identify as <emphasis>cygwin</emphasis>
(that is, if &scons; is invoked from a cygwin shell),
Expand All @@ -472,6 +474,7 @@ including POSIX (Linux and UNIX) and macOS platforms,
&scons;
searches in order
for the GCC tool chain,
the LLVM/clang tools,
and the Intel compiler tools.
The defaul tool selection can be pre-empted
through the use of the <parameter>tools</parameter>
Expand Down
Loading