From 53869829d28ea2fd862619bf82d48cc7c50844a0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 7 Jul 2017 02:58:02 +0300 Subject: [PATCH] Add support for in common.format-name --- src/tools/common.jam | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/tools/common.jam b/src/tools/common.jam index 04b87accb..e1af5f0b0 100644 --- a/src/tools/common.jam +++ b/src/tools/common.jam @@ -857,6 +857,10 @@ rule format-name ( format * : name : type ? : property-set ) result += [ join-tag $(f:G=) : [ address-model-tag $(name) : $(type) : $(property-set) ] ] ; + case : + result += [ join-tag $(f:G=) : [ arch-and-model-tag $(name) : + $(type) : $(property-set) ] ] ; + case : local key = [ MATCH : $(f:G) ] ; local version = [ $(property-set).get <$(key)> ] ; @@ -1029,6 +1033,19 @@ local rule address-model-tag ( name : type ? : property-set ) return [ $(property-set).get ] ; } +# Create a tag for the architecture and model +# x86 32 would generate "x32" +# This relies on the fact that all architectures start with +# unique letters. +local rule arch-and-model-tag ( name : type ? : property-set ) +{ + local architecture = [ $(property-set).get ] ; + local address-model = [ $(property-set).get ] ; + + local arch = [ MATCH ^(.) : $(architecture) ] ; + + return $(arch)$(address-model) ; +} rule __test__ ( ) {