early-access version 3088

This commit is contained in:
pineappleEA
2022-11-05 15:35:56 +01:00
parent 4e4fc25ce3
commit b601909c6d
35519 changed files with 5996896 additions and 860 deletions

View File

@@ -0,0 +1,147 @@
# Boost.Atomic Library Jamfile
#
# Copyright Helge Bahmann 2011.
# Copyright Andrey Semashev 2018, 2020-2021.
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import common ;
import path ;
import project ;
import feature ;
import configure ;
import atomic-arch-config ;
local here = [ modules.binding $(__name__) ] ;
project.push-current [ project.current ] ;
project.load [ path.join [ path.make $(here:D) ] ../config/checks/architecture ] ;
project.pop-current ;
lib synchronization ;
explicit synchronization ;
rule check-synchronization-lib ( properties * )
{
local result ;
if <target-os>windows in $(properties)
{
if [ configure.builds ../config//has_synchronization_lib : $(properties) : "has synchronization.lib" ]
{
result += <library>synchronization ;
}
else
{
result += <define>BOOST_ATOMIC_NO_SYNCHRONIZATION_LIB ;
}
}
return $(result) ;
}
project boost/atomic
: requirements
<include>../src
<threading>multi
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
<link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
<define>BOOST_ATOMIC_SOURCE
<target-os>windows:<define>BOOST_USE_WINDOWS_H
<toolset>gcc,<target-os>windows:<linkflags>"-lkernel32"
: usage-requirements
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
<link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
: source-location ../src
;
BOOST_ATOMIC_SOURCES_SSE2 =
find_address_sse2
;
BOOST_ATOMIC_SOURCES_SSE41 =
find_address_sse41
;
for local src in $(BOOST_ATOMIC_SOURCES_SSE2)
{
obj $(src)
: ## sources ##
$(src).cpp
: ## requirements ##
<conditional>@atomic-arch-config.sse2-flags
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
<link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
<define>BOOST_ATOMIC_SOURCE
;
explicit $(src) ;
}
for local src in $(BOOST_ATOMIC_SOURCES_SSE41)
{
obj $(src)
: ## sources ##
$(src).cpp
: ## requirements ##
<conditional>@atomic-arch-config.sse41-flags
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
<link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
<define>BOOST_ATOMIC_SOURCE
;
explicit $(src) ;
}
rule select-arch-specific-sources ( properties * )
{
local result ;
if x86 in [ atomic-arch-config.deduce-architecture $(properties) ]
{
if [ configure.builds ../config//has_sse2 : $(properties) : "compiler supports SSE2" ]
{
result += <source>$(BOOST_ATOMIC_SOURCES_SSE2) ;
result += <define>BOOST_ATOMIC_USE_SSE2 ;
}
if [ configure.builds ../config//has_sse41 : $(properties) : "compiler supports SSE4.1" ]
{
result += <source>$(BOOST_ATOMIC_SOURCES_SSE41) ;
result += <define>BOOST_ATOMIC_USE_SSE41 ;
}
}
# ECHO "Arch sources: " $(result) ;
return $(result) ;
}
rule select-platform-specific-sources ( properties * )
{
local result ;
if <target-os>windows in $(properties)
{
result += <source>wait_on_address.cpp ;
}
# ECHO Platform sources: $(result) ;
return $(result) ;
}
lib boost_atomic
: ## sources ##
lock_pool.cpp
: ## requirements ##
<include>../src
<conditional>@select-arch-specific-sources
<conditional>@select-platform-specific-sources
: usage-requirements
<conditional>@check-synchronization-lib
;
boost-install boost_atomic ;

View File

@@ -0,0 +1,127 @@
#
# Copyright Andrey Semashev 2020.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# This jamfile contains utility rules to select architecture-specific compiler flags
import common ;
import feature ;
import configure ;
rule deduce-architecture ( properties * )
{
local architecture = [ feature.get-values "architecture" : $(properties) ] ;
if $(architecture)
{
return $(architecture) ;
}
else
{
if [ configure.builds /boost/architecture//x86 : $(properties) : "x86" ]
{
return x86 ;
}
else if [ configure.builds /boost/architecture//arm : $(properties) : "arm" ]
{
return arm ;
}
else if [ configure.builds /boost/architecture//mips1 : $(properties) : "mips1" ]
{
return mips1 ;
}
else if [ configure.builds /boost/architecture//power : $(properties) : "power" ]
{
return power ;
}
else if [ configure.builds /boost/architecture//sparc : $(properties) : "sparc" ]
{
return sparc ;
}
}
}
rule deduce-address-model ( properties * )
{
local address_model = [ feature.get-values "address-model" : $(properties) ] ;
if $(address_model)
{
return $(address_model) ;
}
else
{
if [ configure.builds /boost/architecture//32 : $(properties) : "32-bit" ]
{
return 32 ;
}
else if [ configure.builds /boost/architecture//64 : $(properties) : "64-bit" ]
{
return 64 ;
}
}
}
rule sse2-flags ( properties * )
{
local result ;
if <toolset>intel in $(properties)
{
if <toolset-intel:platform>win in $(properties)
{
result = <cxxflags>"/QxSSE2" ;
}
else
{
result = <cxxflags>"-xSSE2" ;
}
}
else if <toolset>msvc in $(properties)
{
# MSVC doesn't really care about these switches, all SSE intrinsics are always available, but still...
# Also 64 bit MSVC doesn't have the /arch:SSE2 switch as it is the default.
if 32 in [ deduce-address-model $(properties) ]
{
result = <cxxflags>"/arch:SSE2" ;
}
}
else
{
result = <cxxflags>"-msse -msse2" ;
}
return $(result) ;
}
rule sse41-flags ( properties * )
{
local result ;
if <toolset>intel in $(properties)
{
if <toolset-intel:platform>win in $(properties)
{
result = <cxxflags>"/QxSSE4.1" ;
}
else
{
result = <cxxflags>"-xSSE4.1" ;
}
}
else if <toolset>msvc in $(properties)
{
# MSVC doesn't really care about these switches, all SSE intrinsics are always available, but still...
# Also 64 bit MSVC doesn't have the /arch:SSE2 switch as it is the default.
if 32 in [ deduce-address-model $(properties) ]
{
result = <cxxflags>"/arch:SSE2" ;
}
}
else
{
result = <cxxflags>"-msse -msse2 -msse3 -mssse3 -msse4.1" ;
}
return $(result) ;
}