-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix shards regression #487
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,23 +11,25 @@ const JLL_ENV_CLANG_TARGETS_MAPPING = Dict( | |
"x86_64-apple-darwin14"=>"x86_64-apple-darwin14", | ||
"x86_64-linux-gnu"=>"x86_64-unknown-linux-gnu", | ||
"x86_64-linux-musl"=>"x86_64-unknown-linux-musl", | ||
"x86_64-unknown-freebsd"=>"x86_64-unknown-freebsd13.2", | ||
"x86_64-unknown-freebsd13.2"=>"x86_64-unknown-freebsd13.2", | ||
"x86_64-w64-mingw32"=>"x86_64-w64-windows-gnu", | ||
) | ||
|
||
triple2target(triple::String) = get(JLL_ENV_CLANG_TARGETS_MAPPING, triple, "unknown") | ||
|
||
function __triplet(p::Platform) | ||
for k in keys(p.tags) | ||
if k != "arch" && k != "os" && k != "libc" | ||
if k != "arch" && k != "os" && k != "libc" && k != "call_abi" && k != "os_version" | ||
delete!(p.tags, k) | ||
end | ||
end | ||
t = triplet(p) | ||
if os(p) == "macos" && arch(p) == "x86_64" | ||
t *= "14" | ||
elseif os(p) == "macos" && arch(p) == "aarch64" | ||
t *= "20" | ||
if os_version(p) === nothing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why the user wouldn't specify the version, but here I am just maintaining backward compatibility if they didn't. |
||
if os(p) == "macos" && arch(p) == "x86_64" | ||
t *= "14" | ||
elseif os(p) == "macos" && arch(p) == "aarch64" | ||
t *= "20" | ||
end | ||
end | ||
return t | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@testset "get_default_args for all triples" begin | ||
# just testing this does not crash on any default triple | ||
Clang.get_default_args.(Clang.JLLEnvs.JLL_ENV_TRIPLES) | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this test downloads artifacts for all platforms. running it every time is a bit overkill. is there a way to somehow cache it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or maybe we can control it by env variables. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry i didn't realize it did that, i've simplified the test |
||
|
||
@testset "darwin __triplet backwards compatibility" begin | ||
@test Clang.JLLEnvs.__triplet(parse(Clang.JLLEnvs.Platform, "aarch64-apple-darwin")) == "aarch64-apple-darwin20" | ||
@test Clang.JLLEnvs.__triplet(parse(Clang.JLLEnvs.Platform, "aarch64-apple-darwin20")) == "aarch64-apple-darwin20" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call_abi
is needed for armv7l,os_version
is needed for freebsd and sometimes darwin