diff --git a/src/compiler/c.rs b/src/compiler/c.rs index 2badc6f714..e05c0c6a3a 100644 --- a/src/compiler/c.rs +++ b/src/compiler/c.rs @@ -270,10 +270,13 @@ where .read_dir() .ok() .map(|f| { - f.flatten() + let mut device_libs = f + .flatten() .filter(|f| f.path().extension().map_or(false, |ext| ext == "bc")) .map(|f| f.path()) - .collect() + .collect::>(); + device_libs.sort_unstable(); + device_libs }) .unwrap_or_default() }