]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/config/toolchains/gcc.py
2 # Copyright (c) 2016 Stefan Seefeld
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or copy at
7 # http://www.boost.org/LICENSE_1_0.txt)
9 from . import append_feature_flag
14 def init_once(cls
, env
):
18 def architecture(env
, arch
):
20 flag
= {'x86' : '-m32',
21 'x86_64' : '-m64',}.get(arch
)
23 append_feature_flag(env
, CCFLAGS
= flag
)
26 def optimize(env
, optimize
):
27 if not optimize
or optimize
== "no":
28 append_feature_flag(env
, CCFLAGS
= "-O0 -fno-inline")
29 elif optimize
== "speed":
30 append_feature_flag(env
, CCFLAGS
= "-O3 -finline-functions -Wno-inline")
31 elif optimize
== "space":
32 append_feature_flag(env
, CCFLAGS
= "-Os")
34 append_feature_flag(env
, CCFLAGS
= "")
37 def profile(env
, profile
):
39 append_feature_flag(env
, CCFLAGS
= "-pg", LINKFLAGS
= "-pg")
41 append_feature_flag(env
, CCFLAGS
= "", LINKFLAGS
= "")
44 def threading(env
, threading
):
45 if threading
== "multi":
46 append_feature_flag(env
, CCFLAGS
= "-pthread", LINKFLAGS
= "-pthread")
48 append_feature_flag(env
, CCFLAGS
= "", LINKFLAGS
= "")
51 def debug(env
, debug
):
53 append_feature_flag(env
, CCFLAGS
= "-g", CPPDEFINES
= [])
55 append_feature_flag(env
, CCFLAGS
= "", CPPDEFINES
= "NDEBUG")