[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-22 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D141824#4289752 , @argentite wrote: > I made patch with both precompiled library and without cstdio. D148992 > > > @dyung We can also enable this now on PS4/5 if you are interested. Sure.

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-22 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added a comment. I made patch with both precompiled library and without cstdio. D148992 @dyung We can also enable this now on PS4/5 if you are interested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-21 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. Hi, I have just got the time to come back to https://reviews.llvm.org/D147823, but I wanna check here first if you guys have any fix in flight? In addition to the linking issue, we also encountered the "cstdio" not found issue as mentioned above. Repository: rG

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-18 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. In D141824#4274461 , @argentite wrote: > We should probably also address the lack of linker issue as well. Should we > go for a precompiled dynamic library file? There seems to be some "precedent" > of this in other tests.

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-17 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added a comment. We should probably also address the lack of linker issue as well. Should we go for a precompiled dynamic library file? There seems to be some "precedent" of this in other tests. Comment at: clang/test/Interpreter/dynamic-library.cpp:6 + +#include

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-17 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added inline comments. Comment at: clang/test/Interpreter/dynamic-library.cpp:6 + +#include + bcain wrote: > This test fails for me like below. > > > ``` > FAIL: Clang :: Interpreter/dynamic-library.cpp (1 of 17751) > TEST

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-17 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. Can you depend on `cstdio` in an LLVM toolchain test case like this? `clang` doesn't install `cstdio` -- does it? This is a c or c++ library file, so I think it should be out of scope for a clang test, right? AFAICT no other clang test uses this header file.

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-07 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. I've put up https://reviews.llvm.org/D147823. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141824/new/ https://reviews.llvm.org/D141824 ___ cfe-commits mailing list

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-06 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. In D141824#4250011 , @sgraenitz wrote: > In D141824#4247891 , @zhuhan0 wrote: > >> This seems to be the first clang test that involves actual linking. > > Interesting, I think we all

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-06 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. In D141824#4247891 , @zhuhan0 wrote: > This seems to be the first clang test that involves actual linking. Interesting, I think we all didn't have this on our radars. > If the intention is to test loading a dynamic library,

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-04-06 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added subscribers: ayermolo, zhuhan0. zhuhan0 added a comment. Hi @argentite, we build llvm in a custom distro which is missing some C startup code, and this fails with errors like: /abc/bin/ld: cannot find crti.o: No such file or directory /abc/bin/ld: cannot find crtbeginS.o: No

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-29 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D141824#4231374 , @probinson wrote: > In D141824#4231372 , @probinson > wrote: > >> In D141824#4229953 , @argentite >> wrote: >> >>> Just to

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-29 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D141824#4231372 , @probinson wrote: > In D141824#4229953 , @argentite > wrote: > >> Just to confirm, `UNSUPPORTED: target=x86_64-scei-ps4` should be enough, >> right? > >

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-29 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D141824#4229953 , @argentite wrote: > Just to confirm, `UNSUPPORTED: target=x86_64-scei-ps4` should be enough, > right? `UNSUPPORTED: target={{.*-(ps4|ps5)}}` please. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-29 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added a comment. Just to confirm, `UNSUPPORTED: target=x86_64-scei-ps4` should be enough, right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141824/new/ https://reviews.llvm.org/D141824 ___

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-29 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D141824#4229693 , @argentite wrote: > Hi, @dyung ! It seems the dynamic library generation is failing from the lack > of a linker. We need a test library to load at runtime in clang-repl. Do you > have any idea how we can

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-29 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added a comment. Hi, @dyung ! It seems the dynamic library generation is failing from the lack of a linker. We need a test library to load at runtime in clang-repl. Do you have any idea how we can create one without a linker? Otherwise we can disable the test on PS4 as it is probably

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-29 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. Hi @argentite, the test you added is failing on the PS4 linux builder because the test seems to require linking and the PS4 target requires an external linker which is not present on the system. Can the test be rewritten to not require linking?

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-28 Thread Anubhab Ghosh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd978730d8e2c: [clang-repl] Add a command to load dynamic libraries (authored by argentite). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141824/new/

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-28 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141824/new/ https://reviews.llvm.org/D141824 ___ cfe-commits mailing list

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-28 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz accepted this revision. sgraenitz added a comment. This revision is now accepted and ready to land. Thanks! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141824/new/ https://reviews.llvm.org/D141824

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-28 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added inline comments. Comment at: clang/test/Interpreter/dynamic-library.cpp:1 +// RUN: head -n 7 %s | %clang -xc++ -o %T/libdynamic-library-test.so -fPIC -shared - +int ultimate_answer = 0; v.g.vassilev wrote: > sgraenitz wrote: > > The use of

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-28 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite updated this revision to Diff 508971. argentite marked an inline comment as done. argentite added a comment. Changed test to use a separate Input file for the dynamic library generation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Thanks for working on this, looks like we are heading in a good direction! Comment at: clang/test/Interpreter/dynamic-library.cpp:1 +// RUN: head -n 7 %s | %clang -xc++ -o %T/libdynamic-library-test.so -fPIC -shared - +int ultimate_answer = 0;

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-23 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. Thanks for the update Comment at: clang/test/Interpreter/dynamic-library.cpp:1 +// RUN: head -n 7 %s | %clang -xc++ -o %T/libdynamic-library-test.so -fPIC -shared - +int ultimate_answer = 0; The use of `head` and `tail` here is a

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-03-21 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite updated this revision to Diff 507046. argentite marked 3 inline comments as done. argentite edited the summary of this revision. argentite added a comment. Added a simple test and removed the automatic OS specific library filenames Full name/path of the library must be provided. This

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-01-24 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added inline comments. Comment at: clang/lib/Interpreter/Interpreter.cpp:223 +llvm::Error Interpreter::CreateExecutor() { + const clang::TargetInfo = argentite wrote: > sgraenitz wrote: > > Factoring out this function looks like an independent

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-01-23 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:62 const CompilerInstance *getCompilerInstance() const; - const llvm::orc::LLJIT *getExecutionEngine() const; + llvm::Expected GetExecutionEngine(); + sgraenitz

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-01-23 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. Thanks for working on this! It looks like this is going to be the clang-repl equivalent for Cling's `.L` command. Do you think we can get test coverage for it? So far, the only tests I found for `libclangInterpreter` are unit tests in

[PATCH] D141824: [clang-repl] Add a command to load dynamic libraries

2023-01-16 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite created this revision. Herald added a project: All. argentite added reviewers: v.g.vassilev, lhames, sgraenitz. argentite published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. This commit adds the %lib command to load a dynamic