HomePhabricator

build: use -isysroot over --sysroot on macOS

Description

build: use -isysroot over --sysroot on macOS

Summary:

Not only does this seem to be the more correct behaviour when targeting Darwin, but if you use -isysroot, Clangs Darwin driver will infer the deployment target from the SDK and use other SDK info when parsing arguments to the linker. In the case of -platform_version, which is added if the linker is new enough, the version tuple is constructed from the SDKInfo, and SDKInfo, as far as I can tell, only exists when -isysroot has been passed, see parseSDKSettings

As a result, the SDK version field in the LC_BUILD_VERSION command is filled out.

This, from what I understand, will fix the issue we are having with Qt deciding wether or not to enable features like "Dark mode" on macOS

This is a backport of core#21793

Test Plan: CI osx builds

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13790

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Apr 28 2021, 07:27
PiRKCommitted on Apr 27 2023, 13:28
PiRKPushed on Apr 27 2023, 13:28
Reviewer
Restricted Project
Differential Revision
D13790: build: use -isysroot over --sysroot on macOS
Parents
rABCa337879cbc47: [chronik-client] Add to arc lint
Branches
Unknown
Tags
Unknown