mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
* Handle different spellings of the PATH environment variable for Windows
* Ungristed elements of a target's requirements are now treated as
rules which transform the target's property set. The rules must have
the following signature:
transform-properties ( toolset variant : properties * )
and should return the new property set.
* Added target name adjustment feature for Python debugging targets.
tools/build/borland-tools.jam
tools/build/gcc-tools.jam
tools/build/intel-linux.jam
tools/build/metrowerks-tools.jam
tools/build/msvc-tools.jam
tools/build/mingw-tools.jam
* Adjustments to better support Python targets
tools/build/python.jam
* Lots of adjustments for building / testing Python targets:
PYTHON_LAUNCH variable prefixes Python executable name
-- can be used to invoke debugger.
PYTHON_ARGS variable postfixes Python executable name
CYGWIN_ROOT variable can be used to specify root of cygwin installation
[SVN r12071]
123 lines
4.0 KiB
Plaintext
123 lines
4.0 KiB
Plaintext
# Microsoft Visual C++
|
|
|
|
# (C) Copyright David Abrahams 2001. Permission to copy, use,
|
|
# modify, sell and distribute this software is granted provided this
|
|
# copyright notice appears in all copies. This software is provided
|
|
# "as is" without express or implied warranty, and with no claim as
|
|
# to its suitability for any purpose.
|
|
|
|
# compute MSVC tool path
|
|
# You can either put the msvc bin directory in your PATH, or you can set
|
|
# MSVCDir to point at the msvc installation directory
|
|
if ! $(MSVCDir)
|
|
{
|
|
MSVC_ROOT ?= $(VISUALC) ;
|
|
MSVC_ROOT ?= "C:\\Program Files\\Microsoft Visual C++\\VC98" ;
|
|
MSVC_TOOL_PATH ?= "$(MSVC_ROOT)"$(SLASH)bin$(SLASH) ;
|
|
MSVC_SETUP ?= "CALL \"$(MSVC_TOOL_PATH)VCVARS32.BAT\" >nul" ;
|
|
}
|
|
else
|
|
{
|
|
MSVC_TOOL_PATH ?= "" ; # Don't clobber adjoining text if MSVCDir is already set
|
|
}
|
|
|
|
flags msvc CFLAGS <debug-symbols>on : /Zi ;
|
|
flags msvc LINKFLAGS <debug-symbols>on : /DEBUG ;
|
|
|
|
flags msvc CFLAGS <optimization>off : /Od ;
|
|
flags msvc CFLAGS <optimization>speed : /O2 ;
|
|
flags msvc CFLAGS <optimization>space : /O1 ;
|
|
flags msvc CFLAGS <inlining>off : /Ob0 ;
|
|
flags msvc CFLAGS <inlining>on : /Ob1 ;
|
|
flags msvc CFLAGS <inline>full : /Ob2 ;
|
|
flags msvc CFLAGS <exception-handling>on : /GX ;
|
|
flags msvc CFLAGS <rtti>on : /GR ;
|
|
|
|
# Note that these two options actually imply multithreading support on MSVC
|
|
# because there is no single-threaded dynamic runtime library. Specifying
|
|
# <threading>multi would be a bad idea, though, because no option would be
|
|
# matched when the build uses the default settings of <runtime-link>dynamic
|
|
# and <threading>single.
|
|
flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD ;
|
|
flags msvc CFLAGS <runtime-build>debug/<runtime-link>dynamic : /MDd ;
|
|
|
|
flags msvc CFLAGS <runtime-build>release/<runtime-link>static/<threading>single : /ML ;
|
|
flags msvc CFLAGS <runtime-build>debug/<runtime-link>static/<threading>single : /MLd ;
|
|
flags msvc CFLAGS <runtime-build>release/<runtime-link>static/<threading>multi : /MT ;
|
|
flags msvc CFLAGS <runtime-build>debug/<runtime-link>static/<threading>multi : /MTd ;
|
|
|
|
flags msvc CFLAGS <cflags> ;
|
|
flags msvc C++FLAGS <cxxflags> ;
|
|
flags msvc DEFINES <define> ;
|
|
flags msvc UNDEFS <undef> ;
|
|
flags msvc HDRS <include> ;
|
|
|
|
flags msvc STDHDRS : $(MSVCDir)$(SLASH)include ;
|
|
flags msvc STDLIBPATH : $(MSVCDir)$(SLASH)lib ;
|
|
flags msvc LIBPATH <library-path> ;
|
|
flags msvc NEEDLIBS <library-file> ;
|
|
flags msvc FINDLIBS <find-library> ;
|
|
flags msvc LINKFLAGS <target-type>$(SHARED_TYPES) : /DLL ;
|
|
|
|
#### Link ####
|
|
|
|
rule Link-action
|
|
{
|
|
with-command-file msvc-Link-action $(<) : $(>) $(NEEDLIBS) ;
|
|
if $(<[2])
|
|
{
|
|
# incremental linking a DLL causes no end of problems: if the
|
|
# actual exports don't change, the import .lib file is never
|
|
# updated. Therefore, the .lib is always out-of-date and gets
|
|
# rebuilt every time. I'm not sure that incremental linking is
|
|
# such a great idea in general, but in this case I'm sure we
|
|
# don't want it.
|
|
NOINCREMENTAL on $(<) = /INCREMENTAL:NO ;
|
|
}
|
|
}
|
|
|
|
actions together msvc-Link-action bind NEEDLIBS
|
|
{
|
|
$(MSVC_SETUP)
|
|
$(MSVC_TOOL_PATH)link /nologo $(NOINCREMENTAL) $(LINKFLAGS) /PDB:"$(<[1]:S=.pdb)" /out:"$(<[1])" /IMPLIB:$(<[2]) /LIBPATH:$(LIBPATH) /LIBPATH:$(STDLIBPATH) "$(FINDLIBS)" @"$(>)"
|
|
}
|
|
|
|
#### Cc #####
|
|
|
|
rule Cc-action
|
|
{
|
|
msvc-Cc-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions msvc-Cc-action
|
|
{
|
|
$(MSVC_SETUP)
|
|
$(MSVC_TOOL_PATH)cl /Zm400 -nologo -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -Fo"$(<)" "$(>)"
|
|
}
|
|
|
|
#### C++ ####
|
|
rule C++-action
|
|
{
|
|
msvc-C++-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions msvc-C++-action
|
|
{
|
|
$(MSVC_SETUP)
|
|
$(MSVC_TOOL_PATH)cl /Zm400 -nologo -GX -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -Fo"$(<)" -Tp"$(>)"
|
|
}
|
|
|
|
#### Archive ####
|
|
rule Archive-action
|
|
{
|
|
with-command-file msvc-Archive-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions updated together piecemeal msvc-Archive-action
|
|
{
|
|
$(MSVC_SETUP)
|
|
if exist "$(<)" set _$(<:B)_="$(<)"
|
|
$(MSVC_TOOL_PATH)link /lib /out:"$(<)" %_$(<:B)_% @"$(>)"
|
|
}
|
|
|