File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ one detailed below.
106106 flags to a linker for examples.
107107* [ ` cargo:rustc-link-arg-benches=FLAG ` ] ( #rustc-link-arg-benches ) – Passes custom
108108 flags to a linker for benchmarks.
109- * [ ` cargo:rustc-link-lib=[KIND=]NAME ` ] ( #rustc-link-lib ) — Adds a library to
109+ * [ ` cargo:rustc-link-lib=LIB ` ] ( #rustc-link-lib ) — Adds a library to
110110 link.
111111* [ ` cargo:rustc-link-search=[KIND=]PATH ` ] ( #rustc-link-search ) — Adds to the
112112 library search path.
@@ -153,12 +153,16 @@ to set a linker script or other linker options.
153153
154154
155155<a id =" rustc-link-lib " ></a >
156- #### ` cargo:rustc-link-lib=[KIND=]NAME `
156+ #### ` cargo:rustc-link-lib=LIB `
157157
158158The ` rustc-link-lib ` instruction tells Cargo to link the given library using
159159the compiler's [ ` -l ` flag] [ option-link ] . This is typically used to link a
160160native library using [ FFI] .
161161
162+ The ` LIB ` string is passed directly to rustc, so it supports any syntax that
163+ ` -l ` does. \
164+ Currently the full supported syntax for ` LIB ` is ` [KIND[:MODIFIERS]=]NAME[:RENAME] ` .
165+
162166The ` -l ` flag is only passed to the library target of the package, unless
163167there is no library target, in which case it is passed to all targets. This is
164168done because all other targets have an implicit dependency on the library
You can’t perform that action at this time.
0 commit comments