Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ jobs:
grep -q " T $sym\$" <<<"$symbols" \
|| { echo "::error::$t archive lacks $sym"; grep -iE "platform|sf3|si3|sf2" <<<"$symbols" || true; exit 1; }
done
# AND NO SYMBOL DEFINED TWICE: a unit that replaces a generic one
# must displace it, or a consumer's link reports a duplicate.
dups=$(grep ' T ' <<<"$symbols" | awk '{print $NF}' | sort | uniq -d)
[ -z "$dups" ] || { echo "::error::$t archive defines a symbol twice:"; echo "$dups"; exit 1; }
echo " ok $t"
n=$((n+1))
done
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ The official LLVM macOS payload builds `libclang_rt.osx.a` and no `ios` or
archive only when the file exists. A program that reaches an availability check
(`__builtin_available`, or a system header that uses it) then fails at link
with `__isPlatformVersionAtLeast` undefined, and nothing said so earlier. The
routine is in `os_version_check.c`, a Darwin translation unit. From 22.1.8.4 this
routine is in `os_version_check.c`, a Darwin translation unit. From 22.1.8.5 this
package carries upstream's Darwin selection under `cfg(os = "ios")`, and an
iOS application declares it beside its C++ standard library package:

```toml
[target.'cfg(os = "ios")'.dependencies]
llvm.compiler-rt-builtins = "22.1.8.4"
llvm.compiler-rt-builtins = "22.1.8.5"
llvm.libcxx = "22.1.8.1"
```

mcpp reports `compiler-runtime compiler-rt (compiler-rt-builtins@22.1.8.4, graph)`
mcpp reports `compiler-runtime compiler-rt (compiler-rt-builtins@22.1.8.5, graph)`
on those rows, and prints a degradation naming this package when the payload
has no archive for the platform and the graph declares none.
13 changes: 12 additions & 1 deletion mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ name = "compiler-rt-builtins"
# mirrored, carrying different bytes. A version that has been published must
# never come to mean something else, so the packaging revision is what moves.
# A consumer writes `22.1.8.2` in full: a bare requirement in mcpp is an exact pin.
version = "22.1.8.4"
version = "22.1.8.5"
description = "The compiler-rt builtins as a source package: LLVM's replacement for libgcc — the routines a compiler emits calls to — compiled with the consuming program's own flags"
# The effective grant, which is what an SBOM consumer needs. 342 of the 347
# vendored files carry this identifier in an SPDX header; `LICENSE.compiler-rt`
Expand Down Expand Up @@ -412,12 +412,23 @@ sources = [
"builtins/atomic_thread_fence.c",
]

# THE x86_64 UNITS REPLACE THEIR GENERIC COUNTERPARTS, they do not join them.
# Upstream's x86_64 list carries these four in place of the generic C files,
# which define the same symbols; both in one archive is what ld64 reported on
# the x86_64 simulator row as four `duplicate symbol` errors (`__floatdidf`
# from `builtins/floatdidf.o` and from `builtins/x86_64/floatdidf.o`).
# The CI job now reads the archive for a symbol defined twice, since a build
# cannot see a duplicate that only a link resolves.
[target.'cfg(all(os = "ios", arch = "x86_64"))'.build]
sources = [
"builtins/x86_64/floatdidf.c",
"builtins/x86_64/floatdisf.c",
"builtins/x86_64/floatundidf.S",
"builtins/x86_64/floatundisf.S",
"!builtins/floatdidf.c",
"!builtins/floatdisf.c",
"!builtins/floatundidf.c",
"!builtins/floatundisf.c",
]

[targets.compiler-rt-builtins]
Expand Down
Loading