import sequence ;
import toolset ;
import virtual-target ;
+import numbers ;
if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
{
# Checks that a tool can be invoked by 'command'. If command is not an absolute
-# path, checks if it can be found in 'path'. If comand is an absolute path,
+# path, checks if it can be found in 'path'. If command is an absolute path,
# check that it exists. Returns 'command' if ok or empty string otherwise.
#
local rule check-tool ( xcommand + )
# - OPTIONS for compile to the value of <compileflags> in $(options)
# - OPTIONS for compile.c to the value of <cflags> in $(options)
# - OPTIONS for compile.c++ to the value of <cxxflags> in $(options)
+# - OPTIONS for compile.asm to the value of <asmflags> in $(options)
# - OPTIONS for compile.fortran to the value of <fflags> in $(options)
# - OPTIONS for link to the value of <linkflags> in $(options)
#
toolset.flags $(toolset).compile.c++ OPTIONS $(condition) :
[ feature.get-values <cxxflags> : $(options) ] : unchecked ;
+ toolset.flags $(toolset).compile.asm OPTIONS $(condition) :
+ [ feature.get-values <asmflags> : $(options) ] : unchecked ;
+
toolset.flags $(toolset).compile.fortran OPTIONS $(condition) :
[ feature.get-values <fflags> : $(options) ] : unchecked ;
{
case darwin : tag += clang-darwin ;
case linux : tag += clang ;
+ case win : tag += clangw ;
}
}
case como* : tag += como ;
case tru64cxx* : tag += tru ;
case vacpp* : tag += xlc ;
}
- local version = [ MATCH "<toolset.*version>([0123456789]+)[.]([0123456789]*)"
+ local version = [ MATCH "<toolset.*version>([0123456789]+)[.]?([0123456789]*)"
: $(properties) ] ;
# For historical reasons, vc6.0 and vc7.0 use different naming.
if $(tag) = vc
version = 7 ;
}
}
+
+ # From GCC 5, versioning changes and minor becomes patch
+ if $(tag) = gcc && $(version[1]) && [ numbers.less 4 $(version[1]) ]
+ {
+ version = $(version[1]) ;
+ }
+
+ # Ditto, from Clang 4
+ if ( $(tag) = clang || $(tag) = clangw ) && $(version[1]) && [ numbers.less 3 $(version[1]) ]
+ {
+ version = $(version[1]) ;
+ }
+
# On intel, version is not added, because it does not matter and it is the
# version of vc used as backend that matters. Ideally, we should encode the
# backend version but that would break compatibility with V1.