Skip to content

Conversation

@jungleraptor
Copy link
Contributor

@jungleraptor jungleraptor commented Apr 5, 2023

Adds support for building with the custom llvm toolchain on aarch64-darwin.

Design notes

  • Adds aarch64-darwin-llvm toolchain. The llvm-project does not have prebuilt binaries available for clang-14 on arm macs, so we had to build this distribution from source ourselves: Test m1 mac swift-toolchains#14
  • Enables treating warnings as errors on macos
  • Disables -ffp-contract=on which was made the default in clang-14
  • Enables using the llvm distribution clang-format instead of a system install for aarch64-darwin.
  • note: on macos coreutils is an implicit dependency since we use realpath in the clang-format scripts.

Testing

@jungleraptor jungleraptor changed the title add support for aarch-64-darwin cc: toolchain: add support for aarch64-darwin-llvm [BUILD-563] Apr 10, 2023
@jungleraptor jungleraptor marked this pull request as ready for review April 10, 2023 21:03
# https://developer.apple.com/forums/thread/719961
"-undefined",
"dynamic_lookup",
"-Wl,-no_fixup_chains",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure what chained fixups are but it doesn't seem like we need them, and this silences a bunch of annoying linker warnings.

We do need to build with -undefined dynamic_lookup however.

@jungleraptor jungleraptor requested a review from wwieclaw April 10, 2023 22:23
@jungleraptor jungleraptor requested review from a team and krisukox April 10, 2023 22:23
@jungleraptor jungleraptor requested a review from silverjam April 11, 2023 01:00
Copy link
Contributor

@krisukox krisukox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jungleraptor jungleraptor merged commit 60e8255 into main Apr 11, 2023
@jungleraptor jungleraptor deleted the isaac/aarch64-darwin-llvm branch April 11, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants