Page MenuHomePhabricator

[Driver] Delete redundant -Bdynamic for libc++ on Fuchsia

Authored by MaskRay on Nov 5 2018, 9:13 AM.



The surrounding --push-state saves the "-Bdynamic" state across ld.bfd, gold and lld.
lld saves the least states, but the intersection of these linkers is --as-needed -Bdynamic --whole-archive

ld/ldlang.h: lang_input_statement_flags::dynamic
gold/options.h: Position_dependent_options::copy_from_options
lld/ELF/Driver.cpp: Stack.emplace_back(Config->AsNeeded, Config->Static, InWholeArchive);

Diff Detail

Event Timeline

MaskRay created this revision.Nov 5 2018, 9:13 AM

I'm unclear if you also want as-needed -lm or if you accept static -lm

mcgrathr requested changes to this revision.Nov 5 2018, 4:51 PM

This breaks the semantics we want. The -Bdynamic is there to apply to -lm, which is also what --as-needed is there for in this case (it appears earlier because of the conditional logic, since in the other case it applies to -lc++ as well). It's correct as is.

This revision now requires changes to proceed.Nov 5 2018, 4:51 PM
MaskRay abandoned this revision.Nov 5 2018, 5:56 PM