ruki

Results 1751 comments of ruki

you can use `set_toolchains("iararm", {version = "9.3"})` like `set_toolchains("msvc", {vs = "2022"})` toolchain:config("vs") will get it. https://github.com/xmake-io/xmake/blob/7811d6e50a710760f4cee3a14e270d9fe894c673/xmake/toolchains/msvc/check.lua#L31

However, this assumes that multiple versions of the ivar toolchain are already installed on the user's system environment. I would recommend making ivar as a package in the way I...

like llvm toolchain https://github.com/xmake-io/xmake/blob/7811d6e50a710760f4cee3a14e270d9fe894c673/tests/projects/package/toolchain_llvm/xmake.lua#L2-L7 https://github.com/xmake-io/xmake/blob/7811d6e50a710760f4cee3a14e270d9fe894c673/xmake/toolchains/llvm/check.lua#L89

Using packages, we can still use the system's installed toolchain, and `add_requires("llvm")` will prioritize the selection of the specified version from the system for use via on_fetch. It also has...

you should add `find_iccarm.lua` to find it. then call `lib.detect.find_tool`, it will call find_iccarm.lua https://github.com/xmake-io/xmake/tree/dev/xmake/modules/detect/tools

done https://github.com/xmake-io/xmake/pull/6116 ```console xmake f --toolchain=iararm -p cross --arch=[cpu] xmake ```

> 其次,llvm-config --libs all生成-lLLVM18,但xmake认为其是无效的,默认将其忽略,我必须使用force = true add_ldflags 默认会自动检测,不保证一定检测成功,根据warnings 提示加 force 就行了。。正常。

不建议走 shell 这么玩,走 package 集成,也能找系统库。 https://github.com/xmake-io/xmake-repo/blob/dev/packages/l/llvm/fetch.lua

目前这个包原本就还不支持交叉编译。你可以提 pr 过来改进这个包。 https://github.com/xmake-io/xmake-repo/blob/3a7bd844fd0f9d9702b9bbd11710d1fa685c99e8/packages/p/protobuf-cpp/xmake.lua#L54

> 我改进了一下 protoc 包,原来是直接下载预编译二进制,现在是 binary package,永远只会构建 host tool。 因为 protobuf-cpp 没有单独构建 protoc 的选项,所以 protoc 的实现很简单,直接用 protobuf-cpp 作为依赖。 > > ```lua > package("protoc") > set_kind("binary") > add_deps("protobuf-cpp") > > on_install(function (package)...