Skip to content

Commit ac4487b

Browse files
committed
Sanitize commas in auto-split names
1 parent aa4b694 commit ac4487b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/split.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,8 @@ fn auto_unit_name(
14761476
length_limit: 20,
14771477
..Default::default()
14781478
})
1479-
// Also replace $ to avoid issues with build.ninja
1480-
.replace('$', "_");
1479+
// Also replace characters that break downstream tooling (build.ninja, linker, etc)
1480+
.replace(['$', ','], "_");
14811481
let mut unit_name = format!("auto_{}_{}", name, section_name.trim_start_matches('.'));
14821482
// Ensure the name is unique
14831483
if unit_exists(&unit_name, obj, new_splits) {

0 commit comments

Comments
 (0)