Use libc++ headers from macOS SDK instead of from clang #18072

pull dongcarl wants to merge 2 commits into bitcoin:master from dongcarl:2020-01-macos-sdk-with-headers changing 3 files +227 −8
  1. dongcarl commented at 11:42 am on February 5, 2020: member

    Based on #16392 Update: Base PR has been merged.

    Why this is useful: Previously, we were using the libc++ headers copied from the clang package we downloaded from llvm.org. This is suboptimal as our goal is to have a toolchain that can target macOS, which (in Xcode.app) has its own set of libc++ headers that can differ from those of the clang package. It seems to me that given our goal, it is better to use what Apple intends, and not rely on upstream clang <-> Apple clang compatibility.


    This requires a regeneration of the macOS SDK, I apologize that this didn’t make it into #16392, please follow the updated instructions here: https://github.com/bitcoin/bitcoin/pull/18072/commits/8e8fadff59c48b33ffbdac14acd52f469954307d?short_path=9de36be#diff-9de36befe13356841c2699ee0eff4a0a (I’m linking to the Markdown diff so that people who need to regenerate the macOS SDK can see the difference in procedure from before)

  2. dongcarl added the label Build system on Feb 5, 2020
  3. fanquake added the label macOS on Feb 5, 2020
  4. native_cctools: Don't use libc++ headers from clang
    We modify the macdeploy instructions in the next commit to include
    libc++ headers in the SDK.
    8e888983b7
  5. contrib: macdeploy: Correctly generate macOS SDK
    Previously, we did not include the libc++ headers in our SDK creation,
    now we can use tpoechtrager's script to correctly do that. The
    gen_sdk_package.sh is taken from
    https://github.com/tpoechtrager/osxcross/blob/d3392f4eae78f3fa3f1fd065fa423f2712825102/tools/gen_sdk_package.sh
    
    The location within the SDK where we place the libc++ headers is chosen
    such that clang's search path detection logic for sysroots would pick up
    the headers properly.
    
    We also document this change.
    8e8fadff59
  6. dongcarl force-pushed on Feb 5, 2020
  7. MarcoFalke added the label Needs gitian build on Feb 8, 2020
  8. DrahtBot removed the label Needs gitian build on Feb 9, 2020
  9. sipa commented at 3:14 am on February 9, 2020: member
    Can you explain why this is useful?
  10. MarcoFalke deleted a comment on Feb 9, 2020
  11. dongcarl commented at 4:16 pm on February 10, 2020: member
    @sipa I apologize for not including that, it is now included in the PR description!
  12. dongcarl added this to the "PRs" column in a project

  13. DrahtBot commented at 6:20 am on April 11, 2020: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18589 (Fix naming of macOS SDK and clarify version by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  14. Sjors commented at 12:04 pm on April 12, 2020: member

    Travis linter is annoyed by a few things: https://travis-ci.org/github/bitcoin/bitcoin/jobs/646483250#L370

    It wasn’t super clear you have to point it to Xcode.app, not the directory. Otherwise I get this error:

    0found Xcode: /Users/sjors/dev/sdk-apple
    1Xcode (or this script) is out of date
    

    The script produces a 97M file:

    08d06240bce91b55cc5d278a90f4208aa4958d86bc14c3f2b70de2fdaa6b13c03  MacOSX10.14.sdk.tar.gz
    

    (assuming this is deterministic, maybe add that checksum to the script as a sanity check?)

  15. dongcarl commented at 7:28 pm on April 16, 2020: member
    @Sjors You have my gratitude for the testing! After thinking on this some more, I think something like #18674 might be a cleaner, less error-prone way forward. Will close this once I have a PR up!
  16. DrahtBot added the label Needs rebase on Apr 24, 2020
  17. DrahtBot commented at 10:00 am on April 24, 2020: member

    🐙 This pull request conflicts with the target branch and needs rebase.

  18. dongcarl commented at 8:25 pm on June 10, 2020: member
    Closing in favor of: #19240
  19. dongcarl closed this on Jun 10, 2020

  20. fanquake moved this from the "PRs" to the "Done" column in a project

  21. DrahtBot locked this on Feb 15, 2022

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-11-17 12:12 UTC

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