📄 builtin.jam
字号:
# Copyright 2002, 2003, 2004, 2005 Dave Abrahams# Copyright 2002, 2005, 2006, 2007 Rene Rivera# Copyright 2006 Juergen Hunold# Copyright 2005 Toon Knapen# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus# Distributed under the Boost Software License, Version 1.0.# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)# Defines standard features and rules.import alias ;import "class" : new ;import errors ;import feature ;import generators ;import numbers ;import os ;import print ;import project ;import property ;import regex ;import scanner ;import stage ;import symlink ;import toolset ;import type ;import types/register ;import utility ;import virtual-target ;import message ;# FIXME: the following generate module import is not needed here but removing it# too hastly will break using code (e.g. the main Boost library Jamroot file)# that forgot to import the generate module before calling the generate rule.import generate ;.os-names = amiga aix bsd cygwin darwin dos emx freebsd hpux iphone linux netbsd openbsd osf qnx qnxnto sgi solaris sun sunos svr4 sysv ultrix unix unixware vms windows ;# Feature used to determine which OS we're on. New <target-os> and <host-os># features should be used instead.local os = [ modules.peek : OS ] ;feature.feature os : $(os) : propagated link-incompatible ;# Translates from bjam current OS to the os tags used in host-os and target-os,# i.e. returns the running host-os.#local rule default-host-os ( ){ local host-os ; if [ os.name ] in $(.os-names:U) { host-os = [ os.name ] ; } else { switch [ os.name ] { case NT : host-os = windows ; case AS400 : host-os = unix ; case MINGW : host-os = windows ; case BSDI : host-os = bsd ; case COHERENT : host-os = unix ; case DRAGONFLYBSD : host-os = bsd ; case IRIX : host-os = sgi ; case MACOSX : host-os = darwin ; case KFREEBSD : host-os = freebsd ; case LINUX : host-os = linux ; case * : host-os = unix ; } } return $(host-os:L) ;}# The two OS features define a known set of abstract OS names. The host-os is# the OS under which bjam is running. Even though this should really be a fixed# property we need to list all the values to prevent unknown value errors. Both# set the default value to the current OS to account for the default use case of# building on the target OS.feature.feature host-os : $(.os-names) ;feature.set-default host-os : [ default-host-os ] ;feature.feature target-os : $(.os-names) : propagated link-incompatible ;feature.set-default target-os : [ default-host-os ] ;feature.feature toolset : : implicit propagated symmetric ;feature.feature stdlib : native : propagated composite ;feature.feature link : shared static : propagated ;feature.feature runtime-link : shared static : propagated ;feature.feature runtime-debugging : on off : propagated ;feature.feature optimization : off speed space : propagated ;feature.feature profiling : off on : propagated ;feature.feature inlining : off on full : propagated ;feature.feature threading : single multi : propagated ;feature.feature rtti : on off : propagated ;feature.feature exception-handling : on off : propagated ;# Whether there is support for asynchronous EH (e.g. catching SEGVs).feature.feature asynch-exceptions : off on : propagated ;# Whether all extern "C" functions are considered nothrow by default.feature.feature extern-c-nothrow : off on : propagated ;feature.feature debug-symbols : on off : propagated ;feature.feature define : : free ;feature.feature undef : : free ;feature.feature "include" : : free path ; #order-sensitive ;feature.feature cflags : : free ;feature.feature cxxflags : : free ;feature.feature fflags : : free ;feature.feature asmflags : : free ;feature.feature linkflags : : free ;feature.feature archiveflags : : free ;feature.feature version : : free ;# Generic, i.e. non-language specific, flags for tools.feature.feature flags : : free ;feature.feature location-prefix : : free ;# The following features are incidental since they have no effect on built# products. Not making them incidental will result in problems in corner cases,# e.g.:## unit-test a : a.cpp : <use>b ;# lib b : a.cpp b ;## Here, if <use> is not incidental, we would decide we have two targets for# a.obj with different properties and complain about it.## Note that making a feature incidental does not mean it is ignored. It may be# ignored when creating a virtual target, but the rest of build process will use# them.feature.feature use : : free dependency incidental ;feature.feature dependency : : free dependency incidental ;feature.feature implicit-dependency : : free dependency incidental ;feature.feature warnings : on # Enable default/"reasonable" warning level for the tool. all # Enable all possible warnings issued by the tool. off # Disable all warnings issued by the tool. : incidental propagated ;feature.feature warnings-as-errors : off # Do not fail the compilation if there are warnings. on # Fail the compilation if there are warnings. : incidental propagated ;# Feature that allows us to configure the maximal template instantiation depth# level allowed by a C++ compiler. Applies only to C++ toolsets whose compilers# actually support this configuration setting.## Note that Boost Build currently does not allow defining features that take any# positive integral value as a parameter, which is what we need here, so we just# define some of the values here and leave it up to the user to extend this set# as he needs using the feature.extend rule.## TODO: This should be upgraded as soon as Boost Build adds support for custom# validated feature values or at least features allowing any positive integral# value. See related Boost Build related trac ticket #194.#feature.feature c++-template-depth : [ numbers.range 64 1024 : 64 ] [ numbers.range 20 1000 : 10 ] # Maximum template instantiation depth guaranteed for ANSI/ISO C++ # conforming programs. 17 : incidental optional propagated ;feature.feature source : : free dependency incidental ;feature.feature library : : free dependency incidental ;feature.feature file : : free dependency incidental ;feature.feature find-shared-library : : free ; #order-sensitive ;feature.feature find-static-library : : free ; #order-sensitive ;feature.feature library-path : : free path ; #order-sensitive ;# Internal feature.feature.feature library-file : : free dependency ;feature.feature name : : free ;feature.feature tag : : free ;feature.feature search : : free path ; #order-sensitive ;feature.feature location : : free path ;feature.feature dll-path : : free path ;feature.feature hardcode-dll-paths : true false : incidental ;# An internal feature that holds the paths of all dependency shared libraries.# On Windows, it is needed so that we can add all those paths to PATH when# running applications. On Linux, it is needed to add proper -rpath-link command# line options.feature.feature xdll-path : : free path ;# Provides means to specify def-file for windows DLLs.feature.feature def-file : : free dependency ;feature.feature suppress-import-lib : false true : incidental ;# Internal feature used to store the name of a bjam action to call when building# a target.feature.feature action : : free ;# This feature is used to allow specific generators to run. For example, QT# tools can only be invoked when QT library is used. In that case, <allow>qt# will be in usage requirement of the library.feature.feature allow : : free ;# The addressing model to generate code for. Currently a limited set only# specifying the bit size of pointers.feature.feature address-model : 16 32 64 : propagated optional ;# Type of CPU architecture to compile for.feature.feature architecture : # x86 and x86-64 x86 # ia64 ia64 # Sparc sparc # RS/6000 & PowerPC power # MIPS/SGI mips1 mips2 mips3 mips4 mips32 mips32r2 mips64 # HP/PA-RISC parisc # Advanced RISC Machines arm # Combined architectures for platforms/toolsets that support building for # multiple architectures at once. "combined" would be the default multi-arch # for the toolset. combined combined-x86-power : propagated optional ;# The specific instruction set in an architecture to compile.feature.feature instruction-set : # x86 and x86-64 i386 i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona conroe conroe-xe conroe-l allendale mermon mermon-xe kentsfield kentsfield-xe penryn wolfdale yorksfield nehalem k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx winchip-c6 winchip2 c3 c3-2 # ia64 itanium itanium1 merced itanium2 mckinley # Sparc v7 cypress v8 supersparc sparclite hypersparc sparclite86x f930 f934 sparclet tsc701 v9 ultrasparc ultrasparc3 # RS/6000 & PowerPC 401 403 405 405fp 440 440fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 801 821 823 860 970 8540 power-common ec603e g3 g4 g5 power power2 power3 power4 power5 powerpc powerpc64 rios rios1 rsc rios2 rs64a # MIPS 4kc 4kp 5kc 20kc m4k r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650 r6000 r8000 rm7000 rm9000 orion sb1 vr4100 vr4111 vr4120 vr4130 vr4300 vr5000 vr5400 vr5500 # HP/PA-RISC 700 7100 7100lc 7200 7300 8000 # Advanced RISC Machines armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312 : propagated optional ;# Used to select a specific variant of C++ ABI if the compiler supports several.feature.feature c++abi : : propagated optional ;feature.feature conditional : : incidental free ;# The value of 'no' prevents building of a target.feature.feature build : yes no : optional ;# Windows-specific featuresfeature.feature user-interface : console gui wince native auto ;feature.feature variant : : implicit composite propagated symmetric ;# Declares a new variant.## First determines explicit properties for this variant, by refining parents'# explicit properties with the passed explicit properties. The result is# remembered and will be used if this variant is used as parent.## Second, determines the full property set for this variant by adding to the# explicit properties default values for all missing non-symmetric properties.## Lastly, makes appropriate value of 'variant' property expand to the full# property set.#rule variant ( name # Name of the variant : parents-or-properties * # Specifies parent variants, if # 'explicit-properties' are given, and # explicit-properties or parents otherwise. : explicit-properties * # Explicit properties. ){ local parents ; if ! $(explicit-properties) { if $(parents-or-properties[1]:G) { explicit-properties = $(parents-or-properties) ; } else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -