Commit Graph

15 Commits

Author SHA1 Message Date
Andrew Kelley 74608293af compiler_rt: common -> compiler_rt
use the "symbol" helper function in all exports

move all declarations from common.zig to compiler_rt.zig

flatten the tree structure somewhat (move contents of tiny files into
parent files)

No functional changes.
2026-02-09 20:03:15 -08:00
Andrew Kelley b64491f2d6 compiler_rt: ensure no std.Io used when not testing 2026-01-04 00:27:08 -08:00
Linus Groh 79460d4a3e Remove uses of deprecated callconv aliases 2025-03-05 03:01:43 +00:00
mlugg a3a737e9a6 lib,test,tools,doc: update usages of @export 2024-08-27 00:44:35 +01:00
Ahmed 5c8eda36d6 chore: Fix some typos 2024-03-14 19:43:24 +02:00
Zachary Raineri d82b359010 Use builtin inference over @as where possible 2023-07-24 10:23:51 -07:00
mlugg f26dda2117 all: migrate code to new cast builtin syntax
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:

* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
2023-06-24 16:56:39 -07:00
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00
Jan Philipp Hafer 539e0b0469 compiler_rt: fixup exports of PPC routines
PPC targets can also use the functionality-equivalent standard routine, so
unconditionally export the standard routine.

Fixup of #16054 merged in f043071cdf.
2023-06-18 15:27:47 -07:00
Luuk de Gram 30f2bb8464 compiler-rt: Set the symbol visibility
When we're compiling compiler_rt for any WebAssembly target, we do
not want to expose all the compiler-rt functions to the host runtime.
By setting the visibility of all exports to `hidden`, we allow the
linker to resolve the symbols during linktime, while not expose the
functions to the host runtime. This also means the linker can
properly garbage collect any compiler-rt function that does not get
resolved. The symbol visibility for all target remains the same as
before: `default`.
2022-12-28 14:57:17 +01:00
Cody Tapscott c50f33b111 compiler_rt: Always export "standard" symbol names
The Zig LLVM backend emits calls to softfloat methods with the "standard
compiler-rt" names. Rather than add complexity to the backend and
have to synchronize the naming scheme across all targets, the simplest
fix is just to export these symbols under both the "standard" and the
platform-specific naming convention.
2022-10-22 17:19:33 -07:00
Andrew Kelley bbc6103398 compiler-rt: fix tests 2022-06-17 16:38:59 -07:00
Andrew Kelley 25671f5a97 compiler-rt: move SPARC functions into appropriate compilation units 2022-06-17 16:38:59 -07:00
Jakub Konka 80790be309 compiler_rt: compile each unit separately for improved archiving 2022-06-17 16:38:59 -07:00
Andrew Kelley ec95e00e28 flatten lib/std/special and improve "pkg inside another" logic
stage2: change logic for detecting whether the main package is inside
the std package. Previously it relied on realpath() which is not portable.
This uses resolve() which is how imports already work.

 * stage2: fix cleanup bug when creating Module
 * flatten lib/std/special/* to lib/*
   - this was motivated by making main_pkg_is_inside_std false for
     compiler_rt & friends.
 * rename "mini libc" to "universal libc"
2022-05-06 22:41:00 -07:00