-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for -fcoverage-mapping support #24160
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
Add support for -fcoverage-mapping support #24160
Conversation
This is enought make it work up until llvm-cov tries to read the named data sections in the binary and can't find them. For this final part to work we probably need to switch the object format to using multiple code and data sections: WebAssembly/tool-conventions#138 Not sure if its worth submitting this part in isolation without a fully working solution? See emscripten-core#13046
# Conflicts: # emcc.py # tests/test_core.py # tools/shared.py # tools/system_libs.py
f1a383d
to
10bbd61
Compare
# Conflicts: # test/test_core.py
…emscripten into arsnyder16-fcoverage
7c189ff
to
56a1d3a
Compare
…emscripten into arsnyder16-fcoverage
@sbc100 I think this is ready, not sure why some of the test failures, seems unrelated. |
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.
Great! Thanks for working on this.
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.
Can you add this to the ChangeLog?
Added. Let me know if there is anything else i should specifically call out |
Just to confirm, the new files are taken from the emscripten-libs-20 branch in llvm? |
Correct, i used |
It looks like without this the fallback functions are not actually thread safe: https://github.com/llvm/llvm-project/blob/63b80dd01dafc92104ee43e4f0f5296d644c25ec/compiler-rt/lib/profile/InstrProfilingUtil.c#L102-L119 Followup to #24160
Main introduction is porting
llvm-project/compiler_rt/lib/profile
into system/lib/compiler_rt/lib/profile
Related
#13072
llvm/llvm-project#111332
No modifications were required for what was ported. llvm-cov worked fine for me with simple project.
-g
is required to produce a properly instrumented binaryerror: failed to load coverage: 'my.wasm': no coverage data found