@@ -4,11 +4,7 @@ include(SwiftUtils)
4
4
# Compute the library subdirectory to use for the given sdk and
5
5
# architecture, placing the result in 'result_var_name'.
6
6
function (compute_library_subdir result_var_name sdk arch )
7
- if (sdk IN_LIST SWIFT_APPLE_PLATFORMS OR sdk STREQUAL "MACCATALYST" )
8
- set ("${result_var_name} " "${SWIFT_SDK_${sdk} _LIB_SUBDIR}" PARENT_SCOPE )
9
- else ()
10
- set ("${result_var_name} " "${SWIFT_SDK_${sdk} _LIB_SUBDIR}/${arch} " PARENT_SCOPE )
11
- endif ()
7
+ set ("${result_var_name} " "${SWIFT_SDK_${sdk} _LIB_SUBDIR}" PARENT_SCOPE )
12
8
endfunction ()
13
9
14
10
# Return a swiftc flag (e.g. -O or -Onone) to control optimization level based
@@ -496,17 +492,10 @@ function(_compile_swift_files
496
492
set (module_base_static "${module_dir_static} /${SWIFTFILE_MODULE_NAME} " )
497
493
498
494
set (module_triple ${SWIFT_SDK_${library_subdir_sdk}_ARCH_${SWIFTFILE_ARCHITECTURE}_MODULE} )
499
- if (SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS OR
500
- SWIFTFILE_SDK STREQUAL "MACCATALYST" )
501
- set (specific_module_dir "${module_base} .swiftmodule" )
502
- set (module_base "${module_base} .swiftmodule/${module_triple} " )
503
-
504
- set (specific_module_dir_static "${module_base_static} .swiftmodule" )
505
- set (module_base_static "${module_base_static} .swiftmodule/${module_triple} " )
506
- else ()
507
- set (specific_module_dir )
508
- set (specific_module_dir_static )
509
- endif ()
495
+ set (specific_module_dir "${module_base} .swiftmodule" )
496
+ set (module_base "${module_base} .swiftmodule/${module_triple} " )
497
+ set (specific_module_dir_static "${module_base_static} .swiftmodule" )
498
+ set (module_base_static "${module_base_static} .swiftmodule/${module_triple} " )
510
499
set (module_file "${module_base} .swiftmodule" )
511
500
set (module_doc_file "${module_base} .swiftdoc" )
512
501
@@ -544,25 +533,13 @@ function(_compile_swift_files
544
533
set (optional_arg "OPTIONAL" )
545
534
endif ()
546
535
547
- if (SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS OR
548
- SWIFTFILE_SDK STREQUAL "MACCATALYST" )
549
- swift_install_in_component (DIRECTORY "${specific_module_dir} "
550
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
551
- COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} " )
552
- if (SWIFTFILE_STATIC )
553
- swift_install_in_component (DIRECTORY "${specific_module_dir_static} "
554
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift_static/${library_subdir} "
555
- COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} " )
556
- endif ()
557
- else ()
558
- swift_install_in_component (FILES ${module_outputs}
559
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
536
+ swift_install_in_component (DIRECTORY "${specific_module_dir} "
537
+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
538
+ COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} " )
539
+ if (SWIFTFILE_STATIC )
540
+ swift_install_in_component (DIRECTORY "${specific_module_dir_static} "
541
+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift_static/${library_subdir} "
560
542
COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} " )
561
- if (SWIFTFILE_STATIC )
562
- swift_install_in_component (FILES ${module_outputs}
563
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift_static/${library_subdir} "
564
- COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} " )
565
- endif ()
566
543
endif ()
567
544
568
545
# macCatalyst zippered module setup
@@ -618,29 +595,18 @@ function(_compile_swift_files
618
595
list (APPEND module_outputs_static "${interface_file_static} " )
619
596
endif ()
620
597
621
- if (SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS )
622
- swift_install_in_component (DIRECTORY "${specific_module_dir} "
623
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
598
+ swift_install_in_component (DIRECTORY "${specific_module_dir} "
599
+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
600
+ COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} "
601
+ OPTIONAL
602
+ PATTERN "Project" EXCLUDE )
603
+
604
+ if (SWIFTFILE_STATIC )
605
+ swift_install_in_component (DIRECTORY "${specific_module_dir_static} "
606
+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift_static/${library_subdir} "
624
607
COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} "
625
608
OPTIONAL
626
609
PATTERN "Project" EXCLUDE )
627
-
628
- if (SWIFTFILE_STATIC )
629
- swift_install_in_component (DIRECTORY "${specific_module_dir_static} "
630
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift_static/${library_subdir} "
631
- COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} "
632
- OPTIONAL
633
- PATTERN "Project" EXCLUDE )
634
- endif ()
635
- else ()
636
- swift_install_in_component (FILES ${module_outputs}
637
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift/${library_subdir} "
638
- COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} " )
639
- if (SWIFTFILE_STATIC )
640
- swift_install_in_component (FILES ${module_outputs}
641
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /swift_static/${library_subdir} "
642
- COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT} " )
643
- endif ()
644
610
endif ()
645
611
646
612
set (line_directive_tool "${SWIFT_SOURCE_DIR} /utils/line-directive" )
0 commit comments