Repository navigation
feat: Update to the latest Velox submodule to add support for searching archives from S3; Globally ignore stringop-overflow warnings to mitigate GCC bug which is triggered in 3rd-party code.
#52
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
Changes from 4 commits
0597c11
25fab3e
7522652
0ce1c92
b8470f5
be052cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,6 +29,21 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) | |||||||||||||||||||||||||||||
| message("Appending CMAKE_CXX_FLAGS with ${SCRIPT_CXX_FLAGS}") | ||||||||||||||||||||||||||||||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}") | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Disable -Wstringop-overflow to avoid a false positive in the following compiler versions. See | ||||||||||||||||||||||||||||||
| # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117983 | ||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||
| # NOTE: Typically, this is disabled using a VELOX_SUPPRESS_STRINGOP guard within the code; but that | ||||||||||||||||||||||||||||||
| # doesn't apply to 3rd-party libraries, so we need to disable it globally for now. | ||||||||||||||||||||||||||||||
| if("GNU" STREQUAL "${CMAKE_CXX_COMPILER_ID}" | ||||||||||||||||||||||||||||||
| AND ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12 | ||||||||||||||||||||||||||||||
| AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.5) | ||||||||||||||||||||||||||||||
| OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13 | ||||||||||||||||||||||||||||||
| AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.4) | ||||||||||||||||||||||||||||||
| OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14 | ||||||||||||||||||||||||||||||
| AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.3))) | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Style nit: simplify CMake conditionals for readability. Minor readability tweaks:
Apply this diff for the condition syntax (when you relocate the block as suggested): -if("GNU" STREQUAL "${CMAKE_CXX_COMPILER_ID}"
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||||||||||||||||||||||||||||||
| target_compile_options(log_surgeon PRIVATE "-Wno-stringop-overflow") | ||||||||||||||||||||||||||||||
| endif() | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix: target_compile_options is invoked before target creation (configure-time error). CMake errors out if you call target_compile_options() on a target that hasn’t been created yet. At this location, log_surgeon is very likely not defined (add_subdirectory(velox) is at Line 234 and add_subdirectory(presto_cpp) is at Line 270). Move this block to after the target is created and guard it with if(TARGET log_surgeon). Apply this diff to remove the premature block here: -# Disable -Wstringop-overflow to avoid a false positive in the following compiler versions. See
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117983
-#
-# NOTE: Typically, this is disabled using a VELOX_SUPPRESS_STRINGOP guard within the code; but that
-# doesn't apply to 3rd-party libraries, so we need to disable it globally for now.
-if("GNU" STREQUAL "${CMAKE_CXX_COMPILER_ID}"
- AND ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12
- AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.5)
- OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13
- AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.4)
- OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14
- AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.3)))
- target_compile_options(log_surgeon PRIVATE "-Wno-stringop-overflow")
-endif()
+# (moved) GCC-specific -Wstringop-overflow suppression for log_surgeon is applied after the target is created.Then, insert this block AFTER add_subdirectory(presto_cpp) (Line 270) so the target exists: # Disable -Wstringop-overflow to avoid a false positive in the following compiler versions.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117983
# NOTE: VELOX_SUPPRESS_STRINGOP applies to Velox sources; for 3rd-party targets use target-level flags.
if(TARGET log_surgeon)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.5)
OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.4)
OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.3)))
target_compile_options(log_surgeon PRIVATE -Wno-stringop-overflow)
endif()
endif()Alternatively (cleaner), keep it target-local and compiler/version-gated using generator expressions: if(TARGET log_surgeon)
target_compile_options(log_surgeon PRIVATE
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,12>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,12.5>>:-Wno-stringop-overflow>
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,13>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,13.4>>:-Wno-stringop-overflow>
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,14>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,14.3>>:-Wno-stringop-overflow>
)
endif()🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Known warnings that are benign can be disabled: | ||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||
| # * `restrict` since it triggers a bug in gcc 12. See | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Clarify comment: suppression is target-scoped, not global.
The note says “disable it globally,” but the code applies it only to log_surgeon. Adjust the wording to avoid confusion.
Apply this diff to align the comment with actual scope:
📝 Committable suggestion
🤖 Prompt for AI Agents