Skip to content

Commit 8b45c16

Browse files
committed
fixup! HEAD
1 parent bd1a346 commit 8b45c16

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Sources/Runtimes/cmake/modules/EmitSwiftInterface.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,5 @@ function(emit_swift_interface target)
4747
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-module-interface-path ${CMAKE_CURRENT_BINARY_DIR}/${module_name}.swiftmodule/${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}.swiftinterface>"
4848
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-private-module-interface-path ${CMAKE_CURRENT_BINARY_DIR}/${module_name}.swiftmodule/${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}.private.swiftinterface>")
4949
endif()
50-
target_compile_options(${target} PRIVATE
51-
$<$<COMPILE_LANGUAGE:Swift>:-library-level$<SEMICOLON>api>
52-
$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend$<SEMICOLON>-require-explicit-availability=ignore>)
5350
endif()
5451
endfunction()

Utilities/bootstrap

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,10 @@ def build_swiftpm_with_cmake(args):
726726
"""Builds SwiftPM using CMake."""
727727
logging.info("Building SwiftPM (with CMake)")
728728

729+
module_triple = get_build_target(args)
730+
if platform.system() == 'Darwin':
731+
module_triple = module_triple.replace('macosx', 'macos')
732+
729733
cmake_flags = [
730734
get_llbuild_cmake_arg(args),
731735
"-DTSC_DIR=" + os.path.join(args.build_dirs["tsc"], "cmake/modules"),
@@ -738,6 +742,8 @@ def build_swiftpm_with_cmake(args):
738742
"-DSwiftCertificates_DIR=" + os.path.join(args.build_dirs["swift-certificates"], "cmake/modules"),
739743
"-DSwiftBuild_DIR=" + os.path.join(args.build_dirs["swift-build"], "cmake/modules"),
740744
"-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),
741747
]
742748

743749
if platform.system() == 'Darwin':
@@ -746,14 +752,14 @@ def build_swiftpm_with_cmake(args):
746752

747753
build_with_cmake(args, cmake_flags, ["swift-bootstrap", "PackageDescription", "PackagePlugin", "CompilerPluginSupport"], args.project_root, args.bootstrap_dir)
748754

749-
triple = get_build_target(args)
750-
751755
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),
753757
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"))
754760

755761
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),
757763
os.path.join(args.bootstrap_dir, "pm", "PluginAPI", "PackagePlugin.swiftmodule"))
758764

759765
if args.llbuild_link_framework:

0 commit comments

Comments
 (0)