Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/oneapi/tbb/detail/_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@
#define __TBB_nodiscard
#endif

#if __clang__
#define __TBB_lto_visibility_public [[clang::lto_visibility_public]]
#else
#define __TBB_lto_visibility_public
#endif

Comment on lines +335 to +340
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to give the macro a better, semantical name, something similar to __TBB_EXPORTED_FUNC. The property of a type that we want to indicate and apply as needed is that it's a "callback interface" that is declared in the library headers but used in the binaries. We have other such types, for example delegate_base, and so it's likely only the matter of time for similar issues with whole program optimization options to be seen for these types as well.

#define __TBB_CPP17_UNCAUGHT_EXCEPTIONS_PRESENT (_MSC_VER >= 1900 || __GLIBCXX__ && __cpp_lib_uncaught_exceptions \
|| _LIBCPP_VERSION >= 3700 && (!__TBB_MACOS_TARGET_VERSION || __TBB_MACOS_TARGET_VERSION >= 101200))

Expand Down
4 changes: 2 additions & 2 deletions include/oneapi/tbb/detail/_task.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2020-2024 Intel Corporation
Copyright (c) 2020-2025 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -155,7 +155,7 @@ class wait_context {
}
};

class wait_tree_vertex_interface {
class __TBB_lto_visibility_public wait_tree_vertex_interface {
public:
virtual void reserve(std::uint32_t delta = 1) = 0;
virtual void release(std::uint32_t delta = 1) = 0;
Expand Down
Loading