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

请求llvm-releases #5829

Open
Arteiimis opened this issue Nov 25, 2024 · 2 comments
Open

请求llvm-releases #5829

Arteiimis opened this issue Nov 25, 2024 · 2 comments

Comments

@Arteiimis
Copy link
Contributor

你在什么场景下需要该功能?

windows下使用libcxx时,拉取预编译二进制会很方便,xrepo中自带的llvm-mingw使用时需要切换到mingw平台,不能使用msstl,该预编译包含libcxx的同时可以使用msstl。

描述可能的解决方案

该包为预编译包,集成较为简单:
https://github.com/trcrsired/llvm-releases.git

描述你认为的候选方案

No response

其他信息

No response

@Issues-translate-bot
Copy link

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


In what scenario do you need this feature?

When using libcxx under Windows, it is very convenient to pull the precompiled binary. When using the llvm-mingw that comes with xrepo, you need to switch to the mingw platform and cannot use msstl. The precompiled version includes libcxx and you can use msstl at the same time.

Describe possible solutions

This package is a precompiled package, and integration is relatively simple:
https://github.com/trcrsired/llvm-releases.git

Describe your alternatives

No response

Other information

No response

@star-hengxing
Copy link
Contributor

这工具链不 "标准",用 set_toolchains("clang@trcrsired-llvm-mingw") 也识别不了(找不到 clang++),可能需要 custom toolchain 才能用。。

package("trcrsired-llvm-mingw")
    set_kind("toolchain")
    set_homepage("https://github.com/trcrsired/llvm-releases")
    set_license("Apache-2.0")

    local version_map = {
        ["20.0.0"] = "2024.11.24"
    }

    add_urls("https://github.com/trcrsired/llvm-releases/releases/download/llvm$(version)/x86_64-windows-gnu.tar.xz", {version = function (version)
        local llvm_ver = tostring(version)
        local ver = version_map[llvm_ver]
        return string.format("%s-%s", version:major(), ver:gsub("%.", ""))
    end})

    add_versions("20.0.0", "98504a1ecb62f835918eda365f221d194765621219903c9f277ea64fff887db9")

    on_install("@windows|x64", function (package)
        for _, dir in ipairs(os.dirs("*")) do
            os.vcp(path.join(dir, "/*"), package:installdir())
        end
    end)

    on_test(function (package)
        os.vrun("llvm-config --version")
    end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants