Inari0

Results 91 comments of Inari0

看了下 https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html MSVC的avx512就一个flag `/arch:AVX512`,但gcc的avx512有十几个flag;而且gcc推荐的方式是用`-march=native`开启所有可用的矢量扩展,不建议使用`-mavx512f`这样的flag,而不是msvc推荐的一个个设置扩展的flag、测试是否可用再加上。感觉这个差异太大,用`add_vectorexts()`来抽象avx512有点不太合适,应该有更好的设计。现在暂时用的判断 ```lua if is_plat("windows") then add_cxxflags("/arch:AVX512") -- leave detection to xmake else add_cxxflags("-march=native") end ```

似乎有些cmake项目用-mavx512f -mavx512dq -mavx512bw -mavx512vl这几个flag同时存在来判断avx512,是否可以借鉴一下? https://www.zhihu.com/question/433345697/answer/1611130480 根据这篇文章,这几个flag也是普通cpu主要支持的几个,其他很多是专业cpu才有

I think a plausible solution is to generate FindXXX.cmake by package information. For instance, consider a package ``` { name = "foo" includedirs = {"/include/fooinc"} linkdirs = {"/lib"} links =...

It's a bad idea using numbers to specify link orders. What matters is only the link order of some specific links and obviously a tree structure is more precise and...

> @xq114 How to define the tree structure? should it be a single command like, > > ``` > set_link_order("e", "f", {"a", "d", "c"}, {"deps::f", "options::b"}, "k") > ``` You're...

Another solution comes from cmake and some other build systems: links can be treated as targets with dependency hierarchy. So the order of links can be derived from that. ```...

add_ldflags()实测不行,报错 ``` warning: add_ldflags("-Wl,--start-group -lmkl_intel_lp64 -lmkl_tbb_thread -lmkl_core -Wl,--end-group") is ignored, please pass `{force = true}` or call `set_policy("check.auto_ignore_flags", false)` if you want to set it. ``` 用了`package:add("ldflags", "..", {force =...

> {force = true} 是给 add_ldflags 的,根据提示操作 flags需要根据config拼凑,因此没法用add_ldflags代替。不过`package:add("ldflags")`和`add_ldflags`行为应该一样才对啊

package里面的group link功能能不能优先实现一下?完整的link顺序支持确实太过复杂,但只是group link不是很复杂;现在需要group link的package有一些( https://github.com/xmake-io/xmake/issues/2012 ),尤其是mkl,现在xmake-repo中很多库需要用blas都是暂时切到openblas了,而更稳定效果更好的mkl因为xmake不支持group link而用不了,这个限制挺大的

> 包里直接走 add_ldflags 呢,也可以加 group 这个之前是不行的,上面有讨论,现在这块有修改吗