Skip to content

Commit fd155c2

Browse files
committed
llvmPackages_16.llvm: avoid calling roundevenf on darwin
1 parent 3c7fba2 commit fd155c2

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

pkgs/development/compilers/llvm/16/llvm/default.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,21 +165,19 @@ in
165165
# and thus fails under the sandbox:
166166
substituteInPlace unittests/TargetParser/Host.cpp \
167167
--replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
168-
'' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
168+
169169
# This test tries to call the intrinsics `@llvm.roundeven.f32` and
170170
# `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
171-
# and `roundeven` on x86_64 macOS.
171+
# and `roundeven` on macOS.
172172
#
173173
# However these functions are glibc specific so the test fails:
174174
# - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
175175
# - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
176176
#
177-
# TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it
178-
# pass there?
179177
substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
180178
--replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
181179
--replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
182-
180+
'' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
183181
# This test fails on darwin x86_64 because `sw_vers` reports a different
184182
# macOS version than what LLVM finds by reading
185183
# `/System/Library/CoreServices/SystemVersion.plist` (which is passed into

0 commit comments

Comments
 (0)