0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std
Andrew Kelley 65bea514ae Compilation: handle system C compiler not found
When linking libc and compiling natively, Zig tries to integrate with
the system C compiler. However, this caused Zig to fail when no system C
compiler is installed, despite the fact that Zig is perfectly capable of
compiling & linking libc without one.

This commit makes Zig fall back to using its own ability to provide libc
in the case that no C compiler is installed. For glibc, it means
sometimes getting the warning "zig cannot build new glibc version abc,
providing instead xyz".

Ideally, Zig would do some more validation about the system libraries
being linked against, and report an error in case it could not provide
the exact correct libc version of the system libraries (or that the
system libraries themselves conflict with each other), however, I think
it is fair to call that a separate enhancement.
History 2022-09-11 16:37:03 -07:00
..
atomic std: replace usage of std.meta.bitCount() with @bitSizeOf() 2022-04-27 11:10:52 +02:00
build std.zig.system.NativeTargetInfo: detection ignores self exe 2022-09-08 20:52:49 -07:00
c openbsd: fix sigcontext struct and avoid defining fxsave64 2022-08-26 17:30:07 +02:00
compress stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
crypto stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
dwarf wasm: Implement debug info for parameters 2022-05-09 18:51:46 +02:00
event stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
fmt stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
fs wasm: temporarily save curr file pointer before pwriting on Win 2022-09-08 14:29:54 +02:00
hash stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
heap Move sys_can_stack_trace from GPA to std.debug so that it can be re-used as needed 2022-06-25 21:27:56 -07:00
http std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
io Sema: add error for non-comptime param in comptime func 2022-08-27 11:17:48 +03:00
json std.json: Fix parsing of large numbers 2022-07-23 13:52:16 +03:00
math Fix #12440: std.math.big.Rational order/orderAbs 2022-09-04 18:45:20 +03:00
mem Revert "std.mem.Allocator: add alignedCreate" 2022-07-23 15:30:12 +03:00
meta std.meta.TrailerFlags: improve init type 2022-05-04 21:26:48 +02:00
net AstGen: fix loop control flow applying to wrong loop 2022-07-13 16:10:41 -07:00
os std.os.uefi: mark BlockIoProtocol and EfiBlockMedia as public 2022-09-09 16:48:54 +03:00
rand std.rand: make weightedIndex proportions param a const slice 2022-08-30 13:02:17 +03:00
target std: rename std.Target.systemz to .s390x 2022-07-28 23:22:44 -07:00
testing Move sys_can_stack_trace from GPA to std.debug so that it can be re-used as needed 2022-06-25 21:27:56 -07:00
Thread stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
time std.time.epoch: fix issue in documentation 2021-12-16 19:08:58 -08:00
tz Support legacy TZ format, expose header struct to a potential writer 2022-01-01 12:47:08 +00:00
unicode migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
valgrind std.valgrind.callgrind: fix string type 2022-08-22 13:55:00 +03:00
x std.fmt: require specifier for unwrapping ?T and E!T 2022-07-26 11:25:49 -07:00
zig std.zig.system.NativeTargetInfo: more headroom for libc.so.6 .dynstr 2022-09-09 09:27:02 -07:00
array_hash_map.zig Sema: solve a false positive "depends on itself" 2022-05-06 22:40:57 -07:00
array_list.zig link.MachO: use accurate alignment attribute on pointers 2022-08-10 22:28:05 -07:00
ascii.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
atomic.zig std.Thread.Futex improvements (#11464) 2022-04-19 19:42:15 -05:00
base64.zig std.base64: upgrade to new function pointer semantics 2022-03-30 20:38:01 -07:00
bit_set.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
bounded_array.zig AstGen: detect declarations shadowing locals 2022-08-16 20:35:03 +03:00
buf_map.zig reverse some of the now unneeded changes from squeek 2022-05-11 18:41:23 -06:00
buf_set.zig std.BufSet.clone: fix key ownership 2022-03-01 13:28:47 -05:00
build.zig std.zig.system.NativeTargetInfo: detection ignores self exe 2022-09-08 20:52:49 -07:00
builtin.zig make self-hosted the default compiler 2022-08-19 16:45:15 -07:00
c.zig Sema: add error for non-comptime param in comptime func 2022-08-27 11:17:48 +03:00
child_process.zig Compilation: handle system C compiler not found 2022-09-11 16:37:03 -07:00
coff.zig coff: add import table definitions 2022-08-31 19:30:51 +02:00
compress.zig stage2: small fixes + adjustments to std tests 2022-06-11 23:49:33 +03:00
comptime_string_map.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
crypto.zig crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866) 2022-07-01 13:18:08 +02:00
cstr.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
debug.zig std.debug: DWARFv5 fixes 2022-08-23 21:11:02 -07:00
dwarf.zig std.debug: DWARFv5 fixes 2022-08-23 21:11:02 -07:00
dynamic_library.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
elf.zig Sema: add error for non-comptime param in comptime func 2022-08-27 11:17:48 +03:00
enums.zig std.enums: make directEnumArrayLen public 2022-08-05 15:41:03 +03:00
event.zig std, compiler-rt: remove test names where applicable 2021-09-01 17:54:06 -07:00
fifo.zig allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
fmt.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
fs.zig std.fs: Fix WalkerEntry.dir not always being the containing dir 2022-08-15 11:25:51 +03:00
hash.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
hash_map.zig std: fix missing hash map safety 2022-04-20 17:18:06 -07:00
heap.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
http.zig std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
io.zig libstd: use windows.GetStdHandle() with stage2_x86_64 backend for now 2022-09-07 22:42:57 +02:00
json.zig std.json: expose encodeJsonString and encodeJsonStringChars 2022-07-24 11:51:59 +03:00
leb128.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
linked_list.zig remove redundant license headers from zig standard library 2021-08-24 12:25:09 -07:00
log.zig Using comptime level.asText() in log example 2022-08-31 16:01:35 +03:00
macho.zig macho: add missing align cast in LoadCommandIterator 2022-08-03 21:19:41 +02:00
math.zig Merge pull request #12574 from Vexu/remove-bit-op-type-param 2022-08-24 15:57:44 -04:00
mem.zig docs: remove confusion about align[For|Back]ward 2022-08-24 17:18:29 -04:00
meta.zig Sema: add error for non-comptime param in comptime func 2022-08-27 11:17:48 +03:00
multi_array_list.zig Sema: add error for non-comptime param in comptime func 2022-08-27 11:17:48 +03:00
net.zig std.mem: add first method to SplitIterator and SplitBackwardsIterator 2022-07-25 22:04:30 +03:00
once.zig std.Thread.Mutex: change API to lock() and unlock() 2021-11-09 18:31:03 -07:00
os.zig Add AFNOSUPPORT error to bind (#12560) 2022-09-01 15:13:07 -05:00
packed_int_array.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
pdb.zig libstd: fix off-by-one error in def of ProcSym in pdb 2022-08-17 16:36:02 -04:00
priority_dequeue.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
priority_queue.zig PriorityQueue: use compareFn in update() 2022-07-22 19:25:38 +03:00
process.zig std.mem: add first method to SplitIterator and SplitBackwardsIterator 2022-07-25 22:04:30 +03:00
Progress.zig std.Progress.log: adjust API 2022-05-26 21:58:19 -07:00
rand.zig std.rand: make weightedIndex proportions param a const slice 2022-08-30 13:02:17 +03:00
segmented_list.zig std: disable tests that crash stage2 2022-06-03 20:21:20 +03:00
SemanticVersion.zig std.mem: add first method to SplitIterator and SplitBackwardsIterator 2022-07-25 22:04:30 +03:00
simd.zig std.simd: change T to u16 2022-09-07 15:22:30 +03:00
sort.zig std: add sort method to ArrayHashMap and MultiArrayList 2022-03-10 13:13:17 -05:00
start.zig coff: re-enable default entrypoint for Windows 2022-09-07 22:42:55 +02:00
start_windows_tls.zig stage1, stage2: rename c_void to anyopaque (#10316) 2021-12-19 00:24:45 -05:00
std.zig std: add http definitions for Method and Status (#10661) 2022-05-11 15:43:18 -04:00
target.zig improved ABI alignment/size for >= 128-bit integers 2022-08-18 20:34:36 -07:00
testing.zig std.testing: make the caret indicator line more helpful 2022-07-25 15:51:22 +03:00
Thread.zig std.Thread: fix freeAndExit on x86_64-linux (#12693) 2022-08-30 22:31:47 -04:00
time.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
treap.zig treap: zig fmt 2022-04-15 17:01:01 -05:00
tz.zig std.tz: fix function returning pointer to local variable 2022-06-17 21:04:21 +03:00
unicode.zig Sema: handle tuple and anon_struct in resolveTypeFully 2022-06-11 11:02:56 +03:00
valgrind.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
wasm.zig wasm: Implement memset, and sret arguments. 2022-01-04 17:59:05 +01:00
x.zig stage2: small fixes + adjustments to std tests 2022-06-11 23:49:33 +03:00
zig.zig std.Target gains ObjectFormat field 2022-08-18 18:58:28 -07:00