bazelbuild / bazelbuild/rules_cc

Feature flags for common compiler options (e.g. C++ standard)

Open
#139 0 comments 5 reactions 0 assignees View on GitHub
P4 untriaged
Dominant language
Starlark
Stars
247
Forks
196
PR merge metrics
No merged PRs in 30d

Description

### Description of the problem / feature request:

Allow customizing common flags (e.g. standard version) via features.

### Feature requests: what underlying problem are you trying to solve with this feature?

I want to not add compiler dependent flags to .bazelrc nor to my rules. Instead, I believe some of the common options (e.g. --std=c++17) could be best modelled by features. Moreover, this would add clear documentation w.r.t. what's the default standard on each toolchain as opposed to being hardcoded (https://github.com/bazelbuild/rules_cc/search?q=%22-std%3Dc%2B%2B%22).

### Have you found anything relevant by searching the web?

- https://stackoverflow.com/questions/40260242/how-to-set-c-standard-version-when-build-with-bazel

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Begin by reviewing how rules_cc models compiler options and the linked C++ standard discussion, then define which common flags should become features and document defaults per toolchain.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.