Skip to content

Enable -reflection-metadata-for-debugger-only for the freestanding stdlib #41168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/cmake/modules/SwiftSource.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ function(_compile_swift_files
endif()

if(NOT SWIFT_ENABLE_REFLECTION)
list(APPEND swift_flags "-Xfrontend" "-disable-reflection-metadata")
list(APPEND swift_flags "-Xfrontend" "-reflection-metadata-for-debugger-only")
else()
list(APPEND swift_flags "-D" "SWIFT_ENABLE_REFLECTION")
endif()
Expand Down
3 changes: 3 additions & 0 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,9 @@ if run_vendor == 'apple':
if not config.swift_freestanding_is_darwin:
swift_execution_tests_extra_flags += ' -Xfrontend -disable-preallocated-instantiation-caches'

if not config.swift_freestanding_is_darwin:
swift_execution_tests_extra_flags += ' -Xfrontend -reflection-metadata-for-debugger-only'

# Build a resource dir for freestanding tests.
new_resource_dir = os.path.join(config.test_exec_root, "resource_dir")
if not os.path.exists(new_resource_dir): os.mkdir(new_resource_dir)
Expand Down