mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Replace Attr.def with a gyb file that reads from swift-syntax to automatically generate the attribute nodes. For now, only the Swift attributes have been migrated. SIL attributes can be defined manually in Attr.def.gyb. To add new Swift attributes, a paired pull request to swift-syntax is now necessary.
14 lines
431 B
CMake
14 lines
431 B
CMake
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
|
|
set(SWIFT_GYB_FLAGS --line-directive "^\"#line %(line)d \\\"%(file)s\\\"^\"")
|
|
else()
|
|
set(SWIFT_GYB_FLAGS --line-directive "\'#line" "%(line)d" "\"%(file)s\"\'")
|
|
endif()
|
|
|
|
set(generated_include_sources
|
|
Attr.def.gyb)
|
|
|
|
add_gyb_target(swift-ast-generated-headers
|
|
"${generated_include_sources}")
|
|
set_property(TARGET swift-ast-generated-headers
|
|
PROPERTY FOLDER "Miscellaneous")
|