-
-
Notifications
You must be signed in to change notification settings - Fork 367
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 libatomic_ops #4479
base: dev
Are you sure you want to change the base?
add libatomic_ops #4479
Conversation
add_urls("https://github.com/ivmai/libatomic_ops/releases/download/v$(version)/libatomic_ops-$(version).tar.gz", | ||
"https://github.com/ivmai/libatomic_ops.git") | ||
|
||
add_versions("7.8.2", "d305207fe207f2b3fb5cb4c019da12b44ce3fcbc593dfd5080d867b1a2419b51") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on_install(function (package) | ||
local configs = {} | ||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) | ||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing windows shared lib defines.
https://github.com/ivmai/libatomic_ops/blob/cc9bc49ae39fcfdf75efb971c74393a313d70491/src/atomic_ops.h#L260
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你可以把这个头文件拷贝下来看看,最终这个宏的值是什么,就知道为什么大部分包都要 package:add(defines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你是指给使用者加AO_API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake 里面的宏,xmake 不能自动获取,只能包维护者手动加上。
这里我们只需要在 Windows plat 和 shared 的情况下,add defines ao_api=__declspec(dllimport) 或 ao_dll,保证函数都被 __declspec(dllimport) 修饰
No description provided.