]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/tools/build/src/tools/clang-darwin.jam
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / tools / build / src / tools / clang-darwin.jam
index d18ea4274e5d5b4de7386d01d3fe12f911fec38c..11f62d298b3ffd0de77d2b979422f884a57c2f4d 100644 (file)
@@ -16,9 +16,9 @@ import generators ;
 
 feature.extend-subfeature toolset clang : platform : darwin ;
 
-toolset.inherit-generators clang-darwin 
-  <toolset>clang <toolset-clang:platform>darwin 
-  : gcc 
+toolset.inherit-generators clang-darwin
+  <toolset>clang <toolset-clang:platform>darwin
+  : gcc
   # Don't inherit PCH generators. They were not tested, and probably
   # don't work for this compiler.
   : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
@@ -32,30 +32,32 @@ generators.register-c-compiler clang-darwin.compile.m : OBJECTIVE_C : OBJ : <too
 generators.register-c-compiler clang-darwin.compile.mm : OBJECTIVE_CPP : OBJ : <toolset>clang <toolset-clang:platform>darwin ;
 
 toolset.inherit-rules clang-darwin : gcc ;
-toolset.inherit-flags clang-darwin : gcc 
+toolset.inherit-flags clang-darwin : gcc
         : <inlining>full
           <architecture>x86/<address-model>32
           <architecture>x86/<address-model>64
+          <lto>on/<lto-mode>full
+          <lto>on/<lto-mode>fat
         ;
-        
+
 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
 {
     .debug-configuration = true ;
 }
-                       
+
 # Initializes the clang-darwin toolset
 #   version in optional
 #   name (default clang++) is used to invoke the specified clang compiler
 #   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-darwin : clang++ 
+    command = [ common.get-invocation-command clang-darwin : clang++
         : $(command) : /usr/bin /usr/local/bin ] ;
 
     # Determine the version
     local command-string = $(command:J=" ") ;
     if $(command)
-    {    
+    {
         version ?= [ MATCH "version ([0-9]+[.][0-9]+)"
             : [ SHELL "$(command-string) --version" ] ] ;
     }
@@ -90,6 +92,20 @@ toolset.flags clang-darwin.compile OPTIONS <inlining>full : -Wno-inline ;
 # shouldn't this be handled by the common gcc?
 toolset.flags clang-darwin.compile OPTIONS <flags> ;
 
+# LTO
+toolset.flags clang-darwin.compile OPTIONS <lto>on/<lto-mode>thin : -flto=thin ;
+toolset.flags clang-darwin.link OPTIONS <lto>on/<lto-mode>thin : -flto=thin ;
+
+toolset.flags clang-darwin.compile OPTIONS <lto>on/<lto-mode>full : -flto=full ;
+toolset.flags clang-darwin.link OPTIONS <lto>on/<lto-mode>full : -flto=full ;
+
+# stdlib selection
+toolset.flags clang-darwin.compile OPTIONS <stdlib>gnu <stdlib>gnu11 : -stdlib=libstdc++ ;
+toolset.flags clang-darwin.link OPTIONS <stdlib>gnu <stdlib>gnu11 : -stdlib=libstdc++ ;
+
+toolset.flags clang-darwin.compile OPTIONS <stdlib>libc++ : -stdlib=libc++ ;
+toolset.flags clang-darwin.link OPTIONS <stdlib>libc++ : -stdlib=libc++ ;
+
 actions compile.c
 {
     "$(CONFIG_COMMAND)" -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
@@ -123,11 +139,11 @@ rule archive ( targets * : sources * : properties * )
   # Always remove archive and start again. Here's rationale from
   # Andre Hentz:
   #
-  # I had a file, say a1.c, that was included into liba.a. 
-  # I moved a1.c to a2.c, updated my Jamfiles and rebuilt. 
-  # My program was crashing with absurd errors. 
-  # After some debugging I traced it back to the fact that a1.o was *still* 
-  # in liba.a 
+  # I had a file, say a1.c, that was included into liba.a.
+  # I moved a1.c to a2.c, updated my Jamfiles and rebuilt.
+  # My program was crashing with absurd errors.
+  # After some debugging I traced it back to the fact that a1.o was *still*
+  # in liba.a
   #
   # Rene Rivera:
   #