mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 13:22:11 +00:00
Allow to explicitly specify root, in case where we have trouble auto-detecting
it from the compiler name. [SVN r33453]
This commit is contained in:
@@ -17,6 +17,12 @@ import set ;
|
||||
import common ;
|
||||
import errors ;
|
||||
|
||||
if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
|
||||
{
|
||||
.debug-configuration = true ;
|
||||
}
|
||||
|
||||
|
||||
feature.extend toolset : gcc ;
|
||||
|
||||
import unix ;
|
||||
@@ -28,7 +34,6 @@ generators.override gcc.prebuilt : builtin.prebuilt ;
|
||||
generators.override gcc.searched-lib-generator : searched-lib-generator ;
|
||||
|
||||
|
||||
|
||||
# Make the "o" suffix used for gcc toolset on all
|
||||
# platforms
|
||||
type.set-generated-target-suffix OBJ : <toolset>gcc : o ;
|
||||
@@ -60,11 +65,21 @@ rule init ( version ? : command * : options * )
|
||||
|
||||
# If gcc is installed in non-standard location, we'd need to
|
||||
# add LD_LIBRARY_PATH when running programs created with it
|
||||
# (for unit-test/run rules).
|
||||
# (for unit-test/run rules).
|
||||
if $(command)
|
||||
{
|
||||
local path = [ common.get-absolute-tool-path $(command[-1]) ] ;
|
||||
local lib_path = $(path:D)/lib ;
|
||||
local root = [ feature.get-values <root> : $(options) ] ;
|
||||
if ! $(root)
|
||||
{
|
||||
root = [ common.get-absolute-tool-path $(command[-1]) ] ;
|
||||
root = $(root:D) ;
|
||||
}
|
||||
local lib_path = $(root)/lib ;
|
||||
if $(.debug-configuration)
|
||||
{
|
||||
ECHO "notice: gcc lib directory for version" $(condition) ;
|
||||
ECHO "notice: is" $(lib_path) ;
|
||||
}
|
||||
flags gcc.link RUN_PATH $(condition) : $(lib_path) ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user