From 69d204e5eb05f978699599280f96803f6889da54 Mon Sep 17 00:00:00 2001 From: Vyacheslav Vershinin Date: Wed, 7 Nov 2018 15:32:54 +0300 Subject: [PATCH] added pic toolchain for asan tsan lsan --- bin/detail/toolchain_table.py | 3 +++ sanitize-address-cxx17-pic.cmake | 22 ++++++++++++++++++++++ sanitize-leak-cxx17-pic.cmake | 22 ++++++++++++++++++++++ sanitize-thread-cxx17-pic.cmake | 22 ++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 sanitize-address-cxx17-pic.cmake create mode 100644 sanitize-leak-cxx17-pic.cmake create mode 100644 sanitize-thread-cxx17-pic.cmake diff --git a/bin/detail/toolchain_table.py b/bin/detail/toolchain_table.py index 15ae02b0..c5108424 100644 --- a/bin/detail/toolchain_table.py +++ b/bin/detail/toolchain_table.py @@ -393,6 +393,7 @@ def verify(self): toolchain_table += [ Toolchain('sanitize-leak', 'Unix Makefiles'), Toolchain('sanitize-leak-cxx17', 'Unix Makefiles'), + Toolchain('sanitize-leak-cxx17-pic', 'Unix Makefiles'), Toolchain('sanitize-memory', 'Unix Makefiles'), Toolchain('linux-mingw-w32', 'Unix Makefiles'), Toolchain('linux-mingw-w64', 'Unix Makefiles'), @@ -654,8 +655,10 @@ def verify(self): Toolchain('libcxx-hid-sections', 'Unix Makefiles'), Toolchain('sanitize-address', 'Unix Makefiles'), Toolchain('sanitize-address-cxx17', 'Unix Makefiles'), + Toolchain('sanitize-address-cxx17-pic', 'Unix Makefiles'), Toolchain('sanitize-thread', 'Unix Makefiles'), Toolchain('sanitize-thread-cxx17', 'Unix Makefiles'), + Toolchain('sanitize-thread-cxx17-pic', 'Unix Makefiles'), Toolchain('arm-openwrt-linux-muslgnueabi', 'Unix Makefiles'), Toolchain('openbsd-egcc-cxx11-static-std', 'Unix Makefiles'), ] diff --git a/sanitize-address-cxx17-pic.cmake b/sanitize-address-cxx17-pic.cmake new file mode 100644 index 00000000..06fa3ef0 --- /dev/null +++ b/sanitize-address-cxx17-pic.cmake @@ -0,0 +1,22 @@ +# Copyright (c) 2014, 2018 Ruslan Baratov +# All rights reserved. + +if(DEFINED POLLY_SANITIZE_ADDRESS_CXX17_PIC_CMAKE_) + return() +else() + set(POLLY_SANITIZE_ADDRESS_CXX17_PIC_CMAKE_ 1) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_init.cmake") + +polly_init( + "Clang address sanitizer / c++17 support / PIC" + "Unix Makefiles" +) + +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake") + +include("${CMAKE_CURRENT_LIST_DIR}/compiler/clang.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx17.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/fpic.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/sanitize_address.cmake") diff --git a/sanitize-leak-cxx17-pic.cmake b/sanitize-leak-cxx17-pic.cmake new file mode 100644 index 00000000..20031300 --- /dev/null +++ b/sanitize-leak-cxx17-pic.cmake @@ -0,0 +1,22 @@ +# Copyright (c) 2014, 2018 Ruslan Baratov +# All rights reserved. + +if(DEFINED POLLY_SANITIZE_LEAK_CXX17_PIC_CMAKE_) + return() +else() + set(POLLY_SANITIZE_LEAK_CXX17_PIC_CMAKE_ 1) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_init.cmake") + +polly_init( + "Clang memory leaks sanitizer / c++17 support / PIC" + "Unix Makefiles" +) + +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake") + +include("${CMAKE_CURRENT_LIST_DIR}/compiler/clang.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx17.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/fpic.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/sanitize_leak.cmake") diff --git a/sanitize-thread-cxx17-pic.cmake b/sanitize-thread-cxx17-pic.cmake new file mode 100644 index 00000000..3bb22528 --- /dev/null +++ b/sanitize-thread-cxx17-pic.cmake @@ -0,0 +1,22 @@ +# Copyright (c) 2014, 2018 Ruslan Baratov +# All rights reserved. + +if(DEFINED POLLY_SANITIZE_THREAD_CXX17_PIC_CMAKE_) + return() +else() + set(POLLY_SANITIZE_THREAD_CXX17_PIC_CMAKE_ 1) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_init.cmake") + +polly_init( + "Clang thread sanitizer / c++17 support / PIC" + "Unix Makefiles" +) + +include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake") + +include("${CMAKE_CURRENT_LIST_DIR}/compiler/clang.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx17.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/fpic.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/flags/sanitize_thread.cmake")