Skip to content

Commit bb9a203

Browse files
Tor Didriksenbjornmu
authored andcommitted
Bug#35855488 Build on Ubuntu 23.10 [noclose]
Backport -Wno-alloc-size-larger-than suppressions from trunk. from the patch for: Bug#34099162 Add support for mold linker Change-Id: I3996c472b423daaf3002c477ccb757d2e55846f9
1 parent e471754 commit bb9a203

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,6 +2327,12 @@ IF(NOT WITHOUT_SERVER AND WITH_UNIT_TESTS)
23272327
IF(HAS_WARN_FLAG)
23282328
MY_TARGET_LINK_OPTIONS(server_unittest_library "${HAS_WARN_FLAG}")
23292329
ENDIF()
2330+
# The mold linker and RelWithDebInfo build complains about
2331+
# the new expression in Rpl_info_values::init()
2332+
IF(MY_COMPILER_IS_GNU)
2333+
MY_TARGET_LINK_OPTIONS(server_unittest_library
2334+
"-Wno-alloc-size-larger-than")
2335+
ENDIF()
23302336
ENDIF()
23312337
ELSE()
23322338
SET(DUMMY_SOURCE_FILE ${CMAKE_BINARY_DIR}/server_unittest_library.c)

sql/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ADD_WSHADOW_WARNING()
2626

2727
# Lots of warnings about -Walloc-size-larger-than= from my_malloc.cc
2828
# but it is basically impossible to trace the actual origin.
29-
IF(FPROFILE_GENERATE OR FPROFILE_USE)
29+
IF(FPROFILE_GENERATE OR FPROFILE_USE OR CMAKE_COMPILER_FLAG_WITH_LTO)
3030
IF(MY_COMPILER_IS_GNU)
3131
# -Walloc-size-larger-than=PTRDIFF_MAX is enabled by default.
3232
STRING_APPEND(CMAKE_EXE_LINKER_FLAGS " -Wno-alloc-size-larger-than")

0 commit comments

Comments
 (0)