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

支持arch #40

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/globals.lua
Expand Up @@ -8,7 +8,10 @@ end

globals.mode = globals.mode or "release"

globals.hostos = globals.hostos or require "bee.platform".os
local platform = require "bee.platform"
globals.hostos = globals.hostos or platform.os
globals.arch = globals.arch or platform.Arch

globals.hostshell = globals.hostshell or (function ()
if globals.hostos == "windows" then
if os.getenv "MSYSTEM" then
Expand Down
11 changes: 7 additions & 4 deletions scripts/writer.lua
Expand Up @@ -237,16 +237,19 @@ end
local function reslove_table(root, t, a)
merge_table(root, t, a)
if a[globals.os] then
merge_table(root, t, a[globals.os])
reslove_table(root, t, a[globals.os])
end
if a[globals.arch] then
reslove_table(root, t, a[globals.arch])
end
if a[globals.compiler] then
merge_table(root, t, a[globals.compiler])
reslove_table(root, t, a[globals.compiler])
end
if a.mingw and globals.os == "windows" and globals.hostshell == "sh" then
merge_table(root, t, a.mingw)
reslove_table(root, t, a.mingw)
end
if a.clang_cl and globals.cc == "clang-cl" then
merge_table(root, t, a.clang_cl)
reslove_table(root, t, a.clang_cl)
end
end

Expand Down