Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abseil test failure on AIX due to some linking error(terminate getting called) #1608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions absl/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

find_library(LIBRT rt)

string(SUBSTRING ${CMAKE_SYSTEM} 0 3 system_os)
if(system_os STREQUAL "AIX")
set(SAFETY_TESTING_TEST "-Wl,-bkeepfile:CMakeFiles/absl_absl_exception_safety_testing_test.dir/exception_safety_testing_test.cc.o")
set(DELEGATE_TEST "-Wl,-bkeepfile:CMakeFiles/absl_throw_delegate_test.dir/throw_delegate_test.cc.o")
endif()

# Internal-only target, do not depend on directly.
absl_cc_library(
NAME
Expand Down Expand Up @@ -322,6 +328,8 @@ absl_cc_test(
"exception_safety_testing_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${SAFETY_TESTING_TEST}
DEPS
absl::exception_safety_testing
absl::memory
Expand Down Expand Up @@ -391,6 +399,8 @@ absl_cc_test(
"throw_delegate_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${DELEGATE_TEST}
DEPS
absl::base
absl::config
Expand Down
18 changes: 18 additions & 0 deletions absl/container/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
# limitations under the License.
#

string(SUBSTRING ${CMAKE_SYSTEM} 0 3 system_os)
if(system_os STREQUAL "AIX")
set(BTREE_TEST "-Wl,-bkeepfile:CMakeFiles/absl_btree_test.dir/btree_test.cc.o")
set(FIXED_ARRAY_TEST "-Wl,-bkeepfile:CMakeFiles/absl_fixed_array_test.dir/fixed_array_test.cc.o")
set(FIXED_ARRAY_EXCEPTION_TEST "-Wl,-bkeepfile:CMakeFiles/absl_fixed_array_exception_safety_test.dir/fixed_array_exception_safety_test.cc.o")
set(INLINED_VECTOR_TEST "-Wl,-bkeepfile:CMakeFiles/absl_inlined_vector_test.dir/inlined_vector_test.cc.o")
set(INLINED_VECTOR_EXCEPTION_TEST "-Wl,-bkeepfile:CMakeFiles/absl_inlined_vector_exception_safety_test.dir/inlined_vector_exception_safety_test.cc.o")
endif()

absl_cc_library(
NAME
btree
Expand Down Expand Up @@ -71,6 +80,7 @@ absl_cc_test(
${ABSL_TEST_COPTS}
LINKOPTS
${ABSL_DEFAULT_LINKOPTS}
${BTREE_TEST}
DEPS
absl::algorithm_container
absl::btree
Expand Down Expand Up @@ -143,6 +153,8 @@ absl_cc_test(
"fixed_array_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${FIXED_ARRAY_TEST}
DEPS
absl::fixed_array
absl::config
Expand All @@ -160,6 +172,8 @@ absl_cc_test(
"fixed_array_exception_safety_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${FIXED_ARRAY_EXCEPTION_TEST}
DEPS
absl::fixed_array
absl::config
Expand Down Expand Up @@ -223,6 +237,8 @@ absl_cc_test(
"inlined_vector_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${INLINED_VECTOR_TEST}
DEPS
absl::check
absl::config
Expand All @@ -244,6 +260,8 @@ absl_cc_test(
"inlined_vector_exception_safety_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${INLINED_VECTOR_EXCEPTION_TEST}
DEPS
absl::inlined_vector
absl::config
Expand Down
8 changes: 8 additions & 0 deletions absl/status/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

string(SUBSTRING ${CMAKE_SYSTEM} 0 3 system_os)
if(system_os STREQUAL "AIX")
set(STATUSOR_TEST "-Wl,-bkeepfile:CMakeFiles/absl_statusor_test.dir/statusor_test.cc.o")
endif()

absl_cc_library(
NAME
status
Expand Down Expand Up @@ -96,6 +102,8 @@ absl_cc_test(
"statusor_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${STATUSOR_TEST}
DEPS
absl::status
absl::statusor
Expand Down
10 changes: 10 additions & 0 deletions absl/strings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
# limitations under the License.
#

string(SUBSTRING ${CMAKE_SYSTEM} 0 3 system_os)
if(system_os STREQUAL "AIX")
set(STRING_VIEW_TEST "-Wl,-bkeepfile:CMakeFiles/absl_string_view_test.dir/string_view_test.cc.o")
set(STR_SPLIT_TEST "-Wl,-bkeepfile:CMakeFiles/absl_str_split_test.dir/str_split_test.cc.o")
endif()

absl_cc_library(
NAME
string_view
Expand Down Expand Up @@ -269,6 +275,8 @@ absl_cc_test(
"string_view_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${STRING_VIEW_TEST}
DEPS
absl::strings
absl::config
Expand Down Expand Up @@ -309,6 +317,8 @@ absl_cc_test(
"str_split_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${STR_SPLIT_TEST}
DEPS
absl::strings
absl::core_headers
Expand Down
32 changes: 32 additions & 0 deletions absl/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

string(SUBSTRING ${CMAKE_SYSTEM} 0 3 system_os)
if(system_os STREQUAL "AIX")
set(ANY_TEST "-Wl,-bkeepfile:CMakeFiles/absl_any_test.dir/any_test.cc.o")
set(ANY_TEST_NOEXCEPTION "-Wl,-bkeepfile:CMakeFiles/absl_any_test_noexceptions.dir/any_test.cc.o")
set(ANY_EXCEPTION_SAFETY_TEST "-Wl,-bkeepfile:CMakeFiles/absl_any_exception_safety_test.dir/any_exception_safety_test.cc.o")
set(SPAN_TEST "-Wl,-bkeepfile:CMakeFiles/absl_span_test.dir/span_test.cc.o")
set(SPAN_TEST_NOEXCEPTION "-Wl,-bkeepfile:CMakeFiles/absl_span_test_noexceptions.dir/span_test.cc.o")
set(OPTIONAL_TEST "-Wl,-bkeepfile:CMakeFiles/absl_optional_test.dir/optional_test.cc.o")
set(OPTIONAL_SAFETY_TEST "-Wl,-bkeepfile:CMakeFiles/absl_optional_exception_safety_test.dir/optional_exception_safety_test.cc.o")
set(VARIANT_TEST "-Wl,-bkeepfile:CMakeFiles/absl_variant_test.dir/variant_test.cc.o")
set(VARIANT_SAFETY_TEST "-Wl,-bkeepfile:CMakeFiles/absl_variant_exception_safety_test.dir/variant_exception_safety_test.cc.o")
endif()

absl_cc_library(
NAME
any
Expand Down Expand Up @@ -64,6 +78,8 @@ absl_cc_test(
"any_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${ANY_TEST}
DEPS
absl::any
absl::config
Expand All @@ -80,6 +96,8 @@ absl_cc_test(
"any_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${ANY_TEST_NOEXCEPTION}
DEPS
absl::any
absl::config
Expand All @@ -96,6 +114,8 @@ absl_cc_test(
"any_exception_safety_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${ANY_EXCEPTION_SAFETY_TEST}
DEPS
absl::any
absl::config
Expand Down Expand Up @@ -128,6 +148,8 @@ absl_cc_test(
"span_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${SPAN_TEST}
DEPS
absl::span
absl::base
Expand All @@ -148,6 +170,8 @@ absl_cc_test(
"span_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${SPAN_TEST_NOEXCEPTION}
DEPS
absl::span
absl::base
Expand Down Expand Up @@ -219,6 +243,8 @@ absl_cc_test(
"optional_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${OPTIONAL_TEST}
DEPS
absl::optional
absl::config
Expand All @@ -235,6 +261,8 @@ absl_cc_test(
"optional_exception_safety_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${OPTIONAL_SAFETY_TEST}
DEPS
absl::optional
absl::config
Expand Down Expand Up @@ -268,6 +296,8 @@ absl_cc_test(
"variant_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${VARIANT_TEST}
DEPS
absl::variant
absl::config
Expand Down Expand Up @@ -312,6 +342,8 @@ absl_cc_test(
"variant_exception_safety_test.cc"
COPTS
${ABSL_TEST_COPTS}
LINKOPTS
${VARIANT_SAFETY_TEST}
DEPS
absl::variant
absl::config
Expand Down