Skip to content
Merged
  •  
  •  
  •  
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ See docs/process.md for more on how version tagging works.
#27339, #27338, #27340, #27347)
- Removed legacy JS library symbols symbols: `$ALLOC_NORMAL`, `$ALLOC_STACK`,
and `$allocate`. (#27378)
- llvm-libc was updated to LLVM 22.1.8. (#27374)

6.0.3 - 07/13/26
----------------
Expand Down
8 changes: 4 additions & 4 deletions system/lib/llvm-libc/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
llvm's libc
-----------

These files are from the llvm-project based on release 21.1.8.
These files are from the llvm-project based on release 22.1.8.

We maintain a local fork of llvm-project that contains any Emscripten
specific patches:

https://github.com/emscripten-core/llvm-project

The current patch is based on the emscripten-libs-21 branch.
The current patch is based on the emscripten-libs-22 branch.

Currently in production, we do not use LLVM's libc directly yet, but libcxx uses
a subset of headers from libc. So libcxx directly depends on the following
Expand All @@ -32,6 +32,6 @@ Run `system/lib/update_llvm_libc.py path/to/llvm-project`
Modifications
-------------

For a list of changes from upstream see the libcxx files that are part of:
For a list of changes from upstream see the libc files that are part of:

https://github.com/llvm/llvm-project/compare/llvmorg-21.1.8...emscripten-core:emscripten-libs-21
https://github.com/llvm/llvm-project/compare/llvmorg-22.1.8...emscripten-core:emscripten-libs-22
102 changes: 102 additions & 0 deletions system/lib/llvm-libc/config/baremetal/aarch64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,19 @@ set(TARGET_LIBC_ENTRYPOINTS

# stdio.h entrypoints
libc.src.stdio.asprintf
libc.src.stdio.feof
libc.src.stdio.ferror
libc.src.stdio.fgetc
libc.src.stdio.fgets
libc.src.stdio.fprintf
libc.src.stdio.fputc
libc.src.stdio.fputs
libc.src.stdio.fread
libc.src.stdio.fscanf
libc.src.stdio.fwrite
libc.src.stdio.getchar
libc.src.stdio.printf
libc.src.stdio.putc
libc.src.stdio.putchar
libc.src.stdio.puts
libc.src.stdio.remove
Expand All @@ -134,6 +145,8 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdio.sprintf
libc.src.stdio.sscanf
libc.src.stdio.vasprintf
libc.src.stdio.vfprintf
libc.src.stdio.vfscanf
libc.src.stdio.vprintf
libc.src.stdio.vscanf
libc.src.stdio.vsnprintf
Expand Down Expand Up @@ -218,6 +231,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdlib.abort
libc.src.stdlib.abs
libc.src.stdlib.aligned_alloc
libc.src.stdlib.atexit
libc.src.stdlib.atof
libc.src.stdlib.atoi
libc.src.stdlib.atol
Expand Down Expand Up @@ -268,6 +282,8 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.time.difftime
libc.src.time.gmtime
libc.src.time.gmtime_r
libc.src.time.localtime
libc.src.time.localtime_r
libc.src.time.mktime
libc.src.time.strftime
libc.src.time.strftime_l
Expand Down Expand Up @@ -317,8 +333,10 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.fenv.feupdateenv

# math.h entrypoints
libc.src.math.acos
libc.src.math.acosf
libc.src.math.acoshf
libc.src.math.asin
libc.src.math.asinf
libc.src.math.asinhf
libc.src.math.atan2
Expand Down Expand Up @@ -754,6 +772,90 @@ if(LIBC_TYPES_HAS_FLOAT128)
)
endif()

list(APPEND TARGET_LIBM_ENTRYPOINTS
# bfloat16 entrypoints
libc.src.math.bf16add
libc.src.math.bf16addf
libc.src.math.bf16addl
libc.src.math.bf16div
libc.src.math.bf16divf
libc.src.math.bf16divl
libc.src.math.bf16fma
libc.src.math.bf16fmaf
libc.src.math.bf16fmal
libc.src.math.bf16mul
libc.src.math.bf16mulf
libc.src.math.bf16mull
libc.src.math.bf16sub
libc.src.math.bf16subf
libc.src.math.bf16subl
libc.src.math.canonicalizebf16
libc.src.math.ceilbf16
libc.src.math.copysignbf16
libc.src.math.fabsbf16
libc.src.math.fdimbf16
libc.src.math.floorbf16
libc.src.math.fmaxbf16
libc.src.math.fmaximumbf16
libc.src.math.fmaximum_magbf16
libc.src.math.fmaximum_mag_numbf16
libc.src.math.fmaximum_numbf16
libc.src.math.fminbf16
libc.src.math.fminimumbf16
libc.src.math.fminimum_magbf16
libc.src.math.fminimum_mag_numbf16
libc.src.math.fminimum_numbf16
libc.src.math.fmodbf16
libc.src.math.frexpbf16
libc.src.math.fromfpbf16
libc.src.math.fromfpxbf16
libc.src.math.getpayloadbf16
libc.src.math.ilogbbf16
libc.src.math.iscanonicalbf16
libc.src.math.issignalingbf16
libc.src.math.ldexpbf16
libc.src.math.llogbbf16
libc.src.math.llrintbf16
libc.src.math.llroundbf16
libc.src.math.log_bf16
libc.src.math.logbbf16
libc.src.math.lrintbf16
libc.src.math.lroundbf16
libc.src.math.modfbf16
libc.src.math.nanbf16
libc.src.math.nearbyintbf16
libc.src.math.nextafterbf16
libc.src.math.nextdownbf16
libc.src.math.nexttowardbf16
libc.src.math.nextupbf16
libc.src.math.remainderbf16
libc.src.math.remquobf16
libc.src.math.rintbf16
libc.src.math.roundbf16
libc.src.math.roundevenbf16
libc.src.math.scalblnbf16
libc.src.math.scalbnbf16
libc.src.math.setpayloadbf16
libc.src.math.setpayloadsigbf16
libc.src.math.sqrtbf16
libc.src.math.truncbf16
libc.src.math.totalorderbf16
libc.src.math.totalordermagbf16
libc.src.math.ufromfpbf16
libc.src.math.ufromfpxbf16
)

if(LIBC_TYPES_HAS_FLOAT128)
list(APPEND TARGET_LIBM_ENTRYPOINTS
# math.h C++23 mixed bfloat16 and _Float128 entrypoints
libc.src.math.bf16addf128
libc.src.math.bf16divf128
libc.src.math.bf16fmaf128
libc.src.math.bf16mulf128
libc.src.math.bf16subf128
)
endif()

if(LIBC_COMPILER_HAS_FIXED_POINT)
list(APPEND TARGET_LIBM_ENTRYPOINTS
# stdfix.h _Fract and _Accum entrypoints
Expand Down
1 change: 1 addition & 0 deletions system/lib/llvm-libc/config/baremetal/aarch64/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
libc.include.assert
libc.include.complex
libc.include.ctype
libc.include.elf
libc.include.errno
libc.include.features
libc.include.fenv
Expand Down
105 changes: 105 additions & 0 deletions system/lib/llvm-libc/config/baremetal/arm/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,19 @@ set(TARGET_LIBC_ENTRYPOINTS

# stdio.h entrypoints
libc.src.stdio.asprintf
libc.src.stdio.feof
libc.src.stdio.ferror
libc.src.stdio.fgetc
libc.src.stdio.fgets
libc.src.stdio.fprintf
libc.src.stdio.fputc
libc.src.stdio.fputs
libc.src.stdio.fread
libc.src.stdio.fscanf
libc.src.stdio.fwrite
libc.src.stdio.getchar
libc.src.stdio.printf
libc.src.stdio.putc
libc.src.stdio.putchar
libc.src.stdio.puts
libc.src.stdio.remove
Expand All @@ -134,6 +145,8 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdio.sprintf
libc.src.stdio.sscanf
libc.src.stdio.vasprintf
libc.src.stdio.vfprintf
libc.src.stdio.vfscanf
libc.src.stdio.vprintf
libc.src.stdio.vscanf
libc.src.stdio.vsnprintf
Expand Down Expand Up @@ -218,6 +231,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdlib.abort
libc.src.stdlib.abs
libc.src.stdlib.aligned_alloc
libc.src.stdlib.atexit
libc.src.stdlib.atof
libc.src.stdlib.atoi
libc.src.stdlib.atol
Expand Down Expand Up @@ -268,6 +282,8 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.time.difftime
libc.src.time.gmtime
libc.src.time.gmtime_r
libc.src.time.localtime
libc.src.time.localtime_r
libc.src.time.mktime
libc.src.time.strftime
libc.src.time.strftime_l
Expand All @@ -278,6 +294,9 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.wchar.wcslen
libc.src.wchar.wctob

# wctype.h entrypoints
libc.src.wctype.iswalpha

# internal entrypoints
libc.startup.baremetal.init
libc.startup.baremetal.fini
Expand Down Expand Up @@ -317,8 +336,10 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.fenv.feupdateenv

# math.h entrypoints
libc.src.math.acos
libc.src.math.acosf
libc.src.math.acoshf
libc.src.math.asin
libc.src.math.asinf
libc.src.math.asinhf
libc.src.math.atan2
Expand Down Expand Up @@ -754,6 +775,90 @@ if(LIBC_TYPES_HAS_FLOAT128)
)
endif()

list(APPEND TARGET_LIBM_ENTRYPOINTS
# bfloat16 entrypoints
libc.src.math.bf16add
libc.src.math.bf16addf
libc.src.math.bf16addl
libc.src.math.bf16div
libc.src.math.bf16divf
libc.src.math.bf16divl
libc.src.math.bf16fma
libc.src.math.bf16fmaf
libc.src.math.bf16fmal
libc.src.math.bf16mul
libc.src.math.bf16mulf
libc.src.math.bf16mull
libc.src.math.bf16sub
libc.src.math.bf16subf
libc.src.math.bf16subl
libc.src.math.canonicalizebf16
libc.src.math.ceilbf16
libc.src.math.copysignbf16
libc.src.math.fabsbf16
libc.src.math.fdimbf16
libc.src.math.floorbf16
libc.src.math.fmaxbf16
libc.src.math.fmaximumbf16
libc.src.math.fmaximum_magbf16
libc.src.math.fmaximum_mag_numbf16
libc.src.math.fmaximum_numbf16
libc.src.math.fminbf16
libc.src.math.fminimumbf16
libc.src.math.fminimum_magbf16
libc.src.math.fminimum_mag_numbf16
libc.src.math.fminimum_numbf16
libc.src.math.fmodbf16
libc.src.math.frexpbf16
libc.src.math.fromfpbf16
libc.src.math.fromfpxbf16
libc.src.math.getpayloadbf16
libc.src.math.ilogbbf16
libc.src.math.iscanonicalbf16
libc.src.math.issignalingbf16
libc.src.math.ldexpbf16
libc.src.math.llogbbf16
libc.src.math.llrintbf16
libc.src.math.llroundbf16
libc.src.math.log_bf16
libc.src.math.logbbf16
libc.src.math.lrintbf16
libc.src.math.lroundbf16
libc.src.math.modfbf16
libc.src.math.nanbf16
libc.src.math.nearbyintbf16
libc.src.math.nextafterbf16
libc.src.math.nextdownbf16
libc.src.math.nexttowardbf16
libc.src.math.nextupbf16
libc.src.math.remainderbf16
libc.src.math.remquobf16
libc.src.math.rintbf16
libc.src.math.roundbf16
libc.src.math.roundevenbf16
libc.src.math.scalblnbf16
libc.src.math.scalbnbf16
libc.src.math.setpayloadbf16
libc.src.math.setpayloadsigbf16
libc.src.math.sqrtbf16
libc.src.math.truncbf16
libc.src.math.totalorderbf16
libc.src.math.totalordermagbf16
libc.src.math.ufromfpbf16
libc.src.math.ufromfpxbf16
)

if(LIBC_TYPES_HAS_FLOAT128)
list(APPEND TARGET_LIBM_ENTRYPOINTS
# math.h C++23 mixed bfloat16 and _Float128 entrypoints
libc.src.math.bf16addf128
libc.src.math.bf16divf128
libc.src.math.bf16fmaf128
libc.src.math.bf16mulf128
libc.src.math.bf16subf128
)
endif()

if(LIBC_COMPILER_HAS_FIXED_POINT)
list(APPEND TARGET_LIBM_ENTRYPOINTS
# stdfix.h _Fract and _Accum entrypoints
Expand Down
2 changes: 2 additions & 0 deletions system/lib/llvm-libc/config/baremetal/arm/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
libc.include.assert
libc.include.complex
libc.include.ctype
libc.include.elf
libc.include.errno
libc.include.features
libc.include.fenv
Expand All @@ -23,4 +24,5 @@ set(TARGET_PUBLIC_HEADERS
libc.include.time
libc.include.uchar
libc.include.wchar
libc.include.wctype
)
12 changes: 11 additions & 1 deletion system/lib/llvm-libc/config/baremetal/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"value": "LIBC_ERRNO_MODE_EXTERNAL"
}
},
"threads": {
"LIBC_CONF_THREAD_MODE": {
"value": "LIBC_THREAD_MODE_SINGLE"
}
},
"printf": {
"LIBC_CONF_PRINTF_DISABLE_FIXED_POINT": {
"value": true
Expand Down Expand Up @@ -31,7 +36,12 @@
},
"math": {
"LIBC_CONF_MATH_OPTIMIZATIONS": {
"value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)"
"value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT)"
}
},
"general": {
"LIBC_ADD_NULL_CHECKS": {
"value": false
}
}
}
Loading