Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Apple CC toolchain setup #113

Merged
merged 40 commits into from
Jan 17, 2023
Merged

Add Apple CC toolchain setup #113

merged 40 commits into from
Jan 17, 2023

Conversation

keith
Copy link
Member

@keith keith commented Mar 23, 2022

This migrates the Apple CC toolchain from bazel into this repo. This allows this to evolve and be updated without a full bazel udpate. Bazel's built in unix toolchain can still be used to build macOS C++ targets, but this repo handles a wider variety of Apple specific flags and requires you have Xcode installed.

@keith
Copy link
Member Author

keith commented Mar 23, 2022

Investigation related to bazelbuild/bazel#15041 (comment)

@keith keith marked this pull request as ready for review July 6, 2022 19:03
@keith keith marked this pull request as draft July 6, 2022 19:04
@keith keith force-pushed the ks/add-example-toolchains-setup branch from 711b8e5 to 65e700a Compare November 2, 2022 23:26
@keith keith force-pushed the ks/add-example-toolchains-setup branch 2 times, most recently from e7c43f0 to 010569f Compare January 11, 2023 00:56
@keith keith changed the title Add example toolchains setup Add Apple CC toolchain setup Jan 12, 2023
@bazelbuild bazelbuild deleted a comment from lyft-lint-bot Jan 12, 2023
@keith keith force-pushed the ks/add-example-toolchains-setup branch from c55baea to 2a3bb18 Compare January 12, 2023 21:37
@keith keith marked this pull request as ready for review January 12, 2023 21:38
@keith
Copy link
Member Author

keith commented Jan 12, 2023

Overview / approach of changes:

  • I copied all the macOS toolchain setup I could from bazel without changing it, so most files like wrapped_clang, xcrunwrapper etc have 0 changes
  • I moved all the tests that required non-macOS only support, or relied on actually building objc, without changing them (objc_test.sh, apple_test.sh, the relevant helpers)
  • I fixed buildifier violations as needed
  • I copied the file that is now setup.bzl but changed it significantly since we don't need to handle the same sort of multi-os fallbacks
  • I plan to cleanup some things like unnecessary env vars later so we can have more clear history on why they're not needed etc

crosstool/setup.bzl Outdated Show resolved Hide resolved
crosstool/setup.bzl Outdated Show resolved Hide resolved
crosstool/setup.bzl Show resolved Hide resolved
README.md Show resolved Hide resolved
crosstool/setup.bzl Show resolved Hide resolved
keith and others added 2 commits January 13, 2023 06:43
Co-authored-by: Thi Doãn <t@thi.im>
Co-authored-by: Thi Doãn <t@thi.im>
crosstool/BUILD.toolchains Show resolved Hide resolved
crosstool/setup.bzl Show resolved Hide resolved
@keith keith merged commit 311cc83 into master Jan 17, 2023
@keith keith deleted the ks/add-example-toolchains-setup branch January 17, 2023 22:09
copybara-service bot pushed a commit to bazelbuild/bazel that referenced this pull request Mar 10, 2023
This moves the CC toolchain for building Apple platforms besides macOS to the apple_support repo bazelbuild/apple_support#113

The default unix toolchain is now used if someone wants to build for macOS without the apple_support toolchain, but it doesn't handle as many platform specific features as the previous toolchain.

Fixes #15041

Closes #16619.

PiperOrigin-RevId: 515546196
Change-Id: Ia54b53e7093c1edbfe8276730aaed5a11a94a027
copybara-service bot pushed a commit to bazelbuild/bazel that referenced this pull request Mar 14, 2023
*** Reason for rollback ***

Breaks builds internally.

*** Original change description ***

Move Apple toolchain setup to apple_support

This moves the CC toolchain for building Apple platforms besides macOS to the apple_support repo bazelbuild/apple_support#113

The default unix toolchain is now used if someone wants to build for macOS without the apple_support toolchain, but it doesn't handle as many platform specific features as the previous toolchain.

Fixes #1...

***

PiperOrigin-RevId: 516486823
Change-Id: If9b2542699cf8704e0a511e684d8519468ddd937
copybara-service bot pushed a commit to bazelbuild/bazel that referenced this pull request Mar 22, 2023
*** Reason for rollback ***

Roll forward with fix

*** Original change description ***

Automated rollback of commit d56dc18.

*** Reason for rollback ***

Breaks builds internally.

*** Original change description ***

Move Apple toolchain setup to apple_support

This moves the CC toolchain for building Apple platforms besides macOS to the apple_support repo bazelbuild/apple_support#113

The default unix toolchain is now used if someone wants to build for macOS without the apple_support toolc

***

PiperOrigin-RevId: 518560017
Change-Id: I00a106b68eac982e3d903531d5db48ae053f9301
fweikert pushed a commit to fweikert/bazel that referenced this pull request May 25, 2023
This moves the CC toolchain for building Apple platforms besides macOS to the apple_support repo bazelbuild/apple_support#113

The default unix toolchain is now used if someone wants to build for macOS without the apple_support toolchain, but it doesn't handle as many platform specific features as the previous toolchain.

Fixes bazelbuild#15041

Closes bazelbuild#16619.

PiperOrigin-RevId: 515546196
Change-Id: Ia54b53e7093c1edbfe8276730aaed5a11a94a027
fweikert pushed a commit to fweikert/bazel that referenced this pull request May 25, 2023
*** Reason for rollback ***

Breaks builds internally.

*** Original change description ***

Move Apple toolchain setup to apple_support

This moves the CC toolchain for building Apple platforms besides macOS to the apple_support repo bazelbuild/apple_support#113

The default unix toolchain is now used if someone wants to build for macOS without the apple_support toolchain, but it doesn't handle as many platform specific features as the previous toolchain.

Fixes bazelbuild#1...

***

PiperOrigin-RevId: 516486823
Change-Id: If9b2542699cf8704e0a511e684d8519468ddd937
fweikert pushed a commit to fweikert/bazel that referenced this pull request May 25, 2023
*** Reason for rollback ***

Roll forward with fix

*** Original change description ***

Automated rollback of commit d56dc18.

*** Reason for rollback ***

Breaks builds internally.

*** Original change description ***

Move Apple toolchain setup to apple_support

This moves the CC toolchain for building Apple platforms besides macOS to the apple_support repo bazelbuild/apple_support#113

The default unix toolchain is now used if someone wants to build for macOS without the apple_support toolc

***

PiperOrigin-RevId: 518560017
Change-Id: I00a106b68eac982e3d903531d5db48ae053f9301
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.

3 participants