Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmake添加runpath #5109

Closed
offscum opened this issue May 16, 2024 · 9 comments
Closed

xmake添加runpath #5109

offscum opened this issue May 16, 2024 · 9 comments

Comments

@offscum
Copy link

offscum commented May 16, 2024

Is your feature request related to a problem? Please describe.

通过add_rpathdirs添加只能根据编译器默认行为添加为rpath或runpath,如果想单独添加为rpath或runpath还需要通过add_ldflags开启-Wl,--enable-new-dtags或-Wl,--disable-new-dtags

Describe the solution you'd like

  1. 提供专门的接口。如add_rpathdirs跟add_runpathdirs
  2. 提供对应的参数。如add_rpathdirs('dir', {rpath=true})或add_rpathdirs('dir', {runpath=true})

Describe alternatives you've considered

No response

Additional context

No response

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: xmakeadd runpath

@kench1994
Copy link

Is your feature request related to a problem? Please describe.

通过add_rpathdirs添加只能根据编译器默认行为添加为rpath或runpath,如果想单独添加为rpath或runpath还需要通过add_ldflags开启-Wl,--enable-new-dtags或-Wl,--disable-new-dtags

Describe the solution you'd like

  1. 提供专门的接口。如add_rpathdirs跟add_runpathdirs
  2. 提供对应的参数。如add_rpathdirs('dir', {rpath=true})或add_rpathdirs('dir', {runpath=true})

Describe alternatives you've considered

No response

Additional context

No response

set_rundir ?
May this feature which has been supported?

@waruqi
Copy link
Member

waruqi commented May 16, 2024

不懂,不知道你在说啥

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I don’t understand, I don’t know what you are talking about

@offscum
Copy link
Author

offscum commented May 17, 2024

就是使用add_rpathdirs这个接口只能添加rpath,要添加为runpath只能再通过add_ldflags('-Wl,--enable-new-dtags')启用,希望能有个更优雅配置配置runpath的方法,比如添加个add_runpathdirs接口或者add_rpathdirs('xxx', {runpath=true})通过参数设置是rpath或是runpath

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


You can only add rpath using the add_rpathdirs interface. To add it as runpath, you can only enable it through add_ldflags('-Wl,--enable-new-dtags'). I hope there will be a more elegant way to configure runpath, such as adding a The add_runpathdirs interface or add_rpathdirs('xxx', {runpath=true}) sets rpath or runpath through parameters.

@offscum
Copy link
Author

offscum commented May 17, 2024

add_rpathdirs只会加上-Wl,-rpath=xxx选项,这个要看编译器自身的默认行为是添加为rpath或是runpath,这个不可控,最好是接口层面强制性控制,如果是rpath就添加-Wl,--disables-new-dtags,如果是runpath就添加-Wl,--enables-new-dtags

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


add_rpathdirs will only add the -Wl,-rpath=xxx option. This depends on the compiler's own default behavior of adding it as rpath or runpath. This is uncontrollable. It is best to use mandatory control at the interface level. If it is rpath, add - Wl,--disables-new-dtags, if it is runpath, add -Wl,--enables-new-dtags

waruqi added a commit that referenced this issue May 18, 2024
@waruqi
Copy link
Member

waruqi commented May 18, 2024

试试,xmake update -s dev

add_rpathdirs("...", {runpath = false})
add_rpathdirs("...", {runpath = true})

@waruqi waruqi added this to the v2.9.2 milestone May 18, 2024
@waruqi waruqi closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants