Skip to content

[presets] Escalate C++ "unused" warnings in macOS smoke test #81284

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

Open
wants to merge 1 commit into
base: main
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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ set(CMAKE_CXX_STANDARD ${SWIFT_MIN_CXX_STANDARD} CACHE STRING "C++ standard to c
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)

# This is needed to allow to pass Swift-only C++ flags from `build-script`,
# since `--swift-cmake-options` does not work as expected, and specifying
# `CMAKE_CXX_FLAGS` to `--extra-cmake-options` would apply the setting to other
# build products as well.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SWIFT_CXX_FLAGS}")

# First include general CMake utilities.
include(SwiftUtils)
include(CheckSymbolExists)
Expand Down
4 changes: 4 additions & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,10 @@ skip-test-llbuild

enable-new-runtime-build

# Escalate certain C++ warnings to errors for Swift.
extra-cmake-options=
-DSWIFT_CXX_FLAGS="-Werror=unused"

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