Skip to content

Commit cafd293

Browse files
authored
Merge pull request #34697 from bnbarham/add-feature-file
Add features file describing new available flags
2 parents b72b0c3 + d57d9fd commit cafd293

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

lib/Option/CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,28 @@ add_dependencies(swiftOption
66
target_link_libraries(swiftOption PRIVATE
77
swiftBasic)
88

9+
set(features_file_src "${CMAKE_CURRENT_SOURCE_DIR}/features.json")
10+
set(features_file_dest "${CMAKE_BINARY_DIR}/share/swift/features.json")
11+
12+
add_custom_command(
13+
OUTPUT
14+
${features_file_dest}
15+
COMMAND
16+
${CMAKE_COMMAND} -E copy ${features_file_src} ${features_file_dest}
17+
DEPENDS
18+
${features_file_src}
19+
)
20+
21+
add_custom_target(swift-features-file DEPENDS ${features_file_dest})
22+
23+
add_dependencies(swiftOption swift-features-file)
24+
25+
swift_install_in_component(
26+
FILES
27+
${features_file_dest}
28+
DESTINATION
29+
"share/swift"
30+
COMPONENT
31+
compiler
32+
)
33+

lib/Option/features.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"features": [
3+
{
4+
"name": "experimental-skip-all-function-bodies"
5+
},
6+
{
7+
"name": "experimental-allow-module-with-compiler-errors"
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)