Skip to content

Conversation

stuartcarnie
Copy link
Contributor

Copy link
Contributor

@Repiteo Repiteo left a comment

Choose a reason for hiding this comment

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

Needs style adjustment to pass CI

]

if env["osxcross"]:
env.Append(SWIFTCFLAGS=["-resource-dir", "/root/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
env.Append(SWIFTCFLAGS=["-resource-dir", "/root/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift"])
env.Append(
SWIFTCFLAGS=[
"-resource-dir",
"/root/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift",
]
)

@stuartcarnie
Copy link
Contributor Author

Thanks, forgot about running ruff!

Comment on lines +273 to +275
if "osxcross" in env:
# TODO: swiftly use --print-location
frontend_path = "/root/.local/share/swiftly/toolchains/6.2.0/usr/bin/swift-frontend"
Copy link
Member

Choose a reason for hiding this comment

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

I'll note that this makes the setup hardcoded for our own osxcross setup in our build containers. In theory we used to support people using their own osxcross setup which may use different paths, which is why APPLE_TOOLCHAIN_PATH is configurable.

I think it becomes increasingly harder for users to get a working osxcross setup for cross-compilation without using our own build containers, so it's probably fine to hardcode things for now.

But we should soon see how to improve it further because e.g. the hardcoded 6.2.0 probably means that it won't be possible to compile iOS template for the current state of Godot after this PR in a year or two with an updated build container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants