4210 Commits

Author SHA1 Message Date
Zhaofeng Li
1aa60261f6 cmake: Make Python 2 bytecode pre-compilation optional
This affects performance while preserving compatibility.

Ref: #1074
2023-04-23 16:22:37 -06:00
Zhaofeng Li
8fa8c70d7d wrapgen: Fix address resolution in dynamic section
The values are addresses which aren't necessarily equal to file
offsets.
2023-04-22 21:42:00 -06:00
Ariel Abreu
759f5479a6
Update darlingserver
This should allow Darling to compile with Clang 15
2023-04-21 18:16:06 -04:00
Ariel Abreu
39b0f38c24
Add libcap2-bin to Debian build deps
We need it for the setcap executable
2023-04-14 19:50:52 -04:00
Ariel Abreu
9797e2d32a
Build Darling on a faster private CI machine
This machine is not always available, but when it is,
it's much faster (about 5-10 mins) than both the
GitHub Actions CI (3+ hours) and the old private CI machine (1+ hour).
2023-04-14 19:07:46 -04:00
Ariel Abreu
84a6ae50d4
Update Cocotron and Metal; get rid of Vulkan and LLVM wrappers 2023-04-12 15:11:35 -04:00
Ariel Abreu
b811648393
Make Metal an optional part of the build
The new `ENABLE_METAL` option can be set to `ON`/truthy, `OFF`/falsy,
or `AUTO` (the default). When set to `AUTO`, Metal support will only be
enabled if LLVM and Vulkan are available.

Note that even if Metal support is compiled-in, Metal will only be
available at runtime if LLVM and Vulkan are available. This also means
that you can build Darling on a host with LLVM and Vulkan available and
install it on machines without these libraries available with no issue
(the only effect would be that Metal would be unavailable at runtime on
these machines).
2023-04-12 15:10:59 -04:00
Ariel Abreu
bf3abfb1c9
Be smarter about how we find libLLVM.so
On some distros, LLVM is not placed in the root of `/usr/lib` and is
kept in a versioned subdirectory instead. Regardless of what the case
is, llvm-config should give us the right path.

