mirror of
https://github.com/boostorg/build.git
synced 2026-02-13 12:22:17 +00:00
Clean up conditional flags when the condition is not needed.
This commit is contained in:
@@ -95,11 +95,11 @@ rule init ( version ? : command * : options * )
|
||||
}
|
||||
if ! $(jv) || [ version.version-less [ version.version-split $(jv) ] : 6 30 ]
|
||||
{
|
||||
init-earlier-releases $(condition) ;
|
||||
init-earlier-releases ;
|
||||
}
|
||||
else
|
||||
{
|
||||
init-later-releases $(condition) ;
|
||||
init-later-releases ;
|
||||
}
|
||||
|
||||
if $(just_bcc32) && ( $(just_bcc32[1]) = bcc32 )
|
||||
@@ -108,41 +108,41 @@ rule init ( version ? : command * : options * )
|
||||
}
|
||||
}
|
||||
|
||||
local rule init-earlier-releases ( condition )
|
||||
local rule init-earlier-releases ( )
|
||||
{
|
||||
|
||||
# Deal with various runtime configs...
|
||||
|
||||
# This should be not for DLL
|
||||
flags borland OPTIONS $(condition)/<user-interface>console : -tWC ;
|
||||
flags borland OPTIONS <user-interface>console : -tWC ;
|
||||
|
||||
# -tWR sets -tW as well, so we turn it off here and then turn it
|
||||
# on again later if we need it:
|
||||
flags borland OPTIONS $(condition)/<runtime-link>shared : -tWR -tWC ;
|
||||
flags borland OPTIONS <runtime-link>shared : -tWR -tWC ;
|
||||
|
||||
flags borland OPTIONS $(condition)/<main-target-type>LIB/<link>shared : -tWD ;
|
||||
flags borland OPTIONS <main-target-type>LIB/<link>shared : -tWD ;
|
||||
# Hmm.. not sure what's going on here.
|
||||
flags borland OPTIONS $(condition) : -WM- ;
|
||||
flags borland OPTIONS $(condition)/<threading>multi : -tWM ;
|
||||
flags borland OPTIONS : -WM- ;
|
||||
flags borland OPTIONS <threading>multi : -tWM ;
|
||||
|
||||
flags borland.link OPTIONS $(condition)/<link>shared : -tWD ;
|
||||
flags borland.link OPTIONS <link>shared : -tWD ;
|
||||
|
||||
}
|
||||
|
||||
local rule init-later-releases ( condition )
|
||||
local rule init-later-releases ( )
|
||||
{
|
||||
|
||||
# Deal with various runtime configs...
|
||||
|
||||
# This should be not for DLL
|
||||
flags borland OPTIONS $(condition)/<user-interface>console : -tC ;
|
||||
flags borland OPTIONS <user-interface>console : -tC ;
|
||||
|
||||
flags borland OPTIONS $(condition)/<runtime-link>shared : -tR ;
|
||||
flags borland OPTIONS <runtime-link>shared : -tR ;
|
||||
|
||||
flags borland OPTIONS $(condition)/<main-target-type>LIB/<link>shared : -tD ;
|
||||
flags borland OPTIONS $(condition)/<threading>multi : -tM ;
|
||||
flags borland OPTIONS <main-target-type>LIB/<link>shared : -tD ;
|
||||
flags borland OPTIONS <threading>multi : -tM ;
|
||||
|
||||
flags borland.link.dll OPTIONS $(condition)/<link>shared : -tD ;
|
||||
flags borland.link.dll OPTIONS <link>shared : -tD ;
|
||||
|
||||
}
|
||||
|
||||
@@ -220,11 +220,11 @@ actions compile.c
|
||||
|
||||
|
||||
# Declare flags and action for linking
|
||||
toolset.flags borland.link OPTIONS <debug-symbols>on : -v ;
|
||||
toolset.flags borland.link LIBRARY_PATH <library-path> ;
|
||||
toolset.flags borland.link FINDLIBS_ST <find-static-library> ;
|
||||
toolset.flags borland.link FINDLIBS_SA <find-shared-library> ;
|
||||
toolset.flags borland.link LIBRARIES <library-file> ;
|
||||
flags borland.link OPTIONS <debug-symbols>on : -v ;
|
||||
flags borland.link LIBRARY_PATH <library-path> ;
|
||||
flags borland.link FINDLIBS_ST <find-static-library> ;
|
||||
flags borland.link FINDLIBS_SA <find-shared-library> ;
|
||||
flags borland.link LIBRARIES <library-file> ;
|
||||
|
||||
flags borland.link OPTIONS <linkflags> ;
|
||||
|
||||
|
||||
@@ -75,12 +75,6 @@ rule init ( version ? : command * : options * ) {
|
||||
}
|
||||
}
|
||||
|
||||
local opt_console = -tC ;
|
||||
local opt_shared = -tD ;
|
||||
local opt_mt = -tM ;
|
||||
local opt_drtl = -tR ;
|
||||
local opt_dapp = -tW ;
|
||||
|
||||
# Determine the version
|
||||
if $(command) {
|
||||
local command-string = \"$(command)\" ;
|
||||
@@ -181,54 +175,34 @@ rule init ( version ? : command * : options * ) {
|
||||
else
|
||||
{
|
||||
|
||||
local lib_path = $(root)/bin $(root)/bin64 $(root)/Bpl C:/Users/Public/Documents/Embarcadero
|
||||
if $(.debug-configuration)
|
||||
local lib_path = $(root)/bin $(root)/bin64 $(root)/Bpl C:/Users/Public/Documents/Embarcadero
|
||||
if $(.debug-configuration)
|
||||
{
|
||||
ECHO "notice:" using Embarcadero libraries with clang compilation"::" $(condition) "::" $(lib_path) ;
|
||||
}
|
||||
flags embarcadero.link RUN_PATH $(condition) : $(lib_path) ;
|
||||
|
||||
local system_include_option = "-isystem ";
|
||||
local system_include_directories = ${root}/include/windows/crtl ${root}/include/windows/sdk ${root}/include/windows/rtl ${root}/include/dinkumware64 ;
|
||||
|
||||
flags embarcadero.compile OPTIONS $(condition) : $(system_include_option)$(system_include_directories) ;
|
||||
|
||||
local lib_dir_release ;
|
||||
local lib_dir_debug ;
|
||||
|
||||
if $(compiler) = bcc32c || $(compiler) = bcc32x
|
||||
{
|
||||
ECHO "notice:" using Embarcadero libraries with clang compilation"::" $(condition) "::" $(lib_path) ;
|
||||
lib_dir_release = $(root)/lib/win32c/release $(root)/lib/win32/release $(root)/lib/win32/release/psdk ;
|
||||
lib_dir_debug = $(root)/lib/win32c/debug $(root)/lib/win32/debug $(root)/lib/win32/debug/psdk ;
|
||||
}
|
||||
flags embarcadero.link RUN_PATH $(condition) : $(lib_path) ;
|
||||
|
||||
local system_include_option = "-isystem ";
|
||||
local system_include_directories = ${root}/include/windows/crtl ${root}/include/windows/sdk ${root}/include/windows/rtl ${root}/include/dinkumware64 ;
|
||||
local lib_dir_release ;
|
||||
local lib_dir_debug ;
|
||||
|
||||
if $(compiler) = bcc32c || $(compiler) = bcc32x
|
||||
{
|
||||
lib_dir_release = $(root)/lib/win32c/release $(root)/lib/win32/release $(root)/lib/win32/release/psdk ;
|
||||
lib_dir_debug = $(root)/lib/win32c/debug $(root)/lib/win32/debug $(root)/lib/win32/debug/psdk ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lib_dir_release = $(root)/lib/win64/release $(root)/lib/win64/release/psdk ;
|
||||
lib_dir_debug = $(root)/lib/win64/debug $(root)/lib/win64/debug/psdk ;
|
||||
}
|
||||
|
||||
flags embarcadero.link LINKPATH $(condition)/<variant>release : $(lib_dir_release) ;
|
||||
flags embarcadero.link LINKPATH $(condition)/<variant>debug : $(lib_dir_debug) $(lib_dir_release) ;
|
||||
|
||||
local cflags = -c ;
|
||||
local cxxflags = -P ;
|
||||
local lflags = -lS:1048576 -lSc:4098 -lH:1048576 -lHc:8192 ;
|
||||
local lflag_debug = -v ;
|
||||
local compile_flags = -O2 -DNDEBUG ;
|
||||
local compile_flags_debug = -O0 -g ;
|
||||
|
||||
|
||||
flags embarcadero OPTIONS $(condition)/<user-interface>console : $(opt_console) ;
|
||||
flags embarcadero OPTIONS $(condition)/<runtime-link>shared : $(opt_drtl) ;
|
||||
flags embarcadero OPTIONS $(condition)/<main-target-type>LIB/<link>shared : $(opt_shared) ;
|
||||
flags embarcadero OPTIONS $(condition)/<threading>multi : $(opt_mt) ;
|
||||
flags embarcadero.link.dll OPTIONS $(condition)/<link>shared : $(opt_shared) ;
|
||||
flags embarcadero OPTIONS <user-interface>gui : $(opt_dapp) ;
|
||||
|
||||
flags embarcadero.compile OPTIONS $(condition) : $(cflags) $(system_include_option)$(system_include_directories) ;
|
||||
flags embarcadero.compile.c++ OPTIONS $(condition) : $(cxxflags) ;
|
||||
|
||||
flags embarcadero.compile OPTIONS $(condition)/<variant>release : $(compile_flags) ;
|
||||
flags embarcadero.compile OPTIONS $(condition)/<variant>debug : $(compile_flags_debug) ;
|
||||
flags embarcadero.link OPTIONS $(condition) : $(lflags) ;
|
||||
flags embarcadero.link OPTIONS $(condition)/<variant>debug : $(lflag_debug) ;
|
||||
else
|
||||
{
|
||||
lib_dir_release = $(root)/lib/win64/release $(root)/lib/win64/release/psdk ;
|
||||
lib_dir_debug = $(root)/lib/win64/debug $(root)/lib/win64/debug/psdk ;
|
||||
}
|
||||
|
||||
flags embarcadero.link LINKPATH $(condition)/<variant>release : $(lib_dir_release) ;
|
||||
flags embarcadero.link LINKPATH $(condition)/<variant>debug : $(lib_dir_debug) $(lib_dir_release) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -293,12 +267,28 @@ local rule get_bds_version ( sdir )
|
||||
###############################################################################
|
||||
# Flags
|
||||
|
||||
flags embarcadero OPTIONS $(condition)/<user-interface>console : $(opt_console) ;
|
||||
flags embarcadero OPTIONS $(condition)/<runtime-link>shared : $(opt_drtl) ;
|
||||
flags embarcadero OPTIONS $(condition)/<main-target-type>LIB/<link>shared : $(opt_shared) ;
|
||||
flags embarcadero OPTIONS $(condition)/<threading>multi : $(opt_mt) ;
|
||||
flags embarcadero.link.dll OPTIONS $(condition)/<link>shared : $(opt_shared) ;
|
||||
flags embarcadero OPTIONS <user-interface>gui : $(opt_dapp) ;
|
||||
local opt_console = -tC ;
|
||||
local opt_shared = -tD ;
|
||||
local opt_mt = -tM ;
|
||||
local opt_drtl = -tR ;
|
||||
local opt_dapp = -tW ;
|
||||
local opt_cxxflag = -P ;
|
||||
local opt_compile_flags = -O2 -DNDEBUG ;
|
||||
local opt_compile_flags_debug = -O0 -g ;
|
||||
local opt_lflags = -lS:1048576 -lSc:4098 -lH:1048576 -lHc:8192 ;
|
||||
local opt_lflag_debug = -v ;
|
||||
|
||||
flags embarcadero OPTIONS <user-interface>console : $(opt_console) ;
|
||||
flags embarcadero OPTIONS <runtime-link>shared : $(opt_drtl) ;
|
||||
flags embarcadero OPTIONS <main-target-type>LIB/<link>shared : $(opt_shared) ;
|
||||
flags embarcadero OPTIONS <threading>multi : $(opt_mt) ;
|
||||
flags embarcadero.link.dll OPTIONS <link>shared : $(opt_shared) ;
|
||||
flags embarcadero OPTIONS <user-interface>gui : $(opt_dapp) ;
|
||||
flags embarcadero.compile.c++ OPTIONS : $(opt_cxxflag) ;
|
||||
flags embarcadero.compile OPTIONS <variant>release : $(opt_compile_flags) ;
|
||||
flags embarcadero.compile OPTIONS <variant>debug : $(opt_compile_flags_debug) ;
|
||||
flags embarcadero.link OPTIONS : $(opt_lflags) ;
|
||||
flags embarcadero.link OPTIONS <variant>debug : $(opt_lflag_debug) ;
|
||||
|
||||
###############################################################################
|
||||
# C and C++ compilation
|
||||
|
||||
Reference in New Issue
Block a user