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

链接参数可否设置 #6

Open
Han40 opened this issue Jun 21, 2018 · 5 comments
Open

链接参数可否设置 #6

Han40 opened this issue Jun 21, 2018 · 5 comments

Comments

@Han40
Copy link

Han40 commented Jun 21, 2018

如何添加链接参数,比如,我希望生成map, 需要田间 -wl -Map这个链接 选项,不知道该工具可否实现,谢谢?

@skywind3000
Copy link
Owner

skywind3000 commented Jun 21, 2018

可以啊,如果是 -Wl 后面的子参数,请用 wl

wl: --abc

最终链接时会变成:

-Wl,--abc

如果是任意链接参数,请用 flnk

flnk: -abc

链接时会变成:

-abc

举例:

wl: --exclude-libs,ALL
wl: --version-script=AudioCC.map, --retain-symbols-file=AudioCC.map
flnk: incoming/mp3/lib/libmp3lame.win32.a

最终会展开成:

-Wl,--exclude-libs,ALL -Wl,--version-script=AudioCC.map -Wl,--retain-symbols-file=AudioCC.map incoming/mp3/lib/libmp3lame.win32.a

@Han40
Copy link
Author

Han40 commented Jun 25, 2018

谢谢,不知道是否有这样的设置:
需要编译的c文件太多,需要放到一个文件夹内,我只想设置一个文件夹作为编译入口,不希望罗列每个c文件

@skywind3000
Copy link
Owner

我记不得src后面是否可以加路径通配符了,你可以试试。我是每个文件都写的,ls -l复制下,vim里几个批处理就弄完了

@Han40
Copy link
Author

Han40 commented Jun 26, 2018

可以的,谢谢你! 看来得先好好读你的python代码,了解相关设置。
不过我这边使用的编译器时嵌入式编译器,tasking,hightec等编译器

import glob names = glob.glob(srcname)

@skywind3000
Copy link
Owner

编译器也可以设置,只要能接受gcc类似的参数即可

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

No branches or pull requests

2 participants