File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ one detailed below.
106
106
flags to a linker for examples.
107
107
* [ ` cargo:rustc-link-arg-benches=FLAG ` ] ( #rustc-link-arg-benches ) – Passes custom
108
108
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
110
110
link.
111
111
* [ ` cargo:rustc-link-search=[KIND=]PATH ` ] ( #rustc-link-search ) — Adds to the
112
112
library search path.
@@ -153,12 +153,16 @@ to set a linker script or other linker options.
153
153
154
154
155
155
<a id =" rustc-link-lib " ></a >
156
- #### ` cargo:rustc-link-lib=[KIND=]NAME `
156
+ #### ` cargo:rustc-link-lib=LIB `
157
157
158
158
The ` rustc-link-lib ` instruction tells Cargo to link the given library using
159
159
the compiler's [ ` -l ` flag] [ option-link ] . This is typically used to link a
160
160
native library using [ FFI] .
161
161
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
+
162
166
The ` -l ` flag is only passed to the library target of the package, unless
163
167
there is no library target, in which case it is passed to all targets. This is
164
168
done because all other targets have an implicit dependency on the library
You can’t perform that action at this time.
0 commit comments