[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D110128#3021876 , @thakis wrote: > Note that stage 2 fails, where we're supposed to use lld. So I think this is > probably some compiler-rt test config problem you need to sort out, and not a > fundamental problem with the pat

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Re-reverted for now in 6ece82e9006d16b7fba7660ce09b2c62ab8460fa . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D1101

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Note that stage 2 fails, where we're supposed to use lld. So I think this is probably some compiler-rt test config problem you need to sort out, and not a fundamental problem with the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks our packaging builders too: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8835201798501639249/+/u/package_clang/stdout?format=raw Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ ht

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D110128#3020468 , @nemanjai wrote: > In D110128#3018992 , @phosek wrote: > >> @MaskRay Do you think we should gate the use of this feature on >> `-fbinutils-version=` or `-fuse-ld=lld`?

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. In D110128#3018992 , @phosek wrote: > @MaskRay Do you think we should gate the use of this feature on > `-fbinutils-version=` or `-fuse-ld=lld`? It'd be nice if the owner of > `clang-ppc64le-rhel` builder could update the binut

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-24 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG03142c5f6778: [Driver] Correctly handle static C++ standard library (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D11012

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 374699. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D110128 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp clang/lib/Driver/ToolChains/Gnu.cpp clang/test/Driver/fuchsi

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:144 +} else { + CmdArgs.push_back("--as-needed"); +} as-needed needs push-state as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 374690. phosek marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D110128 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp clang/lib/Driver/Tool

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:581 + CmdArgs.push_back("--push-state"); + CmdArgs.push_back("--as-needed"); if (OnlyLibstdcxxStatic) MaskRay wrote: > The --as-needed change should be dropped from th

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @MaskRay Do you think we should gate the use of this feature on `-fbinutils-version=` or `-fuse-ld=lld`? It'd be nice if the owner of `clang-ppc64le-rhel` builder could update the binutils version but I'm not sure how feasible is it. Repository: rG LLVM Github Monore

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Looks like the linker used on `clang-ppc64le-rhel` bot doesn't support `--push-state`/`--pop-state`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D110128 __

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-23 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5e28c892d06f: [Driver] Correctly handle static C++ standard library (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D11012

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Please mention GNU ld 2.25 (2014) in the description. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D110128 ___ cfe-commits mailing list cfe-

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D110128 __

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 374154. phosek marked 5 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110128/new/ https://reviews.llvm.org/D110128 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp clang/lib/Driver/Tool

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/linux-ld.c:499 +// RUN: %clangxx -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \ +// RUN: -target x86_64-unknown-linux-gnu \ `-no-canonical-prefixes` is only useful when the CHECK lines inspe

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM. I looked at this in 2019 but did not change because GNU ld 2.25 (2014) introduced --push-state. (gold added it in 2016 but I think we can have higher version requirement for gold.) In 2021, binutils 2.24 (2013) compatibility should be irrelevant now...

[PATCH] D110128: [Driver] Correctly handle static C++ standard library

2021-09-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: MaskRay, mcgrathr. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When statically linking C++ standard library, we shouldn't add -Bdynamic after including the library on the link