bitcoin icon indicating copy to clipboard operation
bitcoin copied to clipboard

depends: Avoid using helper variables in toolchain file

Open hebasto opened this issue 3 months ago • 1 comments

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.

hebasto avatar Nov 24 '24 13:11 hebasto