xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
10.12k stars 784 forks source link

add_linkorders对obj文件不生效 #5808

Open heheda123123 opened 2 days ago

heheda123123 commented 2 days ago

Xmake 版本

latest

操作系统版本和架构

windows 11

描述问题

https://github.com/xmake-io/xmake-repo/issues/5728 yy-thunks的obj文件需要在系统sdk前,但是add_linkorders设置后没有生效

期待的结果

正确处理链接顺序

工程配置

1

附加信息和错误日志

1

Issues-translate-bot commented 2 days ago

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


Title: add_linkorders does not take effect on obj files

waruqi commented 2 days ago

不支持 obj 调整,仅仅支持 links, frameworks

Issues-translate-bot commented 2 days ago

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


Does not support obj adjustment, only supports links, frameworks

heheda123123 commented 2 days ago

不支持 obj 调整,仅仅支持 links, frameworks

那对于yy-thunks这种库怎么处理呢,他需要在系统sdk之前链接。类似的还有mimalloc,如果以obj形式使用也是有类似的要求

Issues-translate-bot commented 2 days ago

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


Does not support obj adjustment, only supports links, frameworks

So what to do with libraries like yy-thunks? They need to be linked before the system sdk. Similar to mimalloc, if it is used in obj form, it has similar requirements.

star-hengxing commented 2 days ago

目前只能改成插入到所有 obj 前面。

"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX64\\x64\\link.exe"
-nologo
-dynamicbase
-nxcompat
-machine:x64
-libpath:build\windows\x64\release
/opt:ref /opt:icf test.lib
-out:build\windows\x64\release\main.exe
C:\Users\star\AppData\Local\.xmake\packages\y\yy-thunks\1.1.4\42bb6afb7f7e48c0b8936f79c209042d\lib\YY_Thunks_for_WinXP.obj
build\.objs\main\windows\x64\release\src\main.c.obj