Page MenuHomePhabricator

depends: Pin clang search paths for darwin host
ClosedPublic

Authored by PiRK on Apr 24 2023, 14:20.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCe95c6a7be250: depends: Pin clang search paths for darwin host
Summary

depends: Delay expansion of per-package vars

Prior to this commit, when int_vars was called for packages, it would
immediately expand the "single-dollar variables", which may be defined
in terms of variables which are not yet determined (e.g. variables
defined in package/*.mk, which are included after int_vars is called).

This is required for the next commit as after that commit, for darwin
cross-builds:

0. int_vars is defined in terms of $(1)_cc

  1. $(1)_cc is defined in terms of darwin_CC
  2. ... which is defined in terms of clang_resource_dir
  3. ... which is defined in terms of native_cctools_clang_version
  4. which is undetermined at the time when int_vars is being expanded and evaluated

depends: Pin clang search paths for darwin host

depends: Remove -fuse-ld line

clang warns when a command line option is unused, and some of our tests
use Werror, so unfortunately we cannot use this flag to pin our linker
for now. Leaving this commit in for future reference, as it would be
great if there's more granularity to Werror and we can be explicit about
what linker we want to use.

depends: Fully determine path for darwin_{CC,CXX}

Instead of doing the awkward /bin path prepending at config.site
creation time, set darwin_{CC,CXX} in a way that fully determines the
program's path (clang/clang++) similar to how AC_PATH_{TOOL,PROG} would
do.

Also see the added comment block in depends/Makefile for more context on
determining $PATH for our config.site.

depends: Fully determine path for darwin cctools

See previous commit for description.

depends: Add comment about cache invalidation

This is a backport of core#19683

Depends on D13766

Changes in depends/Makefile are not applicable (D7671)

Test Plan

OSX builds on CI

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable