This is an archive of the discontinued LLVM Phabricator instance.

ELF: Rename Configuration::Static to Bstatic. NFCI.
Needs ReviewPublic

Authored by pcc on Mar 13 2019, 2:52 PM.

Details

Summary

The name of this field is a little misleading, partly because it does not
match the name of its command line flag. Rename it to match.

Event Timeline

pcc created this revision.Mar 13 2019, 2:52 PM
Herald added a project: Restricted Project. · View Herald Transcript
ruiu added a comment.Mar 13 2019, 2:58 PM

Maybe we should also update the helptext of Bstatic? It currently says that "Do not link against shared libraries" which doesn't sound like it captures the exact meaning of the option.

Maybe we should also update the helptext of Bstatic? It currently says that "Do not link against shared libraries" which doesn't sound like it captures the exact meaning of the option.

"Do not search for dynamic libraries when linking"?

lld/ELF/Driver.cpp
227

Not sure if we might want to improve the error reporting here later too.
I guess it would not be clear to understand what is wrong in case of this error.

Maybe we should also update the helptext of Bstatic? It currently says that "Do not link against shared libraries" which doesn't sound like it captures the exact meaning of the option.

"Do not search for dynamic libraries when linking"?

Is it worth mentioning the positional behavior? "Do not search for shared libraries mentioned on the command line after the option"

Maybe we should also update the helptext of Bstatic? It currently says that "Do not link against shared libraries" which doesn't sound like it captures the exact meaning of the option.

"Do not search for dynamic libraries when linking"?

Is it worth mentioning the positional behavior? "Do not search for shared libraries mentioned on the command line after the option"

The default behavior can be restored with -Bdynamic, which makes the wording
"mentioned on the command line after the option" not so precise perhaps?
We do not mention the position for other positional options as far I can see too (like for -as-needed and -whole-archive).

For -whole-archive we have just:
"Force load of all members in a static library."

And then for -no-whole-archive:
"Restores the default behavior of loading archive members."

Maybe use words "disable/enable", i.e change the -Bstatic to
"Disable the lookup of dynamic libraries when linking".

and then -Bdynamic to something like
"Enable the lookup of dynamic libraries when linking (default)"?

Maybe we should also update the helptext of Bstatic? It currently says that "Do not link against shared libraries" which doesn't sound like it captures the exact meaning of the option.

"Do not search for dynamic libraries when linking"?

Is it worth mentioning the positional behavior? "Do not search for shared libraries mentioned on the command line after the option"

The default behavior can be restored with -Bdynamic, which makes the wording
"mentioned on the command line after the option" not so precise perhaps?
We do not mention the position for other positional options as far I can see too (like for -as-needed and -whole-archive).

For -whole-archive we have just:
"Force load of all members in a static library."

And then for -no-whole-archive:
"Restores the default behavior of loading archive members."

Maybe use words "disable/enable", i.e change the -Bstatic to
"Disable the lookup of dynamic libraries when linking".

and then -Bdynamic to something like
"Enable the lookup of dynamic libraries when linking (default)"?

SG

Regarding the description

The name of this field is a little misleading, partly because it does not match the name of its command line flag. Rename it to match.

Does not match the name of the compiler option -static?