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
There is a discrepancy in how the -Bstatic switch (disable linking against shared libs) is treated by lld and GNU ld.
According to the GNU ld docs, the switch affects library searching for -l options which follow it. This means -Bstatic can be used multiple times in the command line to disable dynamic linking for particular -l options. For example:
Even though the GNU linker won't search for so-files for slib1, slib2 and slib3, so-file for dlib1 will still be considered as it is preceded by -Bdynamic.
Lld behaves differently.
-Bdynamic is not recognized at all, whereas -Bstatic applies static linkage on the output file level. The output file is considered static and it's no longer possible to link against any shared lib. Lld looks for static archives only if -Bstatic is met in the command line.
The text was updated successfully, but these errors were encountered:
Extended Description
There is a discrepancy in how the -Bstatic switch (disable linking against shared libs) is treated by lld and GNU ld.
According to the GNU ld docs, the switch affects library searching for -l options which follow it. This means -Bstatic can be used multiple times in the command line to disable dynamic linking for particular -l options. For example:
ld -Bstatic -lslib1 -lslib2 -Bdynamic -ldlib1 -Bstatic -lslib3...
Even though the GNU linker won't search for so-files for slib1, slib2 and slib3, so-file for dlib1 will still be considered as it is preceded by -Bdynamic.
Lld behaves differently.
-Bdynamic is not recognized at all, whereas -Bstatic applies static linkage on the output file level. The output file is considered static and it's no longer possible to link against any shared lib. Lld looks for static archives only if -Bstatic is met in the command line.
The text was updated successfully, but these errors were encountered: