@@ -42,7 +42,7 @@ logging.basicConfig(
42
42
]),
43
43
level = logging .INFO ,
44
44
)
45
- g_macos_deployment_target = '12 .0'
45
+ g_macos_deployment_target = '14 .0'
46
46
47
47
g_shared_lib_prefix = "lib"
48
48
if platform .system () == 'Darwin' :
@@ -726,6 +726,10 @@ def build_swiftpm_with_cmake(args):
726
726
"""Builds SwiftPM using CMake."""
727
727
logging .info ("Building SwiftPM (with CMake)" )
728
728
729
+ module_triple = get_build_target (args )
730
+ if platform .system () == 'Darwin' :
731
+ module_triple = module_triple .replace ('macosx' , 'macos' )
732
+
729
733
cmake_flags = [
730
734
get_llbuild_cmake_arg (args ),
731
735
"-DTSC_DIR=" + os .path .join (args .build_dirs ["tsc" ], "cmake/modules" ),
@@ -738,6 +742,8 @@ def build_swiftpm_with_cmake(args):
738
742
"-DSwiftCertificates_DIR=" + os .path .join (args .build_dirs ["swift-certificates" ], "cmake/modules" ),
739
743
"-DSwiftBuild_DIR=" + os .path .join (args .build_dirs ["swift-build" ], "cmake/modules" ),
740
744
"-DSWIFTPM_PATH_TO_SWIFT_SYNTAX_SOURCE=" + args .source_dirs ["swift-syntax" ],
745
+ "-DCMAKE_Swift_COMPILER_TARGET={}" .format ((get_build_target (args ) + g_macos_deployment_target ) if platform .system () == 'Darwin' else get_build_target (args )),
746
+ "-DSwiftPMRuntime_MODULE_TRIPLE={}" .format (module_triple ),
741
747
]
742
748
743
749
if platform .system () == 'Darwin' :
@@ -746,14 +752,14 @@ def build_swiftpm_with_cmake(args):
746
752
747
753
build_with_cmake (args , cmake_flags , ["swift-bootstrap" , "PackageDescription" , "PackagePlugin" , "CompilerPluginSupport" ], args .project_root , args .bootstrap_dir )
748
754
749
- triple = get_build_target (args )
750
-
751
755
mkdir_p (os .path .join (args .bootstrap_dir , "pm" , "ManifestAPI" ))
752
- shutil .copy2 (os .path .join (args .bootstrap_dir , "Sources" , "Runtimes" , "PackageDescription" , "PackageDescription.swiftmodule" , "%s.swiftmodule" % triple ),
756
+ shutil .copy2 (os .path .join (args .bootstrap_dir , "Sources" , "Runtimes" , "PackageDescription" , "PackageDescription.swiftmodule" , "%s.swiftmodule" % module_triple ),
753
757
os .path .join (args .bootstrap_dir , "pm" , "ManifestAPI" , "PackageDescription.swiftmodule" ))
758
+ shutil .copy2 (os .path .join (args .bootstrap_dir , "Sources" , "Runtimes" , "CompilerPluginSupport" , "CompilerPluginSupport.swiftmodule" , "%s.swiftmodule" % module_triple ),
759
+ os .path .join (args .bootstrap_dir , "pm" , "ManifestAPI" , "CompilerPluginSupport.swiftmodule" ))
754
760
755
761
mkdir_p (os .path .join (args .bootstrap_dir , "pm" , "PluginAPI" ))
756
- shutil .copy2 (os .path .join (args .bootstrap_dir , "Sources" , "Runtimes" , "PackagePlugin" , "PackagePlugin.swiftmodule" , "%s.swiftmodule" % triple ),
762
+ shutil .copy2 (os .path .join (args .bootstrap_dir , "Sources" , "Runtimes" , "PackagePlugin" , "PackagePlugin.swiftmodule" , "%s.swiftmodule" % module_triple ),
757
763
os .path .join (args .bootstrap_dir , "pm" , "PluginAPI" , "PackagePlugin.swiftmodule" ))
758
764
759
765
if args .llbuild_link_framework :
0 commit comments