Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
acid1103 committed Nov 24, 2023
1 parent a102a81 commit 546274c
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -94,9 +94,11 @@ are passed through to shaderc-sys when building shaderc-rs:
1. Building from source, if the native shaderc library is not found via the
above steps.

For each library directory, the build script will try to fine and link to the
For each library directory, the build script will try to find and link to the
dynamic native shaderc library `shaderc_shared` first and the static native
shaderc library `shaderc_combined` next.
shaderc library `shaderc_combined` next. To prefer searching for the static
library first and the dynamic library next, the option
`--features prefer-static-linking` may be used.

Building from Source
--------------------
3 changes: 3 additions & 0 deletions shaderc-sys/build/build.rs
Original file line number Diff line number Diff line change
@@ -281,8 +281,11 @@ fn main() {
static_lib_path.exists(),
config_prefer_static_linking,
) {
// if dylib not exist OR prefer static lib and static lib exist, static.
(false, true, _) | (_, true, true) => Some((SHADERC_STATIC_LIB, "static")),
// otherwise, if dylib exist, dynamic
(true, _, _) => Some((SHADERC_SHARED_LIB, "dylib")),
// neither dylib nor static lib exist
_ => None,
}
} {

0 comments on commit 546274c

Please sign in to comment.