File: CMakeLists.txt

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (62 lines) | stat: -rw-r--r-- 2,576 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
set(swiftOnoneSupport_common_options
  IS_STDLIB

  # This file should be listed the first.  Module name is inferred from the
  # filename.
  SwiftOnoneSupport.swift

  "${SWIFT_SOURCE_DIR}/stdlib/linker-support/magic-symbols-for-install-name.c"

  SWIFT_COMPILE_FLAGS "-parse-stdlib" "-Xllvm" "-sil-inline-generics=false" "-Xfrontend" "-validate-tbd-against-ir=none" "-Xfrontend" "-check-onone-completeness" "-Xfrontend" "-disable-access-control" "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}" "${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}"
  LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}")

if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING")

  set(swiftOnoneSupport_common_bootstrapping_options
    SHARED
    ${swiftOnoneSupport_common_options}
    SDK ${SWIFT_HOST_VARIANT_SDK}
    ARCHITECTURE ${SWIFT_HOST_VARIANT_ARCH}
    INSTALL_IN_COMPONENT
      "never_install")

  # Bootstrapping - stage 0

  add_swift_target_library_single(swiftSwiftOnoneSupport-bootstrapping0 swiftSwiftOnoneSupport
    ${swiftOnoneSupport_common_bootstrapping_options}
    FILE_DEPENDS swiftCore-bootstrapping0
    BOOTSTRAPPING 0)

  # Bootstrapping - stage 1

  add_swift_target_library_single(swiftSwiftOnoneSupport-bootstrapping1 swiftSwiftOnoneSupport
    ${swiftOnoneSupport_common_bootstrapping_options}
    FILE_DEPENDS swiftCore-bootstrapping1
    BOOTSTRAPPING 1)

endif()

add_swift_target_library(swiftSwiftOnoneSupport
  ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
  ${swiftOnoneSupport_common_options}
  MACCATALYST_BUILD_FLAVOR "zippered"
  INSTALL_IN_COMPONENT stdlib)

if(WINDOWS IN_LIST SWIFT_SDKS)
  # When building in Debug mode, the standard library provides the symbols that
  # we need and as such SwiftOnoneSupport does not need to provide any exported
  # interfaces.  This results in the import library being elided.  However,
  # we explicitly link against the SwiftOnoneSupport library when building
  # programs in Debug mode, and need the import library to be generated even if
  # nothing is exported.  Because we will still generate the DLL, create an
  # empty import library.
  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/swiftSwiftOnoneSupport.def
    "LIBRARY swiftSwiftOnoneSupport\n"
    "EXPORTS\n")
  foreach(architecture ${SWIFT_SDK_WINDOWS_ARCHITECTURES})
    target_sources(swiftSwiftOnoneSupport-windows-${architecture} PRIVATE
      ${CMAKE_CURRENT_BINARY_DIR}/swiftSwiftOnoneSupport.def)
    set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/swiftSwiftOnoneSupport.def
      PROPERTIES HEADER_FILE_ONLY TRUE)
  endforeach()
endif()