[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-30 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 closed https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-23 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: > export-dynamic In that case, we have got to change `-exxx` to `-e xxx`, and `-export-dynamic` to `-rdynamic`. LGTM, and it follows GCC's official documented spec : ) https://github.com/llvm/llvm-project/pull/72781 ___

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-22 Thread Fangrui Song via cfe-commits
MaskRay wrote: GCC compatibility certainly matters a lot, but I feel that some of my previous points are ignored. My previous replies asked us to focus on other respects (a) whether the behavior makes sense or makes things more error-prone (b) whether not supporting it causes us trouble (c)

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-21 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: > > > > @MaskRay the reason for adding this option is that gcc supports it. > > > > please refer to > > > > [godbolt.org/z/54sE6zTa1](https://godbolt.org/z/54sE6zTa1) > > > > > > > > > This doesn't answer my question. GCC has a lot of options that Clang > > > doesn't

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > > @MaskRay the reason for adding this option is that gcc supports it. > > > please refer to [godbolt.org/z/54sE6zTa1](https://godbolt.org/z/54sE6zTa1) > > > > > > This doesn't answer my question. GCC has a lot of options that Clang > > doesn't support. An option supported

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-20 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: > > @MaskRay the reason for adding this option is that gcc supports it. please > > refer to [godbolt.org/z/54sE6zTa1](https://godbolt.org/z/54sE6zTa1) > > This doesn't answer my question. GCC has a lot of options that Clang doesn't > support. An option supported by GCC

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-20 Thread Brad Smith via cfe-commits
brad0 wrote: I have never seen such usage before. You're supposed to use ```-rdynamic```. https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay the reason for adding this option is that gcc supports it. please > refer to [godbolt.org/z/54sE6zTa1](https://godbolt.org/z/54sE6zTa1) This doesn't answer my question. GCC has a lot of options that Clang doesn't support. An option supported by GCC does not mean that

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: @MaskRay the reason for adding this option is that gcc supports it. please refer to https://godbolt.org/z/54sE6zTa1 https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 reopened https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
dongjianqiang2 wrote: > GCC's default spec file for Linux does not say how `-export-dynamic` > translates to ld `-export-dynamic`. > > I think ld `--export-dynamic` is exclusively caused by `-Wl,--export-dynamic` > or `-rdynamic`. Do you have any example of `gcc -export-dynamic` uses? > > >

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 closed https://github.com/llvm/llvm-project/pull/72781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: GCC's default spec file for Linux does not say how `-export-dynamic` translates to ld `-export-dynamic`. I think ld `--export-dynamic` is exclusively caused by `-Wl,--export-dynamic` or `-rdynamic`. Do you have any example of `gcc -export-dynamic` uses? We probably should just

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: dong jianqiang (dongjianqiang2) Changes clang splits -export-dynamic into "-e" and "xport-dynamic", and gets ld warning: cannot find entry symbol xport-dynamic; defaulting to , which is unexpected

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-18 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 created https://github.com/llvm/llvm-project/pull/72781 clang splits -export-dynamic into "-e" and "xport-dynamic", and gets ld warning: cannot find entry symbol xport-dynamic; defaulting to , which is unexpected from user. Adjust the driver to support