[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-10-16 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added inline comments. Comment at: lld/Common/ErrorHandler.cpp:78 } - _exit(val); + llvm::sys::Process::Exit(val); } rnk wrote: > This appears to have regressed shutdown. `sys::Process::Exit` calls `exit`, >

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-10-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lld/Common/ErrorHandler.cpp:78 } - _exit(val); + llvm::sys::Process::Exit(val); } This appears to have regressed shutdown. `sys::Process::Exit` calls `exit`, not `_exit`, so now atexit destructors are run. That's

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-29 Thread Axel Y. Rivera via Phabricator via cfe-commits
ayrivera added inline comments. Comment at: lld/ELF/Driver.cpp:895 const char *argv[] = {config->progName.data(), opt.data()}; + cl::ResetAllOptionOccurrences(); if (cl::ParseCommandLineOptions(2, argv, "", )) aganea wrote: > ayrivera wrote: > > MaskRay

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-28 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: lld/ELF/Driver.cpp:895 const char *argv[] = {config->progName.data(), opt.data()}; + cl::ResetAllOptionOccurrences(); if (cl::ParseCommandLineOptions(2, argv, "", )) ayrivera wrote: > MaskRay wrote: > > ayrivera

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-28 Thread Axel Y. Rivera via Phabricator via cfe-commits
ayrivera added inline comments. Comment at: lld/ELF/Driver.cpp:895 const char *argv[] = {config->progName.data(), opt.data()}; + cl::ResetAllOptionOccurrences(); if (cl::ParseCommandLineOptions(2, argv, "", )) MaskRay wrote: > ayrivera wrote: > > Hi, > >

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/Driver.cpp:895 const char *argv[] = {config->progName.data(), opt.data()}; + cl::ResetAllOptionOccurrences(); if (cl::ParseCommandLineOptions(2, argv, "", )) ayrivera wrote: > Hi, > > I built locally lld

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-28 Thread Axel Y. Rivera via Phabricator via cfe-commits
ayrivera added inline comments. Comment at: lld/ELF/Driver.cpp:895 const char *argv[] = {config->progName.data(), opt.data()}; + cl::ResetAllOptionOccurrences(); if (cl::ParseCommandLineOptions(2, argv, "", )) Hi, I built locally lld and came across an

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-24 Thread Alexandre Ganea 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 rGf2efb5742cc9: [LLD][COFF] Cover usage of LLD-as-a-library in tests (authored by aganea). Changed prior to commit:

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. Looks good to me, I didn't review very in depth, but I see the test case that we need. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-21 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth accepted this revision. amccarth added a comment. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @rnk @amccarth Do you have more comments? ☺️ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-02 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. @MaskRay Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Looks great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-02 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Ping! @MaskRay any further comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-08-26 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/tools/driver/driver.cpp:537 + // When running in integrated-cc1 mode, the CrashRecoveryContext returns + // the same code as if the program crashed. On Unix, that is codes >128. + IsCrash |= CommandRes > 128;

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-08-26 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 287952. aganea marked 2 inline comments as done. aganea added a comment. Address comments. Added a CrashRecoveryTest. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/driver/driver.cpp:537 + // When running in integrated-cc1 mode, the CrashRecoveryContext returns + // the same code as if the program crashed. On Unix, that is codes >128. + IsCrash |= CommandRes > 128;

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-08-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 287747. aganea marked an inline comment as done. aganea added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Rebase. Address @MaskRay's suggestions. Made `safeLldLink` a public API and made it possible to provide user-defined