Commit graph

2497 commits

Author SHA1 Message Date
Justine Tunney
bb06230f1e
Avoid linker conflicts on DescribeFoo symbols
These symbols belong to the user. It caused a confusing error for Blink.
2024-08-24 18:10:22 -07:00
Justine Tunney
38cc4b3c68
Get rid of some legacy code 2024-08-24 17:53:30 -07:00
Justine Tunney
37ca1badaf
Make Emacs load 2x faster 2024-08-23 20:08:05 -07:00
Justine Tunney
1a9f82bc9f
Romanize Hindi, Yiddish, Arabic, Cyrillic, etc. 2024-08-20 16:27:16 -07:00
Justine Tunney
df1aee7ce5
Upgrade superconfigure and monorepo toolchain
See #1260
2024-08-20 08:46:21 -07:00
Justine Tunney
2d44142444
Get Meson builds working
See #917
2024-08-19 08:40:18 -07:00
Justine Tunney
4bbc16e2cc
Add helpful error messages 2024-08-19 07:28:49 -07:00
Justine Tunney
863c704684
Add string similarity function 2024-08-17 16:45:07 -07:00
Justine Tunney
60e697f7b2
Move LoadZipArgs() to cosmo.h 2024-08-17 12:06:27 -07:00
Justine Tunney
4389f4709a
Expose wmempcpy() to _GNU_SOURCE 2024-08-17 08:13:22 -07:00
Justine Tunney
ca2c30c977
Release redbean v3.0.0 2024-08-17 06:45:35 -07:00
Justine Tunney
eb6e96f036
Change InfoZIP to not auto-append .zip to pathname 2024-08-17 06:45:23 -07:00
Justine Tunney
77be460290
Make Windows REPLs great again 2024-08-17 06:32:10 -07:00
Justine Tunney
8e14b27749
Make fread() more consistent with glibc 2024-08-17 02:57:22 -07:00
Justine Tunney
1d532ba3f8
Disable some anti-Musl Lua tests 2024-08-17 02:20:08 -07:00
Justine Tunney
b2a1811c01
Add missing pragma 2024-08-16 21:49:28 -07:00
Justine Tunney
2eda50929b
Add stdfloat header
Fixes #1260
2024-08-16 21:38:00 -07:00
Justine Tunney
098638cc6c
Fix pthread_kill_test flake on qemu 2024-08-16 21:18:26 -07:00
Justine Tunney
732554ce3a
Release Cosmopolitan v3.7.1 2024-08-16 11:56:47 -07:00
Gavin Hayes
914d521090
Fix relative Windows path normalization (#1261)
Fixes #1223
2024-08-16 11:55:49 -07:00
Justine Tunney
11d9fb521d
Make atomics faster on aarch64
This change implements the compiler runtime for ARM v8.1 ISE atomics and
gets rid of the mandatory -mno-outline-atomics flag. It can dramatically
speed things up, on newer ARM CPUs, as indicated by the changed lines in
test/libc/thread/footek_test.c. In llamafile dispatching on hwcap atomic
also shaved microseconds off synchronization barriers.
2024-08-16 11:14:46 -07:00
Justine Tunney
de0cde8def
Release Cosmopolitan v3.7.0 2024-08-16 07:43:10 -07:00
Justine Tunney
5bd22aef12
Experiment with supporting Windows Arm64 natively
So far I haven't found any way to run native Arm64 code on Windows Arm64
without using MSVC. When I build a PE binary from scratch that should be
a valid Windows Arm64 program, the OS refuses to run it. Possibly due to
requiring additional content like XML manifests or relocation or control
flow integrity data that isn't normally required on x64. I've also tried
using VirtualAlloc2() to JIT an Arm64 native function, but VirtualAlloc2
always fails with invalid parameter. I tried using MSVC to create an ARM
DLL that my x64 emulated program can link at runtime, to pass a function
pointer with ARM code, but LoadLibrary() rejects ARM DLLs as invalid exe

The only option left, is likely to write a new program like ape/ape-m1.c
which can be compiled by MSVC to load and run an AARCH64 ELF executable.
The emulated x64 binary would detect emulation using IsWow64Process2 and
then drop the loader executable in a temporary folder, and re-launch the
original executable, using the Arm64 segments of the cosmocc fat binary.
2024-08-16 06:43:59 -07:00
Justine Tunney
1671283f1a
Avoid clobbering errno 2024-08-15 23:54:14 -07:00
Justine Tunney
0a79c6961f
Make malloc scalable on all platforms
It turns out sched_getcpu() didn't work on many platforms. So the system
call now has tests and is well documented. We now employ new workarounds
on platforms where it isn't supported in our malloc() implementation. It
was previously the case that malloc() was only scalable on Linux/Windows
for x86-64. Now the other platforms are scalable too.
2024-08-15 23:32:53 -07:00
Justine Tunney
3fd275f59f
Import optimized routines changes to exp10 2024-08-15 18:37:33 -07:00
Justine Tunney
2045e87b7c
Fix build issues 2024-08-15 18:37:33 -07:00
Jacob Hummer
24666e121d
add nightly cosmocc (artifact) builds (#1254)
Using https://nightly.link/ with GitHub actions artifacts you can have a
nightly build (but not a _release_ -- there's no releasing or
pre-releasing happening) of cosmocc.

Example URL if this PR were merged:


https://nightly.link/jart/cosmopolitan/workflows/nightly-cosmocc/master/cosmocc.zip

Or you can just download it directly from the GitHub "Actions"
https://github.com/jart/cosmopolitan/actions workflow summary page of a
particular run

example from my own fork:


![image](https://github.com/user-attachments/assets/8ba708dd-8289-4f8b-932c-cf535ee86f62)
could download by clicking on the artifact

or by using third-party service to provide a link for unauthenticated
requests (like wget or curl)

https://nightly.link/jcbhmr/cosmopolitan/workflows/tool-cosmocc-package-sh/master/cosmocc.zip

this would be useful for users who don't want to or can't figure out how
to build cosmocc themselves (like Windows) but still want to use a
nightly build since a fix hasn't been released as a release version yet.

this would also be a good way to test the release process but instead of
pushing the `cosmocc.zip` to _wherever it goes now_ you publish it as a
github actions artifact for the very few nightly bleeding edge users to
use & test.

you don't have to use https://nightly.link or recommend it or anything;
i just know its a cool way to wget or curl the URLs instead of
downloading it via your browser web UI. particularly useful for
remote/ssh/web-ide development.
2024-08-15 00:47:40 -04:00
Justine Tunney
ff1a0d1c40
Upgrade to superconfigure z0.0.51 2024-08-04 14:59:53 -07:00
Justine Tunney
7f0db3e3b9
Add last commit to .git-blame-ignore-revs 2024-08-04 12:54:30 -07:00
Justine Tunney
31194165d2
Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
Justine Tunney
c265c17d54
Fix the build 2024-08-04 07:08:28 -07:00
Justine Tunney
7499367060
Ignore -Wimplicit-function-declaration in cosmocc 2024-08-03 21:36:36 -07:00
Justine Tunney
3f26dfbb31
Share file offset across execve() on Windows
This is a breaking change. It defines the new environment variable named
_COSMO_FDS_V2 which is used for inheriting non-stdio file descriptors on
execve() or posix_spawn(). No effort has been spent thus far integrating
with the older variable. If a new binary launches the older ones or vice
versa they'll only be able to pass stdin / stdout / stderr to each other
therefore it's important that you upgrade all your cosmo binaries if you
depend on this functionality. You'll be glad you did because inheritance
of file descriptors is more aligned with the POSIX standard than before.
2024-08-03 17:48:00 -07:00
Justine Tunney
761c6ad615
Share file offset across processes
This change ensures that if a file descriptor for an open disk file gets
shared by multiple processes within a process tree, then lseek() changes
will be visible across processes, and read() / write() are synchronized.
Note this only applies to Windows, because UNIX kernels already do this.
2024-08-03 01:39:11 -07:00
Justine Tunney
a80ab3f8fe
Implement bf16 compiler runtime library 2024-08-02 02:04:53 -07:00
Gautham
9ebacb7892
Convert GCC 14 errors back to warnings (#1247)
https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors

Changing these to warnings helps build code with `cosmocc`. Perhaps this
can be a patch to `cosmocc` or skipped entirely.
2024-08-01 21:42:40 -07:00
Justine Tunney
6ac3d3b804
Add precompiled header support to cosmocc 2024-07-31 06:04:41 -07:00
Justine Tunney
f8cfc89eba
Allow -c to be specified with -E in cosmocc 2024-07-31 02:09:15 -07:00
Justine Tunney
4ed4a1095a
Improve build latency 2024-07-31 01:21:27 -07:00
Justine Tunney
8d8aecb6d9
Avoid legacy instruction penalties on x86 2024-07-31 01:02:38 -07:00
Justine Tunney
1fba310e22
Delete mislocated headers 2024-07-31 01:01:00 -07:00
Justine Tunney
bb815eafaf
Update Musl Libc code
We now have implement all of Musl's localization code, the same way that
Musl implements localization. You may need setlocale(LC_ALL, "C.UTF-8"),
just in case anything stops working as expected.
2024-07-30 22:51:29 -07:00
Justine Tunney
d0360bf4bd
Introduce cosmoranlib 2024-07-29 19:18:52 -07:00
Justine Tunney
8cdb3e136b
Check in ruler summation experiments 2024-07-29 18:02:16 -07:00
Justine Tunney
3dab207351
Remove mkfifo() prototype 2024-07-29 07:42:54 -07:00
Justine Tunney
1092d9b7e8
Remove old usages of %n 2024-07-29 01:39:36 -07:00
Justine Tunney
d40acc60b1
Detect more x86 features 2024-07-29 00:16:29 -07:00
Justine Tunney
cf1559c448
Remove __threaded variable 2024-07-28 23:43:30 -07:00
Justine Tunney
01b09bc817
Support printf %n directive 2024-07-28 22:27:06 -07:00