diff options
author | Louis Dionne <ldionne@apple.com> | 2019-08-13 12:49:00 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-08-13 12:49:00 +0000 |
commit | 1b6d6e595b5e27566579c03923667aaab58bd3cd (patch) | |
tree | c934a113548dc7ca016682f8fd14ea1edaa25a5e /pstl/CMakeLists.txt | |
parent | 42b957aad7b293eef34ed5c2da7ebde4fab997c9 (diff) | |
download | llvm-1b6d6e595b5e27566579c03923667aaab58bd3cd.tar.gz |
[pstl] Allow customizing whether per-TU insulation is provided
Like we do in libc++, PSTL needs the ability to constrain
ABI-unstable symbols to each translation unit. This is OFF by
default (like for libc++), because most people don't care about
this and there is a cost associated to enabling the option (code
bloat because templates are not deduped across TUs).
I'm using '#pragma clang attribute push' to avoid marking each
declaration with an attribute, which quickly becomes difficult
to maintain.
llvm-svn: 368684
Diffstat (limited to 'pstl/CMakeLists.txt')
-rw-r--r-- | pstl/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt index 62451b23dba1..dd601bc58a4f 100644 --- a/pstl/CMakeLists.txt +++ b/pstl/CMakeLists.txt @@ -17,6 +17,8 @@ math(EXPR VERSION_PATCH "(${PARALLELSTL_VERSION_SOURCE} % 10)") project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} LANGUAGES CXX) set(PSTL_PARALLEL_BACKEND "serial" CACHE STRING "Threading backend to use. Valid choices are 'serial' and 'tbb'. The default is 'serial'.") +set(PSTL_HIDE_FROM_ABI_PER_TU OFF CACHE BOOL "Whether to constrain ABI-unstable symbols to each translation unit (basically, mark them with C's static keyword).") +set(_PSTL_HIDE_FROM_ABI_PER_TU ${PSTL_HIDE_FROM_ABI_PER_TU}) # For __pstl_config_site if (NOT TBB_DIR) get_filename_component(PSTL_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) |