Skip to content

[Linux] Enable frame pointers when building Swift libraries. #68988

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 3 commits into from
Oct 6, 2023

Conversation

al45tair
Copy link
Contributor

@al45tair al45tair commented Oct 5, 2023

Turn on frame pointers for the Swift runtime libraries. This makes backtraces that go through the runtimes more reliable without having to parse DWARF data.

rdar://116112040

Turn on frame pointers for the Swift runtime libraries.  This makes
backtraces that go through the runtimes more reliable without having
to parse DWARF data.

rdar://116112040
@al45tair al45tair added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Oct 5, 2023
@al45tair al45tair requested a review from a team as a code owner October 5, 2023 15:21
@al45tair
Copy link
Contributor Author

al45tair commented Oct 5, 2023

@swift-ci Please test

@al45tair
Copy link
Contributor Author

al45tair commented Oct 5, 2023

Explanation: Set -fno-omit-frame-pointer when building the Swift runtime libraries.
Original PR: #68986
Reviewed by: @mikeash
Resolves: rdar://116112040
Tests: Adds a test that checks that we get a decent backtrace when someone calls fatalError().

The test needs tweaking a little to work on Linux and macOS.

rdar://116112040
@al45tair
Copy link
Contributor Author

al45tair commented Oct 5, 2023

@swift-ci Please test

@shahmishal
Copy link
Member

lit.py: /home/build-user/llvm-project/llvm/utils/lit/lit/TestingConfig.py:138: fatal: unable to parse config file '/home/build-user/swift/test/lit.cfg', traceback: Traceback (most recent call last):
  File "/home/build-user/llvm-project/llvm/utils/lit/lit/TestingConfig.py", line 127, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "/home/build-user/swift/test/lit.cfg", line 585, in <module>
    config.substitutions.append( ('%swift-host-lib-dir', config.swift_host_lib_dir))
AttributeError: 'TestingConfig' object has no attribute 'swift_host_lib_dir'

@al45tair
Copy link
Contributor Author

al45tair commented Oct 5, 2023

That doesn't seem to be something I've changed.

@al45tair
Copy link
Contributor Author

al45tair commented Oct 5, 2023

Yeah, that's #68858. It deleted

config.swift_host_lib_dir = make_path(config.swift_lib_dir, 'swift', 'host')

but didn't remove

config.substitutions.append( ('%swift-host-lib-dir', config.swift_host_lib_dir))

Somehow swiftlang#68858 managed to remove `config.swift_host_lib_dir` without
removing the corresponding `config.substitutions.append`.  Fix.

rdar://116112040
@al45tair
Copy link
Contributor Author

al45tair commented Oct 5, 2023

@swift-ci Please test

@al45tair al45tair merged commit 23d30b8 into swiftlang:release/5.9.1 Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants