Skip to content

Commit e5b264e

Browse files
authored
[0_RootFS] Always disable TLS when building GCC for Windows (#5761)
* [0_RootFS] Always disable TLS when building GCC for Windows * [0_RootFS] Upload also logs tarballs
1 parent 21142b6 commit e5b264e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

0_RootFS/common.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ function upload_compiler_shard(repo, name, version, hash, archive_type; platform
9191
filename = BinaryBuilderBase.artifact_name(cs)
9292
tarball_hash = publish_artifact(repo, tag, hash, filename)
9393

94+
# Upload also the logs tarball, but do it only once (e.g. only with unpacked archives).
95+
if archive_type == :unpacked
96+
# Note (Mosè): I'm not 100% sure this is always the correct platform, but looked
97+
# like the best option from what I could gather. Note also that the logs tarball
98+
# may not always exist (e.g. for RustToolchain), so eventually we may want to guard
99+
# this with `if isfile(logs_filename)`.
100+
p = isnothing(target) ? platform : target
101+
logs_filename = joinpath("products", "$(name)-logs.v$(version).$(triplet(p)).tar.gz")
102+
BinaryBuilder.upload_to_github_releases(repo, tag, logs_filename)
103+
end
104+
94105
return [
95106
("https://github.com/$(repo)/releases/download/$(tag)/$(filename).tar.gz", tarball_hash),
96107
]
@@ -143,7 +154,7 @@ function jrun(script::String, args::String...; verbose=verbose, debug=debug, dep
143154
run(`$(Base.julia_cmd()) --color=yes $(script) $(filter(x -> !isempty(x), [@flag(verbose), @flag(debug), @flag(deploy), @flag(register), args...]))`)
144155
end
145156

146-
import BinaryBuilder: build_tarballs
157+
import BinaryBuilder: build_tarballs
147158
function build_tarballs(project_path::String, args::String...; deploy=false, register=false)
148159
@info("Building $(project_path)...")
149160
cd(project_path) do

0_RootFS/gcc_common.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ function gcc_script(compiler_target::Platform)
119119
elif [[ "${COMPILER_TARGET}" == *-mingw* ]]; then
120120
# On mingw, we need to explicitly set the windres code page to 1, otherwise windres segfaults
121121
export CPPFLAGS="${CPPFLAGS} -DCP_ACP=1"
122+
# Always disable TLS: https://github.com/JuliaLang/julia/pull/45582#issuecomment-1295697412
123+
GCC_CONF_ARGS="${GCC_CONF_ARGS} --disable-tls"
122124
123125
elif [[ "${COMPILER_TARGET}" == *-darwin* ]]; then
124126
# Use llvm archive tools to dodge binutils bugs
@@ -594,7 +596,7 @@ function build_and_upload_gcc(version::VersionNumber, ARGS=ARGS)
594596

595597
# Build the tarballs, and possibly a `build.jl` as well.
596598
ndARGS, deploy_target = find_deploy_arg(ARGS)
597-
build_info = build_tarballs(ndARGS, name, version, sources, script, [compiler_target], products, []; skip_audit=true, julia_compat="1.6")
599+
build_info = build_tarballs(ndARGS, name, version, sources, script, [compiler_target], products, Dependency[]; skip_audit=true, julia_compat="1.6")
598600
build_info = Dict(host_platform => first(values(build_info)))
599601

600602
# Upload the artifacts (if requested)

0 commit comments

Comments
 (0)