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

feat: add libvpx #2447

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft

feat: add libvpx #2447

wants to merge 4 commits into from

Conversation

DreamOfIce
Copy link
Contributor

WIP

@DreamOfIce
Copy link
Contributor Author

@waruqi 怎么检测CPU是否支持sse2、avx、avx2、neon等指令集?有没有内置的函数或者推荐的解决方案?

@Issues-translate-bot
Copy link

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


@waruqi How to detect whether the CPU supports sse2, avx, avx2, neon and other instruction sets? Is there a built-in function or a recommended solution?

@DreamOfIce
Copy link
Contributor Author

BTW,xmake支持ppc、longarch架构嘛?没有的话我就不写对应的rtcd支持了

@Issues-translate-bot
Copy link

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


BTW, does xmake support ppc and longarch architecture? If not, I will not write the corresponding rtcd support

@star-hengxing
Copy link
Contributor

@waruqi 怎么检测CPU是否支持sse2、avx、avx2、neon等指令集?有没有内置的函数或者推荐的解决方案?

内置 api 支持:
https://xmake.io/#/manual/project_target?id=targetadd_vectorexts

如果需要细粒度检测:
https://xmake.io/#/manual/helper_interfaces?id=detect-cc-code-snippets

@Issues-translate-bot
Copy link

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


@waruqi How to detect whether the CPU supports sse2, avx, avx2, neon and other instruction sets? Is there a built-in function or a recommended solution?

Built-in api support:
https://xmake.io/#/manual/project_target?id=targetadd_vectorexts

If fine-grained detection is required:
https://xmake.io/#/manual/helper_interfaces?id=detect-cc-code-snippets

@waruqi
Copy link
Member

waruqi commented Aug 17, 2023

BTW,xmake支持ppc、longarch架构嘛?没有的话我就不写对应的rtcd支持了

xmake 自身支持在 ppc longarch 上跑,具体编译arch 支持,得看包对编译器的支持

@Issues-translate-bot
Copy link

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


BTW, does xmake support ppc and longarch architectures? If not, I will not write the corresponding rtcd support

xmake itself supports running on ppc longarch, and the specific support for compiling arch depends on the package's support for the compiler

@waruqi
Copy link
Member

waruqi commented Aug 17, 2023

@waruqi 怎么检测CPU是否支持sse2、avx、avx2、neon等指令集?有没有内置的函数或者推荐的解决方案?

add_vectorexts

@Issues-translate-bot
Copy link

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


@waruqi How to detect whether the CPU supports sse2, avx, avx2, neon and other instruction sets? Is there a built-in function or a recommended solution?

add_vectorexts

@DreamOfIce
Copy link
Contributor Author

@waruqi 怎么检测CPU是否支持sse2、avx、avx2、neon等指令集?有没有内置的函数或者推荐的解决方案?

add_vectorexts

能拿到结果嘛?libvpx要根据支持情况生成头文件

@Issues-translate-bot
Copy link

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


@waruqi How to detect whether the CPU supports sse2, avx, avx2, neon and other instruction sets? Is there a built-in function or a recommended solution?

add_vectorexts

Can I get the result? libvpx needs to generate header files based on support

@waruqi
Copy link
Member

waruqi commented Aug 17, 2023

@waruqi 怎么检测CPU是否支持sse2、avx、avx2、neon等指令集?有没有内置的函数或者推荐的解决方案?

add_vectorexts

能拿到结果嘛?libvpx要根据支持情况生成头文件

走 target:has_cflags, target:cxxflags 自己在 on_config 里判断

@waruqi
Copy link
Member

waruqi commented Aug 17, 2023

@Issues-translate-bot
Copy link

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


Or go option + configfiles + check flags https://github.com/xmake-io/xmake/blob/beafb2d5cfca0a3d52479312b6b92ca651f4959d/tests/apis/check_xxx/xmake.lua#L44

@DreamOfIce
Copy link
Contributor Author

@waruqi 有办法在on_load之类的地方动态地添加option嘛?

@Issues-translate-bot
Copy link

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


@waruqi Is there a way to dynamically add options in places like on_load?

@waruqi
Copy link
Member

waruqi commented Aug 21, 2023

@waruqi 有办法在on_load之类的地方动态地添加option嘛?

option 定义只能描述域定义,绑定到 target 。可以走 target:add("options", "xxx")

@Issues-translate-bot
Copy link

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


@waruqi Is there a way to dynamically add options in places like on_load?

option definitions can only describe domain definitions, bound to target . You can go target:add("options", "xxx")

@DreamOfIce
Copy link
Contributor Author

@waruqi libvpx的dll def文件没有扩展名,能不能在不改名的情况下让xmake把它当作def处理?我试了add_files("vp8/exports_enc", {rule = "platform.windows.def"})没用

@Issues-translate-bot
Copy link

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


@waruqi The dll def file of libvpx has no extension. Can xmake treat it as def without changing the name? I tried add_files("vp8/exports_enc", {rule = "platform.windows.def"}) to no avail

@waruqi
Copy link
Member

waruqi commented Sep 9, 2023

@waruqi libvpx的dll def文件没有扩展名,能不能在不改名的情况下让xmake把它当作def处理?我试了add_files("vp8/exports_enc", {rule = "platform.windows.def"})没用

tools.xmake.install 之前你 os.cp 先 rename 下,再去 add_files 不就好了

@Issues-translate-bot
Copy link

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


@waruqi The dll def file of libvpx has no extension. Can xmake treat it as def without changing the name? I tried add_files("vp8/exports_enc", {rule = "platform.windows.def"}) to no avail

Before tools.xmake.install, you should rename os.cp first, and then go to add_files.

@DreamOfIce
Copy link
Contributor Author

@waruqi libvpx的dll def文件没有扩展名,能不能在不改名的情况下让xmake把它当作def处理?我试了add_files("vp8/exports_enc", {rule = "platform.windows.def"})没用

tools.xmake.install 之前你 os.cp 先 rename 下,再去 add_files 不就好了

额,我就是想知道能不能在不重命名的情况下实现……

@Issues-translate-bot
Copy link

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


@waruqi The dll def file of libvpx has no extension. Can xmake treat it as def without changing the name? I tried add_files("vp8/exports_enc", {rule = "platform.windows.def"}) to no avail

Before tools.xmake.install, just rename os.cp first and then go to add_files.

Well, I just want to know if it can be achieved without renaming...

@waruqi
Copy link
Member

waruqi commented Sep 9, 2023

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

@waruqi The dll def file of libvpx has no extension. Can xmake treat it as def without changing the name? I tried add_files("vp8/exports_enc", {rule = "platform.windows.def"}) to no avail

Before tools.xmake.install, just rename os.cp first and then go to add_files.

Well, I just want to know if it can be achieved without renaming...

目前只能根据扩展名匹配

@star-hengxing star-hengxing mentioned this pull request Sep 11, 2024
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

Successfully merging this pull request may close these issues.

4 participants