Skip to content

Commit d18842d

Browse files
Added commended out use of -save-temps=obj
Whenever C++ source code contains device code, DPC++ would perform two compilation passes (for host and for device portions) and combine these two into fat object file. In the process of doing this it generates temporary integration headers. So functions from these headers get instrumented and .lcov file would contain references to deleted header files, in the form of /tmp/dpctl_sycl_queue_integrface-header-hex.h Added -save-temps instructs DPC++ to keep all the temporaries around and makes these headers available for llvm-profdata and llvm-cov to use. The side-effect of using -save-temps=obj is that preprocessor output files are also kept around and referenced by instrumentation tools. These files are very large. So much so that generated .json file can not be uploaded to coverall service. Therefore the -save-temps=obj is commented out. May still be useful for manual profile collection. References to deleted header files are still present (and wreck llvm-lcov calls), but that can be addressed using llvm-cov option to ignore certain files (like /tmp/dpctl_*.h)
1 parent 30374a6 commit d18842d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libsyclinterface/cmake/modules/SetupCoverage.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function(setup_coverage_generation)
1111
"-fprofile-instr-generate "
1212
"-fcoverage-mapping "
1313
"-fno-sycl-use-footer "
14+
# "-save-temps=obj "
1415
"-DDPCTL_COVERAGE "
1516
)
1617

0 commit comments

Comments
 (0)