Skip to content
Merged
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,9 @@ elseif(UNIX)
include(UnixCompileRules)
endif()

# Add any extra C++ compilation options that were passed down.
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${SWIFT_EXTRA_CXX_FLAGS}>)

if(CMAKE_C_COMPILER_ID MATCHES Clang)
add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-Werror=gnu>)
endif()
Expand Down
2 changes: 1 addition & 1 deletion utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ enable-new-runtime-build

# Escalate certain C++ warnings to errors for Swift.
extra-swift-cmake-options=
-DCMAKE_CXX_FLAGS="-Werror=unused"
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should move this to the buildbot_incremental_base preset? The smoketest preset only gets run if someone explicitly asks for a smoke test, but not if they only ask for PR testing.

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, it might be good to spell out the flags because at this point, I have no idea what the existing flags are, or where they're coming from. These preset files don't make it easy to track down where flags are coming from.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Alternatively, it might be good to spell out the flags because at this point

Sorry, by spell out the flags you mean...?

Copy link
Collaborator Author

@AnthonyLatsis AnthonyLatsis Jun 19, 2025

Choose a reason for hiding this comment

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

I wonder if we should move this to the buildbot_incremental_base preset?

I would rather exclude the possibility of some recurrent no-asserts job accidentally picking this up. Ideally, this should affect only the presets that can be used to fulfill our PR status checks. So perhaps a better alternative is to stick it in a pr-testing preset and apply that to the nodes we use for that purpose.

-DSWIFT_EXTRA_CXX_FLAGS="-Werror=unused"

[preset: buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx
Expand Down