File tree Expand file tree Collapse file tree 2 files changed +22
-29
lines changed Expand file tree Collapse file tree 2 files changed +22
-29
lines changed Original file line number Diff line number Diff line change 1
1
add_subdirectory (swift )
2
-
3
-
4
- # Create a library that depends on all headers defined in include/swift/module.modulemap
5
- #
6
- # TODO: generate this dynamically through the modulemap; this cannot use `sed`
7
- # as that is not available on all platforms (e.g. Windows).
8
- file (GENERATE
9
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR} /HeaderDependencies.cpp"
10
- CONTENT "
11
- #define COMPILED_WITH_SWIFT
12
- #define SWIFT_TARGET
13
-
14
- #include \" swift/Basic/BasicBridging.h\"
15
- #include \" swift/AST/ASTBridging.h\"
16
- #include \" swift/IDE/IDEBridging.h\"
17
- #include \" swift/Parse/ParseBridging.h\"
18
- #include \" swift/SIL/SILBridging.h\"
19
- #include \" swift/SILOptimizer/OptimizerBridging.h\"
20
- " )
21
- add_library (importedHeaderDependencies "${CMAKE_CURRENT_BINARY_DIR} /HeaderDependencies.cpp" )
22
-
23
- # When building unified, we need to make sure all the Clang headers are
24
- # generated before we try to use them.
25
- # When building Swift against an already compiled LLVM/Clang, like
26
- # build-script does, this target does not exist, but the headers
27
- # are already completely generated at that point.
28
- if (TARGET clang-tablegen-targets )
29
- add_dependencies (importedHeaderDependencies clang-tablegen-targets )
30
- endif ()
Original file line number Diff line number Diff line change @@ -76,6 +76,28 @@ if (SWIFT_BUILD_SWIFT_SYNTAX)
76
76
EXPORT_LINK_INTERFACE_LIBRARIES )
77
77
endif ()
78
78
79
+ # Create a library that depends on all tool headers defined in include/module.modulemap
80
+ #
81
+ # TODO: generate this dynamically through the modulemap; this cannot use `sed`
82
+ # as that is not available on all platforms (e.g. Windows).
83
+ file (GENERATE
84
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR} /HeaderDependencies.cpp"
85
+ CONTENT "
86
+ #define COMPILED_WITH_SWIFT
87
+ #define SWIFT_TARGET
88
+
89
+ #include \" swift/Basic/BasicBridging.h\"
90
+ #include \" swift/AST/ASTBridging.h\"
91
+ #include \" swift/IDE/IDEBridging.h\"
92
+ #include \" swift/Parse/ParseBridging.h\"
93
+ #include \" swift/SIL/SILBridging.h\"
94
+ #include \" swift/SILOptimizer/OptimizerBridging.h\"
95
+ " )
96
+ add_library (importedHeaderDependencies "${CMAKE_CURRENT_BINARY_DIR} /HeaderDependencies.cpp" )
97
+ # Respect LLVM_COMMON_DEPENDS as well as `add_swift_X` does to ensure
98
+ # all prerequisites like TableGen'ed headers are generated before.
99
+ add_dependencies (importedHeaderDependencies ${LLVM_COMMON_DEPENDS} )
100
+
79
101
add_subdirectory (APIDigester )
80
102
add_subdirectory (AST )
81
103
add_subdirectory (ASTGen )
You can’t perform that action at this time.
0 commit comments