Skip to content

Commit

Permalink
Fix: ld: warning: cannot export hidden symbol typeinfo for tbb::detai…
Browse files Browse the repository at this point in the history
…l::r1::unsafe_wait

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
  • Loading branch information
phprus committed Aug 7, 2023
1 parent a2e3ee8 commit f0b2351
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/oneapi/tbb/detail/_exception.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2021 Intel Corporation
Copyright (c) 2005-2023 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 @@ -69,6 +69,7 @@ class TBB_EXPORT missing_wait : public std::exception {
class TBB_EXPORT unsafe_wait : public std::runtime_error {
public:
unsafe_wait(const char* msg) : std::runtime_error(msg) {}
const char* __TBB_EXPORTED_METHOD what() const noexcept(true) override;
};

//! Gathers all throw operators in one place.
Expand Down
3 changes: 2 additions & 1 deletion src/tbb/def/win32-tbb.def
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Copyright (c) 2005-2021 Intel Corporation
; Copyright (c) 2005-2023 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 @@ -51,6 +51,7 @@ EXPORTS
?what@bad_last_alloc@r1@detail@tbb@@UBEPBDXZ
?what@user_abort@r1@detail@tbb@@UBEPBDXZ
?what@missing_wait@r1@detail@tbb@@UBEPBDXZ
?what@unsafe_wait@r1@detail@tbb@@UBEPBDXZ

; RTM Mutex (rtm_mutex.cpp)
?acquire@r1@detail@tbb@@YAXAAVrtm_mutex@d1@23@AAVscoped_lock@4523@_N@Z
Expand Down
3 changes: 2 additions & 1 deletion src/tbb/def/win64-tbb.def
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Copyright (c) 2005-2021 Intel Corporation
; Copyright (c) 2005-2023 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 @@ -51,6 +51,7 @@ EXPORTS
?what@bad_last_alloc@r1@detail@tbb@@UEBAPEBDXZ
?what@user_abort@r1@detail@tbb@@UEBAPEBDXZ
?what@missing_wait@r1@detail@tbb@@UEBAPEBDXZ
?what@unsafe_wait@r1@detail@tbb@@UEBAPEBDXZ

; RTM Mutex (rtm_mutex.cpp)
?try_acquire@r1@detail@tbb@@YA_NAEAVrtm_mutex@d1@23@AEAVscoped_lock@4523@@Z
Expand Down
3 changes: 2 additions & 1 deletion src/tbb/exception.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2022 Intel Corporation
Copyright (c) 2005-2023 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 @@ -39,6 +39,7 @@ namespace r1 {
const char* bad_last_alloc::what() const noexcept(true) { return "bad allocation in previous or concurrent attempt"; }
const char* user_abort::what() const noexcept(true) { return "User-initiated abort has terminated this operation"; }
const char* missing_wait::what() const noexcept(true) { return "wait() was not called on the structured_task_group"; }
const char* unsafe_wait::what() const noexcept(true) { return std::runtime_error::what(); }

#if TBB_USE_EXCEPTIONS
template <typename F>
Expand Down

0 comments on commit f0b2351

Please sign in to comment.