Skip to content

zig fails to build from source: error: use of unknown builtin '__builtin_inff16' #22890

@andrewrk

Description

@andrewrk

current master branch: 8a3aeba

andy@Andrews-MBP build-release % cmake .. -DCMAKE_PREFIX_PATH=$HOME/local/llvm19-assert -GNinja -DZIG_NO_LIB=ON -DCMAKE_BUILD_TYPE=Release
andy@Andrews-MBP build-release % ninja install
[16/20] Building C object CMakeFiles/zig2.dir/compiler_rt.c.o
FAILED: CMakeFiles/zig2.dir/compiler_rt.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/andy/dev/zig/stage1 -I/Users/andy/local/llvm19-assert/include -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -std=c99 -O0 -fno-stack-protector -MD -MT CMakeFiles/zig2.dir/compiler_rt.c.o -MF CMakeFiles/zig2.dir/compiler_rt.c.o.d -o CMakeFiles/zig2.dir/compiler_rt.c.o -c /Users/andy/dev/zig/build-release/compiler_rt.c
/Users/andy/dev/zig/build-release/compiler_rt.c:17580:10: error: use of unknown builtin '__builtin_inff16' [-Wimplicit-function-declaration]
  return zig_make_special_f16(, inf, , UINT16_C(0x7c00));
         ^
/Users/andy/dev/zig/stage1/zig.h:3180:59: note: expanded from macro 'zig_make_special_f16'
#define  zig_make_special_f16(sign, name, arg, repr) sign zig_make_f16 (__builtin_##name, )(arg)
                                                          ^
/Users/andy/dev/zig/stage1/zig.h:3207:32: note: expanded from macro 'zig_make_f16'
#define zig_make_f16(fp, repr) fp##f16
                               ^
<scratch space>:389:1: note: expanded from here
__builtin_inff16
^

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-aarch6464-bit Armbackend-cThe C backend (CBE) outputs C source code.bugObserved behavior contradicts documented or intended behavioros-macosmacOSregressionIt worked in a previous version of Zig, but stopped working.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions