-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat: fix apple toolchain apple framework #740
feat: fix apple toolchain apple framework #740
Conversation
254c5ca
to
8bc770a
Compare
|
||
def _system_apple_toolschain_impl(ctx: AnalysisContext) -> list[Provider]: | ||
xcode_bin_path = "{}/Contents/Developer/usr/bin".format(ctx.attrs.xcode_app) | ||
sdk_path = "{}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk".format(ctx.attrs.xcode_app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused on how to handle this.
there is
buck2 % xcrun --sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14
.5.sdk
def get_apple_toolchain_attr(): | ||
# FIXME: prelude// should be standalone (not refer to fbcode//) | ||
return attrs.toolchain_dep(default = "fbcode//buck2/platform/toolchain:apple-default", providers = [AppleToolchainInfo]) | ||
return attrs.toolchain_dep(default = "toolchains//:apple", providers = [AppleToolchainInfo]) | ||
|
||
def get_apple_bundle_toolchain_attr(): | ||
# FIXME: prelude// should be standalone (not refer to fbcode//) | ||
return attrs.toolchain_dep(default = "fbcode//buck2/platform/toolchain:apple-bundle", providers = [AppleToolchainInfo]) | ||
return attrs.toolchain_dep(default = "toolchains//:apple", providers = [AppleToolchainInfo]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a situation for multiple toolchains to be needed?
I added a small example to hello world to demonstrate this working. how does cxx_library and cxx_binary fit into this because those break if they don't have an sdk version available |
Signed-off-by: Michael Pollind <[email protected]>
Signed-off-by: Michael Pollind <[email protected]>
Signed-off-by: Michael Pollind <[email protected]>
Signed-off-by: Michael Pollind <[email protected]>
3a4d150
to
c9d58c8
Compare
I've just been roughly trying to get this to work for my local setup. some of this is a bit hacked away to get this to work but I think its in the general right direction.
this is what I have in mind for resolving the apple tools
here is the working code I'm trying to test
here is my sample application that I've been testing these changes with: https://github.com/OSS-Cosmic/buck2-samples/tree/main/hello_world
I need to build this locally and verify it on my own system but this is what I have so far.