Skip to content

Commit 6077bac

Browse files
committed
Try no cc
1 parent ec0c61f commit 6077bac

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

deps/build_local.jl

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,23 @@ hermetic_python_version = parsed_args["hermetic_python_version"]
111111

112112
# Try to guess if `cc` is GCC and get its version number.
113113
cc_is_gcc, gcc_version = let
114-
io = IOBuffer()
115-
run(pipeline(ignorestatus(`$(cc) --version`); stdout=io))
116-
version_string = String(take!(io))
117-
# Detecing GCC is hard, the name "gcc" may not appear anywhere in the
118-
# version string, but on the second line there should be FSF.
119-
m = match(
120-
r"\([^)]+\) (\d+\.\d+\.\d+).*\n.*Free Software Foundation, Inc\.",
121-
version_string,
122-
)
123-
if !isnothing(m)
124-
true, VersionNumber(m[1])
125-
else
114+
if isempty(cc)
126115
false, v"0"
116+
else
117+
io = IOBuffer()
118+
run(pipeline(ignorestatus(`$(cc) --version`); stdout=io))
119+
version_string = String(take!(io))
120+
# Detecing GCC is hard, the name "gcc" may not appear anywhere in the
121+
# version string, but on the second line there should be FSF.
122+
m = match(
123+
r"\([^)]+\) (\d+\.\d+\.\d+).*\n.*Free Software Foundation, Inc\.",
124+
version_string,
125+
)
126+
if !isnothing(m)
127+
true, VersionNumber(m[1])
128+
else
129+
false, v"0"
130+
end
127131
end
128132
end
129133

0 commit comments

Comments
 (0)