Skip to content

Commit cb374ce

Browse files
Fixed logic for collection of profiling binaries
Since addition of --save-temps=obj, a slew of host/device object files were added and llvm-cov can not work with some of them. Since binaries can actually be shared objects, use that instead. Process traces for libtensor and libsyclinterface shared objects
1 parent d4978fd commit cb374ce

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/gen_coverage.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,16 @@ def find_objects():
108108
objects = []
109109
for root, _, files in os.walk("_skbuild"):
110110
for file in files:
111-
if not file.endswith(".o"):
111+
if not file.endswith(".so"):
112112
continue
113113
if os.path.join("libsyclinterface", "tests") in root:
114114
continue
115-
if any(match in root for match in ["libsyclinterface"]):
115+
if any(
116+
match in root
117+
for match in [
118+
"libsyclinterface",
119+
]
120+
):
116121
objects.extend(["-object", os.path.join(root, file)])
117122
return objects
118123

0 commit comments

Comments
 (0)