Skip to content

benchmark: Build drivers with N_AST symtab entries (for debugging) #30777

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 1 commit into from
Apr 2, 2020

Conversation

vedantk
Copy link
Contributor

@vedantk vedantk commented Apr 2, 2020

On Darwin, we pass the *.swiftmodule paths transitively referenced by
the driver executable to ld64. ld64 inserts N_AST references to these
modules into the program, for later use by lldb.

This change should let us exercise much more lldb functionality via
stepper testing.

On Darwin, we pass the *.swiftmodule paths transitively referenced by
the driver executable to ld64. ld64 inserts N_AST references to these
modules into the program, for later use by lldb.

This change should let us exercise much more lldb functionality via
`stepper` testing.
@vedantk
Copy link
Contributor Author

vedantk commented Apr 2, 2020

@swift-ci smoke test

1 similar comment
@vedantk
Copy link
Contributor Author

vedantk commented Apr 2, 2020

@swift-ci smoke test

Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me with my very limited CMake knowledge. I assume there is no more general build-swift-source rule that this could be integrated into?

Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me with my very limited CMake knowledge. I assume there is no more general build-swift-source rule that this could be integrated into?

Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to do this absolutely correct, for Linux you'd need to invoke swiftc -modulewrap foo.swiftmodule -o foo.swiftmodule.o and add foo.swiftmodule.o to the linker inputs.

I assume there is no more general swift build rule that this could be added to?

@adrian-prantl
Copy link
Contributor

Looks like I triple-posted. Github had a hickup :-)

@vedantk
Copy link
Contributor Author

vedantk commented Apr 2, 2020

There's not a more general rule I can find for building swift modules. Thanks for explaining how to do this on Linux, I'll try to revisit that as a follow up.

@vedantk vedantk merged commit 829f258 into swiftlang:master Apr 2, 2020
@vedantk vedantk deleted the benchmark_add_nasts branch April 2, 2020 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants