depends: Avoid using helper variables in toolchain file #31360

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:241124-vars changing 1 files +10 −14
  1. hebasto commented at 1:49 pm on November 24, 2024: member

    Using helper variables has two issues:

    1. They contaminate the global namespace of the main build script.
    2. They can be used as set(var), effectively exposing a cache variable var, which makes the toolchain file susceptible to the build environment.

    The depends/Makefile can generate values with “not-set” semantics as empty strings or strings containing only spaces. For example:https://github.com/bitcoin/bitcoin/blob/2638fdb4f934be96b7c798dbac38ea5ab8a6374a/depends/Makefile#L157 Therefore, MATCHES must be used rather than STREQUAL.

  2. depends: Avoid using helper variables in toolchain file
    Using helper variables has two issues:
    1. They contaminate the global namespace of the main build script.
    2. They can be used as `set(var)`, effectively exposing a cache variable
    `var`, which makes the toolchain file susceptible to the build
    environment.
    1e7cdb04fd
  3. DrahtBot commented at 1:50 pm on November 24, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31360.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Build system on Nov 24, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me