You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now when Cargo passes -L flags to the compiler from the output of build scripts, the crate DAG is not preserved. For example, if crate A links against path pathA, crate B links against pathB, and B depends on A. Cargo will compile B like:
Instead it should pass pathB first and in general use a topological ordering to ensure that more relevant paths come first.
This was discovered by Servo where a native library was being picked up from /usr/lib even though it was properly compiled into the build directory. The /usr/lib version wouldn't link while the build directory one was the correct one to use.
The text was updated successfully, but these errors were encountered:
Cargo needs to ensure that if a build script prints a `-L` path that it's the
first `-L` path passed to the compiler. That way the build script can be sure
that any output it generated is the first to be considered by the compiler.
Closesrust-lang#2354
Cargo needs to ensure that if a build script prints a `-L` path that it's the
first `-L` path passed to the compiler. That way the build script can be sure
that any output it generated is the first to be considered by the compiler.
Closes#2354
Right now when Cargo passes
-L
flags to the compiler from the output of build scripts, the crate DAG is not preserved. For example, if crate A links against pathpathA
, crate B links againstpathB
, and B depends on A. Cargo will compile B like:Instead it should pass
pathB
first and in general use a topological ordering to ensure that more relevant paths come first.This was discovered by Servo where a native library was being picked up from /usr/lib even though it was properly compiled into the build directory. The /usr/lib version wouldn't link while the build directory one was the correct one to use.
The text was updated successfully, but these errors were encountered: