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

add_cuflags 指定的参数在 devlink 阶段未生效 #4792

Closed
TOMO-CAT opened this issue Mar 4, 2024 · 3 comments
Closed

add_cuflags 指定的参数在 devlink 阶段未生效 #4792

TOMO-CAT opened this issue Mar 4, 2024 · 3 comments
Labels

Comments

@TOMO-CAT
Copy link

TOMO-CAT commented Mar 4, 2024

Xmake 版本

xmake v2.8.5

操作系统版本和架构

Linux 720ce3a659a2 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

描述问题

背景是我编译出来了部分 cuda 静态库,然后需要整合其他 cc 文件导出一个动态库。我设置了 add_cuflags("-Xcompiler -fPIC", {force = true}) ,但是在链接阶段提示:

image

检查了编译命令发现在 devlink 的时候没有 -fPIC:

image

通过 add_cuflags 的参数在编译 cu.o 文件时生效,但是在 devlink 阶段未传入。

期待的结果

期望能链接出来一个动态库。它包含了部分 cuda 静态库以及其他的 cc 文件。

工程配置

附加信息和错误日志

@TOMO-CAT TOMO-CAT added the bug label Mar 4, 2024
@Issues-translate-bot
Copy link

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


Title: add_cuflags do not take effect in the devlink stage.

@TOMO-CAT
Copy link
Author

TOMO-CAT commented Mar 4, 2024

用 add_culdflags 命令可以。

@TOMO-CAT TOMO-CAT closed this as completed Mar 4, 2024
@Issues-translate-bot
Copy link

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


Use the add_culdflags command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants