File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,15 @@ Build scripts communicate with Cargo by printing to stdout. Cargo will
77
77
interpret each line that starts with ` cargo: ` as an instruction that will
78
78
influence compilation of the package. All other lines are ignored.
79
79
80
+ > Note: The order of ` cargo: ` instructions printed by the build script * may*
81
+ > affect the order of arguments that ` cargo ` passes to ` rustc ` . In turn, the
82
+ > order of arguments passed to ` rustc ` may affect the order of arguments passed
83
+ > to the linker. Therefore, you will want to pay attention to the order of the
84
+ > build script's instructions. For example, if object ` foo ` needs to link against
85
+ > library ` bar ` , you may want to make sure that library ` bar ` 's
86
+ > [ ` cargo:rustc-link-lib ` ] ( #rustc-link-lib ) instruction appears * after*
87
+ > instructions to link object ` foo ` .
88
+
80
89
The output of the script is hidden from the terminal during normal
81
90
compilation. If you would like to see the output directly in your terminal,
82
91
invoke Cargo as "very verbose" with the ` -vv ` flag. This only happens when the
You can’t perform that action at this time.
0 commit comments