@@ -111,23 +111,19 @@ hermetic_python_version = parsed_args["hermetic_python_version"]
111
111
112
112
# Try to guess if `cc` is GCC and get its version number.
113
113
cc_is_gcc, gcc_version = let
114
- if isempty (cc)
115
- false , v " 0"
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 ])
116
125
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
126
+ false , v " 0"
131
127
end
132
128
end
133
129
@@ -139,9 +135,7 @@ push!(build_cmd_list, "--repo_env=HERMETIC_PYTHON_VERSION=$(hermetic_python_vers
139
135
if ! isempty (gcc_host_compiler_path)
140
136
push! (build_cmd_list, " --repo_env=GCC_HOST_COMPILER_PATH=$(gcc_host_compiler_path) " )
141
137
end
142
- if ! isempty (cc)
143
- push! (build_cmd_list, " --repo_env=CC=$(cc) " )
144
- end
138
+ push! (build_cmd_list, " --repo_env=CC=$(cc) " )
145
139
push! (build_cmd_list, " --check_visibility=false" )
146
140
push! (build_cmd_list, " --verbose_failures" )
147
141
push! (build_cmd_list, " --jobs=$(parsed_args[" jobs" ]) " )
176
170
# Assume the compiler is clang if not GCC. `using_clang` is an option
177
171
# introduced by Enzyme-JAX.
178
172
push! (build_cmd_list, " --define=using_clang=true" )
179
- push! (build_cmd_list, " --copt=-Wno-error= unused-command-line-argument" )
173
+ push! (build_cmd_list, " --copt=-Wno-unused-command-line-argument" )
180
174
end
181
175
push! (build_cmd_list, " --color=$(parsed_args[" color" ]) " )
182
176
push! (build_cmd_list, " :libReactantExtra.so" )
0 commit comments