Skip to content

Commit 2bb60b2

Browse files
authored
Switch to link against dynamic library first (#95)
1 parent 7434597 commit 2bb60b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shaderc-sys/build/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn main() {
202202
None
203203
};
204204

205-
// Try to build with the static or dynamic library if a path was explicit set
205+
// Try to build with the dynamic or static library if a path was explicit set
206206
// or implicitly chosen.
207207
if let Some(search_dir) = search_dir {
208208
let search_dir_str = search_dir.to_string_lossy();
@@ -222,10 +222,10 @@ fn main() {
222222
let dylib_path = search_dir.join(dylib_name);
223223

224224
if let Some((lib_name, lib_kind)) = {
225-
if static_lib_path.exists() {
226-
Some((SHADERC_STATIC_LIB, "static"))
227-
} else if dylib_path.exists() {
225+
if dylib_path.exists() {
228226
Some((SHADERC_SHARED_LIB, "dylib"))
227+
} else if static_lib_path.exists() {
228+
Some((SHADERC_STATIC_LIB, "static"))
229229
} else {
230230
None
231231
}

0 commit comments

Comments
 (0)