Use __config_site when building libc++. Also cleanup ABI versioning doc
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250261 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
499d87881a
commit
a6622799b4
@ -321,6 +321,9 @@ if (LIBCXX_NEEDS_SITE_CONFIG)
|
|||||||
include/__config_site.in
|
include/__config_site.in
|
||||||
${LIBCXX_BINARY_DIR}/__config_site
|
${LIBCXX_BINARY_DIR}/__config_site
|
||||||
@ONLY)
|
@ONLY)
|
||||||
|
# Provide the config definitions by included the generated __config_site
|
||||||
|
# file at compile time.
|
||||||
|
add_compile_flags("-include ${LIBCXX_BINARY_DIR}/__config_site")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
@ -49,10 +49,12 @@ macro(define_if_not condition def)
|
|||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# Add a macro definition to the __config_site file if the specified condition
|
||||||
|
# is 'true'. Note that '-D${def}' is not added. Instead it is expected that
|
||||||
|
# the build include the '__config_site' header.
|
||||||
macro(config_define_if condition def)
|
macro(config_define_if condition def)
|
||||||
if (${condition})
|
if (${condition})
|
||||||
set(${def} ON)
|
set(${def} ON)
|
||||||
add_definitions(-D${def})
|
|
||||||
set(LIBCXX_NEEDS_SITE_CONFIG ON)
|
set(LIBCXX_NEEDS_SITE_CONFIG ON)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
@ -60,14 +62,12 @@ endmacro()
|
|||||||
macro(config_define_if_not condition def)
|
macro(config_define_if_not condition def)
|
||||||
if (NOT ${condition})
|
if (NOT ${condition})
|
||||||
set(${def} ON)
|
set(${def} ON)
|
||||||
add_definitions(-D${def})
|
|
||||||
set(LIBCXX_NEEDS_SITE_CONFIG ON)
|
set(LIBCXX_NEEDS_SITE_CONFIG ON)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(config_define value def)
|
macro(config_define value def)
|
||||||
set(${def} ${value})
|
set(${def} ${value})
|
||||||
add_definitions(-D${def}=${value})
|
|
||||||
set(LIBCXX_NEEDS_SITE_CONFIG ON)
|
set(LIBCXX_NEEDS_SITE_CONFIG ON)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ Design Documents
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
DesignDocs/CapturingConfigInfo
|
DesignDocs/CapturingConfigInfo
|
||||||
|
DesignDocs/ABIVersioning
|
||||||
|
|
||||||
|
|
||||||
* `<atomic> design <http://libcxx.llvm.org/atomic_design.html>`_
|
* `<atomic> design <http://libcxx.llvm.org/atomic_design.html>`_
|
||||||
|
@ -444,7 +444,9 @@ class Configuration(object):
|
|||||||
def configure_compile_flags_abi_version(self):
|
def configure_compile_flags_abi_version(self):
|
||||||
abi_version = self.get_lit_conf('abi_version', '').strip()
|
abi_version = self.get_lit_conf('abi_version', '').strip()
|
||||||
abi_unstable = self.get_lit_bool('abi_unstable')
|
abi_unstable = self.get_lit_bool('abi_unstable')
|
||||||
if abi_version:
|
# Only add the ABI version when it is non-default.
|
||||||
|
# FIXME(EricWF): Get the ABI version from the "__config_site".
|
||||||
|
if abi_version and abi_version != '1':
|
||||||
self.cxx.compile_flags += ['-D_LIBCPP_ABI_VERSION=' + abi_version]
|
self.cxx.compile_flags += ['-D_LIBCPP_ABI_VERSION=' + abi_version]
|
||||||
if abi_unstable:
|
if abi_unstable:
|
||||||
self.config.available_features.add('libcpp-abi-unstable')
|
self.config.available_features.add('libcpp-abi-unstable')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user