Get the latest tech news
Feature flags in Bazel builds
Pigweed Eng Blog #2: Feature flags in Bazel builds# By Ted Pudlik Published 2024-05-31 Let’s say you’re migrating your build system to Bazel. Your project heavily relies on preprocessor defines to configure its code.
This may be a disappointment if you were hoping to provide no default, and have Bazel return errors if no value is explicitly set for a flag (either via a platform, through.bazelrc, or on the command line). If you have the freedom to refactor your code to use the Chromium pattern, Bazel provides safe and convenient idioms for expressing configuration through build flags. Then Pigweed’s TL comes along and says “Ted, don’t you feel like spending a day fighting with RST [the markup we use for pigweed.dev]?” Sorry, actually they said something more like, “Why is this doc internal, can’t we share this more widely”?
Or read this on Hacker News