diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-14 21:31:08 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-14 21:31:08 +0300 |
commit | bec121363fc804f1e5dd687c99c59c943ed57025 (patch) | |
tree | 24ee1eb5e31251dc9a3a792703d88cc3852921d8 /contrib | |
parent | 21c4ecb814db56677ab9527158be0fe28efb0e4a (diff) | |
download | ydb-bec121363fc804f1e5dd687c99c59c943ed57025.tar.gz |
intermediate changes
ref:26e1b4e439b136ea08e305c288dc0177fa42d7a2
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libs/cxxsupp/openmp/kmp_config.h | 9 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/openmp/ya.make | 11 |
2 files changed, 13 insertions, 7 deletions
diff --git a/contrib/libs/cxxsupp/openmp/kmp_config.h b/contrib/libs/cxxsupp/openmp/kmp_config.h index d3268a09f1..81314ed20a 100644 --- a/contrib/libs/cxxsupp/openmp/kmp_config.h +++ b/contrib/libs/cxxsupp/openmp/kmp_config.h @@ -13,10 +13,6 @@ #include "kmp_platform.h" -// cmakedefine01 MACRO will define MACRO as either 0 or 1 -// cmakedefine MACRO 1 will define MACRO as 1 or leave undefined -#define DEBUG_BUILD 0 -#define RELWITHDEBINFO_BUILD 0 #define LIBOMP_USE_ITT_NOTIFY 0 #define USE_ITT_NOTIFY LIBOMP_USE_ITT_NOTIFY #if ! LIBOMP_USE_ITT_NOTIFY @@ -113,9 +109,8 @@ #if STUBS_LIBRARY # define KMP_STUB 1 #endif -#if DEBUG_BUILD || RELWITHDEBINFO_BUILD -# define KMP_DEBUG 1 -#endif + +// KMP_DEBUG is explicitly set from ya.make #if KMP_OS_WINDOWS # define KMP_WIN_CDECL diff --git a/contrib/libs/cxxsupp/openmp/ya.make b/contrib/libs/cxxsupp/openmp/ya.make index 7bed65cd40..f1fddfe733 100644 --- a/contrib/libs/cxxsupp/openmp/ya.make +++ b/contrib/libs/cxxsupp/openmp/ya.make @@ -50,6 +50,17 @@ IF (SANITIZER_TYPE == memory) ) ENDIF() +# The KMP_DEBUG define enables OpenMP debugging support, including tracing (controlled by environment variables) +# and debug asserts. The upstream version unconditionally enables KMP_DEBUG for Debug/RelWithDebInfo builds. +# Instead, we make this opt-in via a `ymake` variable to avoid accidentally releasing a relwithdebinfo binary +# with KMP_DEBUG enabled. Note that the `ymake` variable is called OPENMP_DEBUG for clarity, since no one +# really knows what KMP is. +IF (OPENMP_DEBUG) + CFLAGS( + -DKMP_DEBUG=1 + ) +ENDIF() + SRCS( kmp_affinity.cpp kmp_alloc.cpp |