VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /proc/self/root/usr/share/boost-build/src/tools/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/boost-build/src/tools/clang-linux.jam
#  Copyright (c) 2003      Michael Stevens
#  Copyright (c) 2010-2011 Bryce Lelbach (blelbach@cct.lsu.edu, maintainer)
#
#  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 common ;
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 : pth ;

toolset.inherit-rules clang-linux : gcc ;
toolset.inherit-flags clang-linux : gcc 
  : <inlining>full
    <threading>multi/<target-os>windows
  ;
        
if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] {
  .debug-configuration = true ;
}
                       
rule init ( version ? :  command * : options * ) {
  command = [ common.get-invocation-command clang-linux : clang++ 
    : $(command) ] ;
                
  # Determine the version
  if $(command) {    
    local command-string = \"$(command)\" ;
    command-string = $(command-string:J=" ") ;
    version ?= [ MATCH "version ([0-9.]+)"
      : [ SHELL "$(command-string) --version" ] ] ;
  }

  local condition = [ common.check-init-parameters clang-linux
    : version $(version) ] ;
    
  common.handle-options clang-linux : $(condition) : $(command) : $(options) ;
  clang.init-cxxstd-flags clang-linux : $(condition) : $(version) ;

  # - Ranlib.
  local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
  toolset.flags clang-linux.archive .RANLIB $(condition) : $(ranlib[1]) ;

  # - Archive builder.
  local archiver = [ feature.get-values <archiver> : $(options) ] ;
  toolset.flags clang-linux.archive .AR $(condition) : $(archiver[1]) ;
}

###############################################################################
# Flags

# note: clang silently ignores some of these inlining options
# For clang, 'on' and 'full' are identical.
toolset.flags clang-linux.compile OPTIONS <inlining>full : -Wno-inline ;

toolset.flags clang-linux.compile OPTIONS <threading>multi/<target-os>windows : -pthread ;
toolset.flags clang-linux.link OPTIONS <threading>multi/<target-os>windows : -pthread ;

###############################################################################
# C and C++ compilation

rule compile.c++ ( targets * : sources * : properties * ) {
  local pch-file = [ on $(<) return $(PCH_FILE) ] ;

  if $(pch-file) {
    DEPENDS $(<) : $(pch-file) ;
    clang-linux.compile.c++.with-pch $(targets) : $(sources) ;
  }
  else {
    clang-linux.compile.c++.without-pch $(targets) : $(sources) ;
  }
}

actions compile.c++.without-pch {
  "$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
}

actions compile.c++.with-pch bind PCH_FILE
{
  "$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pch -Xclang "$(PCH_FILE)" -o "$(<)" "$(>)"
}

rule compile.c ( targets * : sources * : properties * )
{
  local pch-file = [ on $(<) return $(PCH_FILE) ] ;

  if $(pch-file) {
    DEPENDS $(<) : $(pch-file) ;
    clang-linux.compile.c.with-pch $(targets) : $(sources) ;
  }
  else {
    clang-linux.compile.c.without-pch $(targets) : $(sources) ;
  }
}

actions compile.c.without-pch
{
  "$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}

actions compile.c.with-pch bind PCH_FILE
{
  "$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pch -Xclang "$(PCH_FILE)" -c -o "$(<)" "$(>)"
}

###############################################################################
# PCH emission

RM = [ common.rm-command ] ;

rule compile.c++.pch ( targets * : sources * : properties * ) {
}

actions compile.c++.pch {
  $(RM) -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pch -o "$(<)" "$(>)"
}

rule compile.c.pch ( targets * : sources * : properties * ) {
}

actions compile.c.pch
{
  $(RM) -f "$(<)" && "$(CONFIG_COMMAND)" -c -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pch -o "$(<)" "$(>)"
}

###############################################################################
# Linking

SPACE = " " ;

rule link ( targets * : sources * : properties * ) {
  SPACE on $(targets) = " " ;
  JAM_SEMAPHORE on $(targets) = <s>clang-linux-link-semaphore ;
}

actions link bind LIBRARIES {
    "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}

rule link.dll ( targets * : sources * : properties * ) {
  SPACE on $(targets) = " " ;
  JAM_SEMAPHORE on $(targets) = <s>clang-linux-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 $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}


VaKeR 2022