diff --git a/v1/boost-base.jam b/v1/boost-base.jam index 300ae73a0..99e67c348 100644 --- a/v1/boost-base.jam +++ b/v1/boost-base.jam @@ -458,6 +458,28 @@ rule get-values return $(_properties:G=) ; } +rule replace-properties ( property-set * : new-properties * ) +{ + local result = ; + for local x in $(property-set) + { + if $(x:G) in $(new-properties:G) + { + if ! $(x:G) in $(result:G) + { + result += [ get-properties $(x:G) : $(new-properties) ] ; + } + + } + else + { + result += $(x) ; + } + } + return $(result) ; +} + + # normalize-properties properties # # Normalizes a set of (possibly qualified) properties by prepending <*> as many @@ -474,6 +496,14 @@ rule normalize-properties case <*>* : result += <*>$(property) ; case * : result += <*><*>$(property) ; + case <*><*><*>* : result += $(property) ; + case <*><*><*>* : result += <*>$(property) ; + case <*><*>* : result += $(property) ; + case <*><*>* : result += <*><*>$(property) ; + case <*>* : result += <*>$(property) ; + case <*>* : result += <*><*><*>$(property) ; + case * : result += <*><*>$(property) ; + case <*><*><*><*@*>* : result += $(property) ; case <*><*><*@*>* : result += <*>$(property) ; case <*><*@*>* : result += <*><*>$(property) ; @@ -1071,13 +1101,11 @@ rule segregate-overrides $(>) = [ get-properties $(kept-features) : $($(>)) ] ; } -# report-free-property-conflicts free-property... : target -# # If any single-valued free-feature appears more than once in free-property..., # exit with an appropriate error message. -rule report-free-property-conflicts +rule report-free-property-conflicts ( free-property * : target + ) { - local p = [ get-properties $(gSINGLE_VALUED_FREE_FEATURES) $(<) ] ; + local p = [ get-properties $(gSINGLE_VALUED_FREE_FEATURES) : $(free-property) ] ; local f = [ unique $(p:G) ] ; if $(p:G) != $(f) { @@ -1086,28 +1114,22 @@ rule report-free-property-conflicts } } -# expand-build-request -# toolset variant target-name : requirements : build-request -# # Returns a list of path-property-sets (see make-path-property-sets above) for # all build configurations based on the given toolset, requirements, and # build-request. Target-name is just used for error reporting. -rule expand-build-request +rule expand-build-request ( toolset variant target : raw-requirements * : raw-build-request * ) { - local toolset = $(<[1]) ; - local variant = $(<[2]) ; - # grab the requirements and BUILD-request relevant to this toolset and variant - local requirements = [ select-properties $(toolset) $(variant) : $(>) ] ; - local build-request = [ select-properties $(toolset) $(variant) : $(3) ] ; + local requirements = [ select-properties $(toolset) $(variant) : $(raw-requirements) ] ; + local build-request = [ select-properties $(toolset) $(variant) : $(raw-build-request) ] ; # Separate the free features (e.g. , , ) from the others local free-properties = [ segregate-free-properties requirements build-request ] ; # Check for conflicts - report-free-property-conflicts $(free-properties) : $(<[3]) ; + report-free-property-conflicts $(free-properties) : $(target) ; build-request = [ remove-incompatible-builds $(requirements) - : $(build-request) : $(<[3]) ] ; + : $(build-request) : $(target) ] ; if $(build-request) != SKIP { @@ -1129,6 +1151,7 @@ rule expand-build-request ] ; local defaulted-properties = [ feature-default $(defaulted-features) ] ; + # VP: defaulted-properties have the form value and there's 1 value. # Hence, each element of defaulted-properties will be part of each # component of override-sets and will be a part of each property-set @@ -1136,6 +1159,28 @@ rule expand-build-request # way: free properties does not show up in target path. local defaulted-free-properties = [ segregate-free-properties defaulted-properties ] ; + # + # Allow properties and rules to take effect. + # + local default-requirements = [ get-values : $(free-properties) ] ; + + defaulted-properties = [ replace-properties $(defaulted-properties) + : [ select-gristed $(default-requirements) ] ] ; + + local non-defaults = $(requirements) $(build-request) $(free-properties) ; + + for local r in [ select-ungristed $(default-requirements) ] + { + local x = [ $(r) $(toolset) $(variant) : $(non-defaults) ] ; + # ECHO $(r) yields $(x) ; + # ECHO defaulted-properties= $(defaulted-properties) ; + defaulted-properties = [ + replace-properties $(defaulted-properties) : $(x) ] ; + } + + # In case any defaults should conflict with the requirements, + # force them to match up. + defaulted-properties = [ replace-properties $(defaulted-properties) : $(requirements) ] ; # form override property sets of the form (property1[/property2...] )+, # sorted in feature order. These represent the properties of subvariants diff --git a/v1/features.jam b/v1/features.jam index cc35cdf01..c922412bb 100644 --- a/v1/features.jam +++ b/v1/features.jam @@ -26,6 +26,9 @@ feature unicode-application : on off ; feature exception-handling : on off ; feature rtti : on off ; +feature stdlib : "default" gcc stlport ; + +free-feature "default" ; free-feature cflags ; free-feature linkflags ; free-feature cxxflags ; @@ -84,7 +87,7 @@ feature instruction-set : gLINK_COMPATIBLE = true ; -gALWAYS_RELEVANT = ; +gALWAYS_RELEVANT = ; ##### Requirements by target type ##### gTARGET_TYPE_REQUIREMENTS(DLL) = true ; diff --git a/v1/intel-linux-tools.jam b/v1/intel-linux-tools.jam index d173d1c65..4408f8f41 100644 --- a/v1/intel-linux-tools.jam +++ b/v1/intel-linux-tools.jam @@ -41,6 +41,7 @@ flags intel-linux INTEL_LINUX_SETUP : ". "$(INTEL_LINUX_ROOT)"/bin/iccvars.sh" ; # Additional DLL directory flags intel-linux INTEL_LINUX_RUN_LD_LIBRARY_PATH : $(INTEL_LINUX_ROOT)"/lib" ; + #### compiler and linker switches #### # debugging @@ -53,6 +54,10 @@ flags intel-linux CFLAGS off : -O0 ; flags intel-linux CFLAGS space : -O2 ; flags intel-linux CFLAGS speed : -O3 ; +# standard library +flags intel-linux CFLAGS gcc : -cxxlib-gcc ; +flags intel-linux LINKFLAGS gcc : -cxxlib-gcc ; + # inlining # results using -ip are worse than without? # flags intel-linux CFLAGS full : -ip ; diff --git a/v1/python.jam b/v1/python.jam index f2a02eebe..3a5dde1cd 100644 --- a/v1/python.jam +++ b/v1/python.jam @@ -124,7 +124,8 @@ else if $(UNIX) PYTHON_PROPERTIES ?= $(PYTHON_INCLUDES) $(PYTHON_LIB_PATH) - python-intel-use-gcc-stdlib + python-intel-use-gcc-stdlib + python-static-multithread ; if $(OS) = OSF @@ -193,13 +194,31 @@ CYGWIN_ROOT ?= c:/cygwin ; # intel-linked shared libs by a GCC-built executable unless they have # been told to use the GCC runtime. This rule adds the requisite # flags to the compile and link lines. -rule python-intel-use-gcc-stdlib ( toolset variant : properties * ) +rule python-intel-use-gcc-stdlib ( toolset variant : non-defaults * ) +{ + if ( ! $(PYTHON_WINDOWS) ) + && ( ! BOOST_PYTHON_STATIC_LIB in $(non-defaults) ) + && [ MATCH (intel) : $(toolset) ] + { + return gcc ; + } + else + { + return ; + } +} + +# Force statically-linked embedding applications to be multithreaded +# on UNIX. +rule python-static-multithread ( toolset variant : properties * ) { if ! $(PYTHON_WINDOWS) - && ! BOOST_PYTHON_STATIC_LIB in $(properties) - && [ MATCH (intel) : $(toolset) ] { - properties += -cxxlib-gcc -cxxlib-gcc ; + local x = BOOST_PYTHON_STATIC_LIB single ; + if $(x) in $(properties) + { + properties = [ difference $(properties) : single ] multi ; + } } return $(properties) ; } @@ -454,7 +473,16 @@ rule boost-python-runtest ( local dependencies = [ FGristFiles [ expand-source-names $(sources) ] ] ; source-files on $(main-target) += $(gTARGET_SOURCES($(dependencies))) ; - local result = [ boost-test $(sources) : RUN_PYD : $(requirements) : $(target) : $(local-build) ] ; + local result = [ + boost-test $(sources) + : RUN_PYD + : $(requirements) + python-intel-use-gcc-stdlib # unless otherwise + # specified, assume the GCC standard + # library is needed for intel + : $(target) + : $(local-build) + ] ; } rule boost-python-test ( name : sources + : requirements * : default-BUILD * )