File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ defaulted_option(SwiftCore_ENABLE_BACKDEPLOYMENT_SUPPORT "Add symbols for runtim
95
95
defaulted_option (SwiftCore_ENABLE_STDLIB_TRACING "Enable tracing in the runtime. Assumes the presence of os_log(3) and the os_signpost(3) API." )
96
96
option (SwiftCore_ENABLE_UNICODE_DATA "Include unicode data in Swift runtimes" ON )
97
97
option (SwiftCore_ENABLE_SHORT_MANGLING_LOOKUPS "Build with fast-path context descriptor lookups based on well-known short manglings." ON )
98
+ option (SwiftCore_ENABLE_FILESYSTEM_SUPPORT "Build for systems that have a filesystem" ON )
98
99
99
100
defaulted_option (SwiftCore_ENABLE_BACKTRACING "Enable backtracing runtime support" )
100
101
defaulted_set (SwiftCore_BACKTRACER_PATH STRING "Set a fixed path to the Swift backtracer" )
Original file line number Diff line number Diff line change @@ -72,6 +72,15 @@ if(SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER)
72
72
Leaks.mm )
73
73
endif ()
74
74
75
+ # runtime/Paths.cpp uses `SWIFT_ARCH` and `SWIFT_LIB_SUBDIR` to find the
76
+ # subdirectory under `libexec` in which to find the backtracer.
77
+ # Fail the configuration if it isn't set appropriately.
78
+ # TODO: In the future, we might consider moving the backtracer up to
79
+ # `libexec/swift` and drop the platform/architecture specific subdirectories
80
+ if (SwiftCore_ENABLE_FILESYSTEM_SUPPORT AND (NOT SwiftCore_ARCH_SUBDIR OR NOT SwiftCore_PLATFORM_SUBDIR ))
81
+ message (SEND_ERROR "Filesystem support requires setting `SwiftCore_ARCH_SUBDIR` and `SwiftCore_PLATFORM_SUBDIR`" )
82
+ endif ()
83
+
75
84
# TODO: Probably worth considering putting half of these in a RuntimeConfig.h.in
76
85
# file rather than pushing them through macro flags.
77
86
target_compile_definitions (swiftRuntime
@@ -86,7 +95,8 @@ target_compile_definitions(swiftRuntime
86
95
$< $< BOOL:${SwiftCore_ENABLE_STDLIB_TRACING} > :-DSWIFT_STDLIB_TRACING>
87
96
$< $< BOOL:${SwiftCore_ENABLE_SHORT_MANGLING_LOOKUPS} > :-DSWIFT_STDLIB_SHORT_MANGLING_LOOKUPS>
88
97
$< $< BOOL:${SwiftCore_HAS_DLADDR} > :-DSWIFT_STDLIB_HAS_DLADDR>
89
- $< $< BOOL:${SwiftCore_HAS_DLSYM} > :-DSWIFT_STDLIB_HAS_DLSYM> )
98
+ $< $< BOOL:${SwiftCore_HAS_DLSYM} > :-DSWIFT_STDLIB_HAS_DLSYM>
99
+ $< $< BOOL:${SwiftCore_ENABLE_FILESYSTEM_SUPPORT} > :-DSWIFT_STDLIB_HAS_FILESYSTEM$< SEMICOLON> -DSWIFT_ARCH="${SwiftCore_ARCH_SUBDIR} "$< SEMICOLON> -DSWIFT_LIB_SUBDIR="${SwiftCore_PLATFORM_SUBDIR} "> )
90
100
91
101
target_include_directories (swiftRuntime PRIVATE
92
102
"${PROJECT_BINARY_DIR} /include"
You can’t perform that action at this time.
0 commit comments