*This* should finally fix the CI build.
2023-04-12 14:59:43 -04:00
Ariel Abreu
53447d925a
[debian] Add LLVM and Vulkan as dependencies
This should hopefully fix the CI build as well
2023-04-10 07:26:16 -04:00
Ariel Abreu
2d3b258851
More work on Metal support
Basic rendering works! (kind of; see the Cocotron commit for more details)
2023-04-10 07:26:15 -04:00
Ariel Abreu
876dea3a13
Start work on an actual Metal implementation 2023-04-10 07:26:15 -04:00
Ariel Abreu
34c9b22112
Various fixes and improvements for darling-coredump
These changes, most notably the last one, should greatly improve the
reliability of core dumps produced with `darling-coredump`.

  * Mark areas with `protection == 0` as invalid. These regions aren't
    supposed to be accessed anyways, so we might as well not dump them.
  * Add a few debugging options: `DUMP_FLOAT_STATE` to enable/disable
    dumping floating-point state, `ALIGN_REGIONS` to enable/disable
    page-aligning dumped regions, and `INVALIDATE_DEVICES` to
    enable/disable marking devices (in `/dev`) as invalid regions.
  * Continuously retry file writes in `dump_emit` until the entire
    buffer has been written. It's possible for the `write` system call
    to simply write fewer bytes than what we give it for absolutely no
    reason at all (well, it's because of write buffering, but that's not
    something we control, so it's seemingly arbitrary to us). Therefore,
    to ensure we write the full buffer in as many cases as possible, we
    have to retry the `write` syscall until we either get a fatal error
    or finish writing the contents.
  * Always dump memory regions according to memory size, not file size.
    As explained in a comment, LLDB assumes that contiguous memory
    regions are also contiguous in the file. This is a reasonable
    assumption, but it means that regions whose memory size is larger
    than their file size have to be manually zero-extended in the file
    to match their memory size. I actually had to clone LLDB and build
    it locally and debug it (with LLDB) to figure out that this is what
    it was doing and why it was loading an otherwise-correct core dump
    improperly.
2023-04-10 07:25:30 -04:00
Thomas A
fc46ad2138 Fix parameter name omitted Build Issue 2023-03-29 14:57:30 -07:00
Ariel Abreu
46443de5e2
Fix NT_PRSTATUS handling for i386
Of course, on 32-bit architectures, all the fields in the structure are
32-bit as well, so we need to use a separate structure for them.
2023-03-29 08:01:49 -04:00
Ariel Abreu
d7b8f39262
WIP work on 32-bit core dump support
`darling-coredump` can now process 32-bit core dumps, but it doesn't seem
to produce anything usable (LLDB says the code memory is missing in the
core dump).
2023-03-28 22:47:20 -04:00
Thomas A
e56511bd14 Add Configuration To Load Core Dumps In VSCode Debugger 2023-03-28 11:37:49 -07:00
Thomas A
b23cfe93d3 Fix Creating Default Output Path If File Is Not In CWD 2023-03-28 11:31:36 -07:00
Thomas A
7e4c0fd8ac Don't Forget To Initalize "cprm.input_header" 2023-03-28 11:19:13 -07:00
Thomas A
eda3a0433a Add Launch Option For Run darling-coredump With Debugging 2023-03-28 08:33:36 -07:00
Thomas A
bc76af482c Add A Union Between Elf32/Elf64 Structs. Create Universal Elf Header Struct.
Also did some minor reorganization.
2023-03-28 08:33:35 -07:00
Thomas A
72d78ef5cb Update cocotron Submodule 2023-03-27 11:26:53 -07:00
Thomas A
0e2e52330d Update cocotron Submodule 2023-03-27 11:23:26 -07:00
CuriousTommy
34b70f1489
Merge pull request #1342 from genkiinstruments/imageio-missing-symbols
Add missing symbols for ImageIO
2023-03-22 08:44:55 -07:00
CuriousTommy
8fe0d106fb
Merge pull request #1341 from genkiinstruments/coreservices-unicodeconverter-missing-symbols
Add stubs/missing symbols for UnicodeConverter
2023-03-22 08:43:50 -07:00
Daniel Gretarsson
2392e20365 Add missing symbols for ImageIO 2023-03-20 10:32:23 +00:00
Daniel Gretarsson
828d349897 Add stubs/missing symbols for UnicodeConverter 2023-03-20 10:10:52 +00:00
CuriousTommy
aad6cca9ad
Merge pull request #1340 from genkiinstruments/coremidi-missing-symbols
Add definitions for missing constants in CoreMIDI
2023-03-17 09:52:46 -07:00
CuriousTommy
58271e8fdc
Merge pull request #1339 from genkiinstruments/coreaudio-missing-symbols
Add stubs for some missing symbols in CoreAudio and AudioToolbox
2023-03-17 05:39:39 -07:00
Daniel Gretarsson
1655ecefbf Add definitions for missing constants in CoreMIDI 2023-03-17 11:08:38 +00:00
Daniel Gretarsson
148dffda89 Add stubs for some missing symbols in CoreAudio and AudioToolbox 2023-03-17 11:05:09 +00:00
Ariel Abreu
777190a1cf
[xtrace] Add support for i386 2023-03-14 12:35:18 -04:00
Ariel Abreu
aba64a6800
Update darlingserver 2023-03-14 11:24:10 -04:00
Ariel Abreu
ffd98b5cd2
Update darlingserver 2023-03-13 13:40:20 -04:00
Ariel Abreu
00719259eb
Fix up Linux socket definitions to use arch-dependent types
This is how the structures are actually defined, so this is what we need
to be correct on all architectures (e.g. i386).
2023-03-13 13:40:14 -04:00
Thomas A
b9f13c040a Update dylib Files In SDK To Fix Generating JavaScriptCore Assembly 2023-03-11 05:48:27 -08:00
CuriousTommy
1b5d753391
Merge pull request #1332 from darlinghq/update_javascriptcore_sdk
Update JavaScriptCore SDK Include Path
2023-03-08 08:47:41 -08:00
Thomas A
dd92c559ec Update JavaScriptCore SDK Include Path 2023-03-08 08:38:00 -08:00
CuriousTommy
d17129b2f1
Merge pull request #1331 from darlinghq/update_heimdal_sdk
[Heimdal] Update SDK Path
2023-03-05 05:52:25 -08:00
Thomas A
33e72be050 [Heimdal] Update SDK Path 2023-03-04 23:36:44 -08:00
CuriousTommy
7af33066af
Merge pull request #1326 from darlinghq/relocate_xar
Add xar Submodule
2023-02-26 21:10:54 -08:00
Thomas A
8bb7f7bdd5 Add xar Submodule. Fix Building. 2023-02-26 16:11:29 -08:00
Thomas A
8a98154f41 Remove xar From Darling Repo 2023-02-26 15:52:35 -08:00
CuriousTommy
a58a00ac08
Merge pull request #1324 from darlinghq/rework_ruby_sdk
Add Ruby.framework To Developer SDK
2023-02-26 15:37:00 -08:00
Thomas A
b6112cb6fa Add Ruby.framework To Developer SDK 2023-02-26 15:23:25 -08:00
CuriousTommy
a82d18d7dc
Merge pull request #1323 from darlinghq/use_mesa_headers
Use Mesa Header Files For OpenGL
2023-02-25 19:36:52 -08:00
Thomas A
6bddc6b512 Add khrplatform.h Header. Change Include From <GL/...> To <OpenGL/...>
Note, khrplatform.h doesn't exist in Apple offical SDK
2023-02-25 15:35:03 -08:00
Thomas A
dcb1be2126 [OpenGL] Use Mesa Header 2023-02-25 14:58:59 -08:00
Sergey Bugaev
3ce9893c6f Update Cocotron 2023-02-24 16:35:56 +03:00
Thomas A
e0be24e323 Update libsystem Submodule 2023-02-20 08:29:29 -08:00
CuriousTommy
0dfc838888
Merge pull request #1313 from darlinghq/add_removefile_submodule
Add removefile submodule
2023-02-20 05:56:21 -08:00