5 Commits

Author SHA1 Message Date
Ed Page
8e90ce9a24 feat(build-script): Pass CARGO_CFG_FEATURE
This may look redundant with `CARGO_FEATURE_<CASE_CONVERTED_NAME>=1`
except that doesn't provide a lossless way of getting the names, e.g. for
forwarding for child builds like tests that need to build examples.

This also makes things more consistent as users
conditionalize on features through `cfg` and this even fits with what
the `CARGO_CFG_` docs say:

> For each configuration option of the package being built, this
> environment variable will contain the value of the configuration, where
> <cfg> is the name of the configuration uppercased and having -
> translated to _. Boolean configurations are present if they are set, and
> not present otherwise. Configurations with multiple values are joined to
> a single variable with the values delimited by ,. This includes values
> built-in to the compiler (which can be seen with rustc --print=cfg) and
> values set by build scripts and extra flags passed to rustc (such as
> those defined in RUSTFLAGS). Some examples of what these variables are:

Fixes #3702
2024-12-09 12:38:11 -06:00
Ed Page
71f68dc3c3 fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions'
The documentation that was added was pulled straight from a comment in
`custom_build.rs`.
2024-12-06 09:33:16 -06:00
Ed Page
611ec991fb feat(build-rs): Add cargo_manifest_path 2024-11-13 13:54:48 -06:00
Ed Page
54660c665e chore: Integrate build-rs into the workspace 2024-11-08 08:58:45 -06:00
Ed Page
0c7577d48a chore: Stage build-rs for merging 2024-11-07 08:39:59 -06:00