-
Notifications
You must be signed in to change notification settings - Fork 353
[libclang] Add API to generate a reproducer for the explicitly-built modules. #10577
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
[libclang] Add API to generate a reproducer for the explicitly-built modules. #10577
Conversation
|
Right now I'd like to get a high-level opinion if such an approach for reproducers is reasonable. This feature will have more commits, to get an idea of how it is supposed to look like you can check users/vsapsai/reproducer-explicitly-built-modules branch. |
|
An example of API usage is in swiftlang/swift-build#455 |
|
By the way, this doesn't work as a reproducer for dependency scanning, I'm just capturing the scanning results. My hope that with including the original command [used for scanning] and with the captured files you can still do something like After landing the proposed level of reproducing we can think how to support scan-deps better. I was considering an alternative of invoking clang-scan-deps from the shell script and building modules based on the scanning results. But I've decided that embedding a little build system in a shell script is too much complexity and not justified at this stage. Maybe we'll see a need for something like that, then we can bite the bullet and add the required complexity. |
|
I had an idea of adding |
5185b66 to
dd4cc19
Compare
|
Ping. |
|
I'd like the API changes from users/vsapsai/reproducer-explicitly-built-modules (and the addition of |
dd4cc19 to
9977985
Compare
9977985 to
d440bf1
Compare
|
Added |
jansvoboda11
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but let's see if @Bigcheese or @benlangmuir have any objections.
benlangmuir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have an entry point in clang-scan-deps? It's unusual to have something in CDependencies that doesn't have an equivalent clang-scan-deps command-line interface, though it's not strictly necessary
I agree it is a good idea. But when I've started working on it, I've realized that for the proper API I need a build system ready to use it. And I don't have such a build system. I'm not strongly against it but I'd rather avoid developing functionality nobody uses. |
d440bf1 to
fc7ae9f
Compare
fc7ae9f to
16c3302
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to copy the strings/arrays so that their lifetime is maintained by the options object.
…modules. (#10577) Capturing a single `-cc1` command to reproduce a bug with the explicitly-built modules isn't sufficient, we need to know what .pcm files were built and how. rdar://59743925
Tools using the reproducers can specify a custom location to support scenarios similar to those covered by `-fcrash-diagnostics-dir` and `CLANG_CRASH_DIAGNOSTICS_DIR`.
16c3302 to
415fb27
Compare
…modules. (#10577) Capturing a single `-cc1` command to reproduce a bug with the explicitly-built modules isn't sufficient, we need to know what .pcm files were built and how. rdar://59743925
Capturing a single
-cc1command to reproduce a bug with the explicitly-built modules isn't sufficient, we need to know what .pcm files were built and how.rdar://59743925