/usr/share/boost-build/tools/clang-linux.jam is in libboost1.46-dev 1.46.1-7ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | # Copyright (c) 2003 Michael Stevens
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)
import toolset ;
import feature ;
import toolset : flags ;
import clang ;
import gcc ;
import common ;
import errors ;
import generators ;
import type ;
import numbers ;
feature.extend-subfeature toolset clang : platform : linux ;
toolset.inherit-generators clang-linux
<toolset>clang <toolset-clang:platform>linux : gcc : gcc.mingw.link gcc.mingw.link.dll gcc.cygwin.link gcc.cygwin.link.dll ;
generators.override clang-linux.prebuilt : builtin.lib-generator ;
generators.override clang-linux.prebuilt : builtin.prebuilt ;
generators.override clang-linux.searched-lib-generator : searched-lib-generator ;
# Override default do-nothing generators.
generators.override clang-linux.compile.c.pch : pch.default-c-pch-generator ;
generators.override clang-linux.compile.c++.pch : pch.default-cpp-pch-generator ;
type.set-generated-target-suffix PCH : <toolset>clang <toolset-clang:platform>linux : pchi ;
toolset.inherit-rules clang-linux : gcc ;
toolset.inherit-flags clang-linux : gcc
: <inlining>off <inlining>on <inlining>full
<optimization>space <optimization>speed
<warnings>off <warnings>all <warnings>on
;
if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
{
.debug-configuration = true ;
}
# Initializes the clang-linux toolset
# version in optional
# name (default clang++) is used to invoke the specified clanglinux complier
# compile and link options allow you to specify addition command line options for each version
rule init ( version ? : command * : options * )
{
command = [ common.get-invocation-command clang-linux : clang++
: $(command) ] ;
# Determine the version
local command-string = $(command:J=" ") ;
if $(command)
{
version ?= [ MATCH "^([0-9.]+)"
: [ SHELL "$(command-string) -dumpversion" ] ] ;
}
local condition = [ common.check-init-parameters clang-linux
: version $(version) ] ;
common.handle-options clang-linux : $(condition) : $(command) : $(options) ;
gcc.init-link-flags clang-linux gnu $(condition) ;
}
SPACE = " " ;
# Declare flags and action for compilation.
toolset.flags clang-linux.compile OPTIONS <optimization>off : ;
toolset.flags clang-linux.compile OPTIONS <optimization>speed : -O3 ;
toolset.flags clang-linux.compile OPTIONS <optimization>space : -Os ;
toolset.flags clang-linux.compile OPTIONS <inlining>off : -fno-inline ;
toolset.flags clang-linux.compile OPTIONS <inlining>on : -Wno-inline ;
toolset.flags clang-linux.compile OPTIONS <inlining>full : -finline-functions -Wno-inline ;
toolset.flags clang-linux.compile OPTIONS <warnings>off : -w ;
toolset.flags clang-linux.compile OPTIONS <warnings>on : -Wall ;
toolset.flags clang-linux.compile OPTIONS <warnings>all : -Wall -pedantic ;
toolset.flags clang-linux.compile OPTIONS <warnings-as-errors>on : -Werror ;
toolset.flags clang-linux.compile OPTIONS <debug-symbols>on : -g ;
toolset.flags clang-linux.compile OPTIONS <profiling>on : ;
toolset.flags clang-linux.compile OPTIONS <rtti>off : -fno-rtti ;
rule compile.c++ ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}
actions compile.c++ bind PCH_FILE
{
"$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -use-pch"$(PCH_FILE)" -c -o "$(<)" "$(>)"
}
rule compile.c ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}
actions compile.c bind PCH_FILE
{
"$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -use-pch"$(PCH_FILE)" -c -o "$(<)" "$(>)"
}
rule compile.c++.pch ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
}
#
# Compiling a pch first deletes any existing *.pchi file, as Clang's compiler
# won't over-write an existing pch: instead it creates filename$1.pchi, filename$2.pchi
# etc - which appear not to do anything except take up disk space :-(
#
actions compile.c++.pch
{
rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)"
}
rule compile.c.pch ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
}
actions compile.c.pch
{
rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)"
}
rule link ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}
actions link bind LIBRARIES
{
"$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) $(USER_OPTIONS)
}
rule link.dll ( targets * : sources * : properties * )
{
gcc.setup-threading $(targets) : $(sources) : $(properties) ;
gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
SPACE on $(targets) = " " ;
JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}
# Differ from 'link' above only by -shared.
actions link.dll bind LIBRARIES
{
"$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS) $(USER_OPTIONS)
}
|