mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Compare commits
2 commits
816ec99355
...
7864ac8019
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7864ac8019 | ||
![]() |
ad74ed68c1 |
4 changed files with 21 additions and 1 deletions
|
@ -25,6 +25,7 @@ def get_opts():
|
||||||
|
|
||||||
return [
|
return [
|
||||||
("vulkan_sdk_path", "Path to the Vulkan SDK", ""),
|
("vulkan_sdk_path", "Path to the Vulkan SDK", ""),
|
||||||
|
("SWIFT_FRONTEND", "Path to the swift-frontend binary", ""),
|
||||||
# APPLE_TOOLCHAIN_PATH Example: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
|
# APPLE_TOOLCHAIN_PATH Example: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
|
||||||
(("APPLE_TOOLCHAIN_PATH", "IOS_TOOLCHAIN_PATH"), "Path to the Apple toolchain", ""),
|
(("APPLE_TOOLCHAIN_PATH", "IOS_TOOLCHAIN_PATH"), "Path to the Apple toolchain", ""),
|
||||||
(("APPLE_SDK_PATH", "IOS_SDK_PATH"), "Path to the iOS SDK", ""),
|
(("APPLE_SDK_PATH", "IOS_SDK_PATH"), "Path to the iOS SDK", ""),
|
||||||
|
|
|
@ -29,6 +29,7 @@ def get_opts():
|
||||||
|
|
||||||
return [
|
return [
|
||||||
("osxcross_sdk", "OSXCross SDK version", "darwin16"),
|
("osxcross_sdk", "OSXCross SDK version", "darwin16"),
|
||||||
|
("SWIFT_FRONTEND", "Path to the swift-frontend binary", ""),
|
||||||
("MACOS_SDK_PATH", "Path to the macOS SDK", ""),
|
("MACOS_SDK_PATH", "Path to the macOS SDK", ""),
|
||||||
("vulkan_sdk_path", "Path to the Vulkan SDK", ""),
|
("vulkan_sdk_path", "Path to the Vulkan SDK", ""),
|
||||||
EnumVariable("macports_clang", "Build using Clang from MacPorts", "no", ["no", "5.0", "devel"], ignorecase=2),
|
EnumVariable("macports_clang", "Build using Clang from MacPorts", "no", ["no", "5.0", "devel"], ignorecase=2),
|
||||||
|
|
|
@ -24,6 +24,7 @@ def get_opts():
|
||||||
from SCons.Variables import BoolVariable
|
from SCons.Variables import BoolVariable
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
("SWIFT_FRONTEND", "Path to the swift-frontend binary", ""),
|
||||||
# APPLE_TOOLCHAIN_PATH Example: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
|
# APPLE_TOOLCHAIN_PATH Example: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
|
||||||
("APPLE_TOOLCHAIN_PATH", "Path to the Apple toolchain", ""),
|
("APPLE_TOOLCHAIN_PATH", "Path to the Apple toolchain", ""),
|
||||||
(("APPLE_SDK_PATH", "VISIONOS_SDK_PATH"), "Path to the visionOS SDK", ""),
|
(("APPLE_SDK_PATH", "VISIONOS_SDK_PATH"), "Path to the visionOS SDK", ""),
|
||||||
|
|
|
@ -270,7 +270,16 @@ def setup_swift_builder(env, apple_platform, sdk_path, current_path, bridging_he
|
||||||
|
|
||||||
env["ALL_SWIFT_FILES"] = all_swift_files
|
env["ALL_SWIFT_FILES"] = all_swift_files
|
||||||
env["CURRENT_PATH"] = current_path
|
env["CURRENT_PATH"] = current_path
|
||||||
frontend_path = "$APPLE_TOOLCHAIN_PATH/usr/bin/swift-frontend"
|
if "SWIFT_FRONTEND" in env and env["SWIFT_FRONTEND"] != "":
|
||||||
|
frontend_path = env["SWIFT_FRONTEND"]
|
||||||
|
elif "osxcross" not in env:
|
||||||
|
frontend_path = "$APPLE_TOOLCHAIN_PATH/usr/bin/swift-frontend"
|
||||||
|
else:
|
||||||
|
frontend_path = None
|
||||||
|
|
||||||
|
if frontend_path is None:
|
||||||
|
raise Exception("Swift frontend path is not set. Please set SWIFT_FRONTEND.")
|
||||||
|
|
||||||
bridging_header_path = current_path + "/" + bridging_header_filename
|
bridging_header_path = current_path + "/" + bridging_header_filename
|
||||||
env["SWIFTC"] = frontend_path + " -frontend -c" # Swift compiler
|
env["SWIFTC"] = frontend_path + " -frontend -c" # Swift compiler
|
||||||
env["SWIFTCFLAGS"] = [
|
env["SWIFTCFLAGS"] = [
|
||||||
|
@ -290,6 +299,14 @@ def setup_swift_builder(env, apple_platform, sdk_path, current_path, bridging_he
|
||||||
"-I./", # Pass the current directory as the header root so bridging headers can include files from any point of the hierarchy
|
"-I./", # Pass the current directory as the header root so bridging headers can include files from any point of the hierarchy
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if "osxcross" in env:
|
||||||
|
env.Append(
|
||||||
|
SWIFTCFLAGS=[
|
||||||
|
"-resource-dir",
|
||||||
|
"/root/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
if env["debug_symbols"]:
|
if env["debug_symbols"]:
|
||||||
env.Append(SWIFTCFLAGS=["-g"])
|
env.Append(SWIFTCFLAGS=["-g"])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue