Skip to content

Commit 489d1e7

Browse files
authored
Fix-up
1 parent 9bb5a5f commit 489d1e7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/PackageCompiler.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,6 @@ const WARNED_CPP_COMPILER = Ref{Bool}(false)
211211
function get_compiler_cmd(; cplusplus::Bool=false)
212212
cc = get(ENV, "JULIA_CC", nothing)
213213
path = nothing
214-
@static if Sys.iswindows() && cc === nothing
215-
path = joinpath(LazyArtifacts.artifact"mingw-w64", "extracted_files", (Int==Int64 ? "mingw64" : "mingw32"), "bin", cplusplus ? "g++.exe" : "gcc.exe")
216-
compiler_cmd = `$path`
217-
end
218214
if cc !== nothing
219215
compiler_cmd = Cmd(Base.shell_split(cc))
220216
path = nothing
@@ -246,6 +242,9 @@ function get_compiler_cmd(; cplusplus::Bool=false)
246242
end
247243
found_compiler || error("could not find a compiler, looked for ",
248244
join(((cplusplus ? compilers_cpp : ())..., compilers_c...), ", ", " and "))
245+
else
246+
path = joinpath(LazyArtifacts.artifact"mingw-w64", "extracted_files", (Int==Int64 ? "mingw64" : "mingw32"), "bin", cplusplus ? "g++.exe" : "gcc.exe")
247+
compiler_cmd = `$path`
249248
end
250249
if path !== nothing
251250
compiler_cmd = addenv(compiler_cmd, "PATH" => string(ENV["PATH"], ";", dirname(path)))

0 commit comments

Comments
 (0)