Commit Graph

7 Commits

Author SHA1 Message Date
Fabian Meumertzheim 8386b9d32b
Expose int- and string-valued build settings as Make variables (#440)
While build settings allow for much cleaner flag and setting definitions
than `--define`, they have the major drawback that rules need to provide
dedicated support for them, which isn't the case for native and most
community-maintained rules.

This change attempts to bridge this gap by optionally exposing the value
of the common build setting types as Make variables to rules that depend
on them via the `toolchains` attribute: If the new `make_variable`
attribute is set, the value of the flag or setting is available as a
Make variable with that.

Consistency with pre-defined Make variables is enforced by limiting the
character set for `make_variable` values to `[A-Z0-9_]`. The new
attribute is also only added to int- and string-valued build settings as
the other types lack a canonical stringification.

Co-authored-by: Xùdōng Yáng <wyverald@gmail.com>
2023-08-22 19:41:36 +00:00
Xùdōng Yáng 61d9c62833
Make settings error message more friendly (#394)
By stripping leading '@'s from labels in the main repo. So it talks about the flag '//foo:bar' instead of the flag '@//foo:bar'.
2022-09-05 16:17:20 -04:00
Alexandre Rostovtsev d7e9dbb31f
Add missing docs and doc links; update bazel.build links (#387) 2022-09-01 08:19:43 -04:00
aiuto fd75066f15
update links to bazel docs (#306) 2021-06-16 13:00:06 -04:00
aiuto 2b38b2f8bd
fix formatting problem (#169) 2019-07-12 14:55:22 -04:00
Julie 10851c2c5b Give BuildSettingInfo's value field a description (#167) 2019-07-03 14:42:40 -04:00
Julie b113ed5d05 Create common build settings (#154)
Create common simple build settings for people to use so they don't recreate these rules over and over again. 

This fulfills part of the SBC design doc: https://docs.google.com/document/d/1vc8v-kXjvgZOdQdnxPTaV0rrLxtP2XwnD2tAZlYJOqw/edit#bookmark=id.iiumwic0jphr
2019-06-14 15:22:54 -04:00