[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-05-04 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 abandoned this revision. zhuhan0 added a comment. Superseded by https://reviews.llvm.org/D148992. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147823/new/ https://reviews.llvm.org/D147823 ___

[PATCH] D148992: [clang-repl] Fix dynamic library test to avoid cstdio and linker

2023-04-24 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 accepted this revision. zhuhan0 added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148992/new/ https://reviews.llvm.org/D148992

[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] D148262: [clang][cmake] Add options to pass in vcs repo and revision info

2023-04-17 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. The patch failed a build bot which sets `LLVM_APPEND_VC_REV=OFF`. Fixed with https://reviews.llvm.org/rGee68f612ba682ddb911c5621e63df56039ec5824. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D148262: [clang][cmake] Add options to pass in vcs repo and revision info

2023-04-17 Thread Han Zhu 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 rG1f5e737fc135: [clang][cmake] Add options to pass in vcs repo and revision info (authored by zhuhan0). Repository: rG LLVM Github Monorepo

[PATCH] D148262: [clang][cmake] Add options to pass in vcs repo and revision info

2023-04-14 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 513753. zhuhan0 added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148262/new/ https://reviews.llvm.org/D148262 Files: clang/lib/Basic/CMakeLists.txt

[PATCH] D148262: [clang][cmake] Add options to pass in vcs repo and revision info

2023-04-14 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added inline comments. Comment at: llvm/cmake/modules/GenerateVersionFromVCS.cmake:50 +endif() +append_info(${name} "${${name}_SOURCE_DIR}" "" "") endif() drodriguez wrote: > I would recommend changing the flow a little bit: > > - Remove

[PATCH] D148262: [clang][cmake] Add options to pass in vcs repo and revision info

2023-04-14 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added inline comments. Comment at: llvm/cmake/modules/GenerateVersionFromVCS.cmake:23-25 +if(path) + get_source_info("${path}" revision repository) +endif() drodriguez wrote: > Nit: Looks like tabs were added? These are not tabs but spaces.

[PATCH] D148262: [clang][cmake] Add options to pass in vcs repo and revision info

2023-04-13 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 created this revision. Herald added subscribers: ekilmer, hoy, wenlei. Herald added a project: All. zhuhan0 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Clang may be built in an environment where Git is not

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-10 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. This doesn't work. The test would fail with error: libdynamic-library-test.so: ELF load command address/offset not properly aligned I first used obj2yaml to convert `libdynamic-library-test.so` to YAML, and then the test uses yaml2obj to convert it back. But it

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-10 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 512223. zhuhan0 added a comment. Remove .so file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147823/new/ https://reviews.llvm.org/D147823 Files: clang/test/Interpreter/Inputs/dynamic-library-test.cpp

[PATCH] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-10 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 51. zhuhan0 added a comment. Try with yaml2obj. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147823/new/ https://reviews.llvm.org/D147823 Files: clang/test/Interpreter/Inputs/dynamic-library-test.cpp

[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] D147823: [clang-repl] Reduce dynamic-library.cpp test to only load shared library

2023-04-07 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 created this revision. Herald added subscribers: hoy, wenlei. Herald added a project: All. zhuhan0 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Follow-up to the discussion in https://reviews.llvm.org/D141824. Because the purpose

[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 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] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-02-02 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. I verified this patch together with https://reviews.llvm.org/D116130 fix the issue https://github.com/llvm/llvm-project/issues/49689. I'm not an expert in this area. Could someone review this patch so we can move forward with the fix? Repository: rG LLVM Github

[PATCH] D81176: [HIP] Add default header and include path

2020-06-23 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. In D81176#2106382 , @yaxunl wrote: > In D81176#2105944 , @zhuhan0 wrote: > > > This broke a test `clang/test/Tooling/clang-check-offload.cpp` for a > > critical Linux distro at Facebook.

[PATCH] D81176: [HIP] Add default header and include path

2020-06-22 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. This broke a test `clang/test/Tooling/clang-check-offload.cpp` for a critical Linux distro at Facebook. With this change, the test adds a `-include __clang_hip_runtime_wrapper` argument. The wrapper includes some standard c++ headers, but our distro don't have those

[PATCH] D79059: Fix and re-submit D78534 - [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-05-06 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. @smeenai Yes please. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79059/new/ https://reviews.llvm.org/D79059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D79059: Fix and re-submit D78534 - [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-05-06 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 262506. zhuhan0 added a comment. Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79059/new/ https://reviews.llvm.org/D79059 Files: clang/cmake/modules/AddClang.cmake Index:

[PATCH] D79059: Fix and re-submit D78534 - [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-05-04 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 261866. zhuhan0 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79059/new/ https://reviews.llvm.org/D79059 Files: clang/cmake/modules/AddClang.cmake Index:

[PATCH] D78534: [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-28 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. Thanks @hans My bad. Didn't test this when LLVM_ENABLE_PIC=OFF. Submitted D79059 to better solve this problem. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78534/new/

[PATCH] D79059: Fix and re-submit D78534 - [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-28 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 260818. zhuhan0 edited the summary of this revision. zhuhan0 added a comment. Spacing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79059/new/ https://reviews.llvm.org/D79059 Files:

[PATCH] D79059: Fix and re-submit D78534 - [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-28 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 created this revision. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. zhuhan0 edited the summary of this revision. D78354 enabled installing PIC version of both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC is ON.

[PATCH] D78534: [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-27 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. @smeenai Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78534/new/ https://reviews.llvm.org/D78534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D78534: [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-27 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. @smeenai Yes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78534/new/ https://reviews.llvm.org/D78534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D78534: [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-26 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. Hello @beanz @phosek @smeenai any comment on this patch? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78534/new/ https://reviews.llvm.org/D78534 ___ cfe-commits mailing

[PATCH] D78534: [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-26 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 260205. zhuhan0 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78534/new/ https://reviews.llvm.org/D78534 Files: clang/cmake/modules/AddClang.cmake Index:

[PATCH] D78534: [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-21 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 updated this revision to Diff 259043. zhuhan0 added a comment. Spacing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78534/new/ https://reviews.llvm.org/D78534 Files: clang/cmake/modules/AddClang.cmake Index:

[PATCH] D78534: [libclang] Install both libclang.a and libclang.so when LIBCLANG_BUILD_STATIC=ON

2020-04-20 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 created this revision. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D78534 Files: clang/cmake/modules/AddClang.cmake Index: clang/cmake/modules/AddClang.cmake