setup_configs should respect deprecation of _LIBCPP_ENABLE_ASSERTIONS

Open Beginner friendly
#2,018 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp, shell
Domain
build-system

Research direction

Start by reading bazel/setup_configs.sh and trace how it generates the build:fuzztest-common configuration. Update the generated compiler definition to use _LIBCPP_HARDENING_MODE_EXTENSIVE instead of the deprecated _LIBCPP_ENABLE_ASSERTIONS, then verify that the generated configuration no longer causes a compilation error with clang.

Written by the indexing model from the issue text.

Description

_LIBCPP_ENABLE_ASSERTIONS is deprecated in favor of hardening modes.
In my local setup I had to manually change

build:fuzztest-common --copt=-D_LIBCPP_ENABLE_ASSERTIONS=1

to

build:fuzztest-common --copt=-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE`

For my clang to not emit a compilation error.

I hope there is a way to automatically generate this with https://github.com/google/fuzztest/blob/main/bazel/setup_configs.sh so that I don't have to manually modify the generated file.

Dominant language
C++
Stars
1.1k
Forks
137
Avg merge
3d 6h
Merged PRs (30d)
22

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/fuzztest

All issues in google/fuzztest

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.