From 685f1e08ed28f55d9752559aad959c3eb223e883 Mon Sep 17 00:00:00 2001 From: chenhdc <138756137+chenhdc@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:20:51 +0800 Subject: [PATCH] build: sort files to make build reproducible (#153) --- capstone-sys/build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/capstone-sys/build.rs b/capstone-sys/build.rs index ef1ae715..01e9a0f5 100644 --- a/capstone-sys/build.rs +++ b/capstone-sys/build.rs @@ -108,7 +108,8 @@ fn build_capstone_cc() { for arch_dir in find_arch_dirs().into_iter() { files.append(&mut find_c_source_files(&arch_dir)); } - + // add sort for resloving build-unproducible + files.sort(); let use_static_crt = { let target_features = env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or_default(); target_features.split(',').any(|f| f == "crt-static")