diff --git a/Artifacts.toml b/Artifacts.toml index 3e43ca75..94e81285 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -2046,25 +2046,25 @@ os = "linux" [["Go.v1.16.3.x86_64-linux-musl.squashfs"]] arch = "x86_64" -git-tree-sha1 = "3a85d82c6b7bb04cc5fd9c206a40071a85a8ab33" +git-tree-sha1 = "3d6e4e251649e26ee915d1571e5a087fa82e80d1" lazy = true libc = "musl" os = "linux" [["Go.v1.16.3.x86_64-linux-musl.squashfs".download]] - sha256 = "3c51d29fc653f41c8e4a9fa52444deefc984e146426db7e87065ebb50a129a0a" - url = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Go-v1.16.3/Go.v1.16.3.x86_64-linux-musl.squashfs.tar.gz" + sha256 = "a618ec9032151f850febfd7df54d3ccd8298ed6400a9bd67c269f405a3c60c5b" + url = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Go-v1.16.3+0/Go.v1.16.3.x86_64-linux-musl.squashfs.tar.gz" [["Go.v1.16.3.x86_64-linux-musl.unpacked"]] arch = "x86_64" -git-tree-sha1 = "899505c8af5679696acf1b476a16b5696f5caf24" +git-tree-sha1 = "c339a184d3baa86ea328ad416eb06e7476f0aa21" lazy = true libc = "musl" os = "linux" [["Go.v1.16.3.x86_64-linux-musl.unpacked".download]] - sha256 = "a5b4ad9807ad4c16a8df91ebc763d75b766edeed12a83f2f608a38081f53e82e" - url = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Go-v1.16.3/Go.v1.16.3.x86_64-linux-musl.unpacked.tar.gz" + sha256 = "05b9524e7ce044da1b2384b6e92a33ec657e728d0d387819629600e334b09fef" + url = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/Go-v1.16.3+0/Go.v1.16.3.x86_64-linux-musl.unpacked.tar.gz" [["LLVMBootstrap.v11.0.1.x86_64-linux-musl.squashfs"]] arch = "x86_64" diff --git a/src/Runner.jl b/src/Runner.jl index 38647d75..a9952ab4 100644 --- a/src/Runner.jl +++ b/src/Runner.jl @@ -200,7 +200,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr vrun \${CCACHE} $(prog) "\${PRE_FLAGS[@]}" "\${ARGS[@]}" "\${POST_FLAGS[@]}" """) end - + # Helper invocations target_tool(io::IO, tool::String, args...; kwargs...) = wrapper(io, "/opt/$(target)/bin/$(target)-$(tool)", args...; kwargs...) llvm_tool(io::IO, tool::String, args...; kwargs...) = wrapper(io, "/opt/$(host_target)/bin/llvm-$(tool)", args...; kwargs...) @@ -208,13 +208,13 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr # For now this is required for Clang, since apple spells aarch64 as "arm64". # Should probably be fixed upstream, but will do for now clang_target_triplet(p::AbstractPlatform) = replace(aatriplet(p), "aarch64" => "arm64") - + function clang_flags!(p::AbstractPlatform, flags::Vector{String} = String[]) # Focus the clang targeting laser append!(flags, [ # Set the `target` for `clang` so it generates the right kind of code "-target $(clang_target_triplet(p))", - # Set our sysroot to the platform-specific location, dropping compiler ABI annotations + # Set our sysroot to the platform-specific location, dropping compiler ABI annotations "--sysroot=/opt/$(aatriplet(p))/$(aatriplet(p))/sys-root", ]) # For MacOS and FreeBSD, we don't set `-rtlib`, and FreeBSD is special-cased within the LLVM source tree @@ -410,7 +410,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr end end fc(io::IO, p::AbstractPlatform) = gfortran(io, p) - + # Go stuff where we build an environment mapping each time we invoke `go-${target}` function GOOS(p::AbstractPlatform) if os(p) == "macos" @@ -437,6 +437,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr ) return wrapper(io, "/opt/$(host_target)/go/bin/go"; env=env, allow_ccache=false) end + gofmt(io::IO, p::AbstractPlatform) = wrapper(io, "/opt/$(host_target)/go/bin/gofmt"; allow_ccache=false) # Rust stuff function rust_flags!(p::AbstractPlatform, flags::Vector{String} = String[]) @@ -549,7 +550,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr :strip, :install_name_tool, :dlltool, :windres, :winmc, :lipo) @eval $(tool)(io::IO, p::AbstractPlatform) = $(wrapper)(io, string("/opt/", aatriplet(p), "/bin/", aatriplet(p), "-", $(string(tool))); allow_ccache=false) end - + # c++filt is hard to write in symbols function cxxfilt(io::IO, p::AbstractPlatform) if Sys.isapple(p) @@ -645,6 +646,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr # Generate go stuff if :go in compilers write_wrapper(go, p, "$(t)-go") + write_wrapper(gofmt, p, "$(t)-gofmt") end # Misc. utilities @@ -704,7 +706,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr append!(default_tools, ("rustc","rustup","cargo")) end if :go in compilers - append!(default_tools, ("go",)) + append!(default_tools, ("go", "gofmt")) end # Create symlinks for default compiler invocations, invoke target toolchain for tool in default_tools