summaryrefslogtreecommitdiff
path: root/Meta
AgeCommit message (Collapse)Author
2022-05-17Meta: Validate explicitly set TOOLCHAIN in `serenity.sh`Jelle Raaijmakers
Previously, `serenity.sh rebuild-toolchain x86_64 clang` would simply start building GCC instead and call it a day. With this change, if a toolchain is passed as an argument, it is validated if it is either "GNU" or "Clang" and exits with an error otherwise. The `TOOLCHAIN` value defaults to the `SERENITY_TOOLCHAIN` environment variable if not provided explicitly.
2022-05-14Meta: Move compiler flags into standalone CMake filesLinus Groh
This way we can have all of them in a single place, similar to how we structure options added via the serenity_option() macro.
2022-05-13Meta: Move LibWeb's CMake generation script to its own fileDexesTTP
This patch has no functional changes, but prepares the CMake script to be able to handle LibWeb on Lagom.
2022-05-09Ports: Convert GLTron patches to new formatJelle Raaijmakers
2022-05-08Meta: Remove hardcoded resize2fs executable pathLucas CHOLLET
Let which find the resize2fs executable path for us, and use `/usr/sbin` as a default.
2022-05-07Meta: Fix shellcheck errors in build-image-qemu.shLinus Groh
2022-05-07Meta: Tweak default disk size calculation to not be as gratuitousLinus Groh
Instead of first doubling the required size for the determined inode count and then _also_ tripling the sum of that and the determined disk size, let's be a bit more reasonable and just double the sum of inode count * size and disk size. This results in a 1.4GB _disk_image, instead of the 2GB from before (for < 800MB worth of files).
2022-05-07Meta: Allow overriding the default calculated _disk_image sizeLinus Groh
By providing SERENITY_DISK_SIZE_BYTES as an environment variable, the calculation of default value considered suitable for the size of files and number of inodes that will be included can be sidestepped.
2022-05-07CI: Ensure that Azure nightly pipeline doesn't run on CI or PR triggersAndrew Kaster
GitHub YAML pipelines have both of these on by default, so we need to explicitly disable them.
2022-05-07CI: Use proper paths to template files in nightly-pipeline.ymlAndrew Kaster
Azure paths are relative to the pipeline file. Addtionally, pipeline stages can't have spaces or parentheses in them
2022-05-07Ports/mrsh: Fix workdir, remove or upgrade patchesEWouters
Also removes mrsh from the list of ports missing descriptions. I tried to be descriptive about the patches, but as I picked this port up from someone else, I'm not 100% sure how to best explain the patches.
2022-05-06Meta: Use VMWare SVGA adapter if running QEMU Q35 machineLiav A
This let us test the VMWare SVGA adapter easily. We already use the std vga (which is compatible with bochs-display that only lacks VGA support) on the i440FX QEMU machine so we keep testing it there too, and on the Q35 machine we use a bochs-display device as secondary display.
2022-05-02CI: Add x86_64 Clang Coverage pipeline in AzureAndrew Kaster
Add a job to the Azure pipelines to run tests with coverage enabled, and aggregate the test results in a folder of html pages showing the coverage results overall, and per-file. Future work is needed to take the published pipeline artifact for the coverage results and display them somewhere interesting.
2022-05-02Meta: Add script to analyze coverage data from an existing disk imageAndrew Kaster
The analyze-qemu-coverage.sh script cracks open the _disk_image for the given SERENITY_ARCH and SERENITY_TOOLCHAIN and extracts llvm profile data into a local directory owned by the current user. It then calls a coverage artifact script from llvm to create a nice html report for all the source files referenced by the profile data files. We currently grab a script from llvm via wget. In the future a custom script to call llvm-cov and llvm-profdata should probably be used.
2022-05-02Meta+Userland: Add ENABLE_USERSPACE_COVERAGE_COLLECTION CMake optionAndrew Kaster
This option sets -fprofile-instr-generate -fcoverage-mapping for Clang builds only on almost all of Userland. Loader and LibTimeZone are exempt. This can be used for generating code coverage reports, or even PGO in the future.
2022-05-02Meta: Remove unused serenity_libc_static helper functionAndrew Kaster
2022-04-27AK: Put invalid UTF8 debug spam behind a flagkleines Filmröllchen
This is very annoying if we're (intentionally) passing invalid UTF8 into Utf8View.
2022-04-26Meta: Re-enable automatic virtualization detection on Windowskleines Filmröllchen
Before, we wouldn't enable virtualization on Windows anymore unless SERENITY_VIRTUALIZATION_SUPPORT was set explicitly. As far as we know, there's no automatic way of detecting whether WHPX is enabled or not. So we'll just enable virtualization on Windows by default, and if that doesn't work the user can still disable it manually with SERENITY_VIRTUALIZATION_SUPPORT=0.
2022-04-26Meta: Allow Clang to be used as the host compiler for LagomDaniel Bertalan
Various Clang binaries are now considered when choosing the compiler for Lagom. The selection precedence is as follows: 1. Use the compiler set via CC/CXX if it's a supported version 2. Use newest available GCC if it's supported 3. Use newest available Clang if it's supported Note that Apple Clang is still not supported, as its versioning scheme and the fact that it masquerades as both GCC and Clang would complicate this logic even more. Fixes #12253
2022-04-23CI: Update the path to our LLVM patchesDaniel Bertalan
The LLVM patch has been broken up into smaller commits and moved to a separate directory. CI should look at this new location to determine if the toolchain needs to be rebuilt.
2022-04-23Meta: Use clang-format from the Clang toolchain if availableDaniel Bertalan
2022-04-23Toolchain+Ports: Update LLVM to 14.0.1Daniel Bertalan
Besides a version bump, the following changes have been made to our toolchain infrastructure: - LLVM/Clang is now built with -march=native if the host compiler supports it. An exception to this is CI, as the toolchain cache is shared among many different machines there. - The LLVM tarball is not re-extracted if the hash of the applied patches doesn't differ. - The patches have been split up into atomic chunks. - Port-specific patches have been integrated into the main patches, which will aid in the work towards self-hosting. - <sysroot>/usr/local/lib is now appended to the linker's search path by default. - --pack-dyn-relocs=relr is appended to the linker command line by default, meaning ports take advantage of RELR relocations without any patches or additional compiler flags. The formatting of LLVM port's package.sh has been bothering me, so I also indented the arguments to the CMake invocation.
2022-04-23Meta: Rename SERENITY_KVM_SUPPORT -> SERENITY_VIRTUALIZATION_SUPPORTkleines Filmröllchen
2022-04-23Meta: Use SERENITY_KVM_SUPPORT to also toggle virtualization on Windowskleines Filmröllchen
It's sometimes nice to turn off virtualization, even on Windows :^)
2022-04-21LibAudio+Userland: Use new audio queue in client-server communicationkleines Filmröllchen
Previously, we were sending Buffers to the server whenever we had new audio data for it. This meant that for every audio enqueue action, we needed to create a new shared memory anonymous buffer, send that buffer's file descriptor over IPC (+recfd on the other side) and then map the buffer into the audio server's memory to be able to play it. This was fine for sending large chunks of audio data, like when playing existing audio files. However, in the future we want to move to real-time audio in some applications like Piano. This means that the size of buffers that are sent need to be very small, as just the size of a buffer itself is part of the audio latency. If we were to try real-time audio with the existing system, we would run into problems really quickly. Dealing with a continuous stream of new anonymous files like the current audio system is rather expensive, as we need Kernel help in multiple places. Additionally, every enqueue incurs an IPC call, which are not optimized for >1000 calls/second (which would be needed for real-time audio with buffer sizes of ~40 samples). So a fundamental change in how we handle audio sending in userspace is necessary. This commit moves the audio sending system onto a shared single producer circular queue (SSPCQ) (introduced with one of the previous commits). This queue is intended to live in shared memory and be accessed by multiple processes at the same time. It was specifically written to support the audio sending case, so e.g. it only supports a single producer (the audio client). Now, audio sending follows these general steps: - The audio client connects to the audio server. - The audio client creates a SSPCQ in shared memory. - The audio client sends the SSPCQ's file descriptor to the audio server with the set_buffer() IPC call. - The audio server receives the SSPCQ and maps it. - The audio client signals start of playback with start_playback(). - At the same time: - The audio client writes its audio data into the shared-memory queue. - The audio server reads audio data from the shared-memory queue(s). Both sides have additional before-queue/after-queue buffers, depending on the exact application. - Pausing playback is just an IPC call, nothing happens to the buffer except that the server stops reading from it until playback is resumed. - Muting has nothing to do with whether audio data is read or not. - When the connection closes, the queues are unmapped on both sides. This should already improve audio playback performance in a bunch of places. Implementation & commit notes: - Audio loaders don't create LegacyBuffers anymore. LegacyBuffer is kept for WavLoader, see previous commit message. - Most intra-process audio data passing is done with FixedArray<Sample> or Vector<Sample>. - Improvements to most audio-enqueuing applications. (If necessary I can try to extract some of the aplay improvements.) - New APIs on LibAudio/ClientConnection which allows non-realtime applications to enqueue audio in big chunks like before. - Removal of status APIs from the audio server connection for information that can be directly obtained from the shared queue. - Split the pause playback API into two APIs with more intuitive names. I know this is a large commit, and you can kinda tell from the commit message. It's basically impossible to break this up without hacks, so please forgive me. These are some of the best changes to the audio subsystem and I hope that that makes up for this :yaktangle: commit. :yakring:
2022-04-21LibCore: Introduce SharedSingleProducerCircularQueuekleines Filmröllchen
This new class with an admittedly long OOP-y name provides a circular queue in shared memory. The queue is a lock-free synchronous queue implemented with atomics, and its implementation is significantly simplified by only accounting for one producer (and multiple consumers). It is intended to be used as a producer-consumer communication datastructure across processes. The original motivation behind this class is efficient short-period transfer of audio data in userspace. This class includes formal proofs of several correctness properties of the main queue operations `enqueue` and `dequeue`. These proofs are not 100% complete in their existing form as the invariants they depend on are "handwaved". This seems fine to me right now, as any proof is better than no proof :^). Anyways, the proofs should build confidence that the implemented algorithms, which are only roughly based on existing work, operate correctly in even the worst-case concurrency scenarios.
2022-04-20Meta: Allow setting a host IP address to bind toTim Schumacher
2022-04-20Meta: Commonize network device settingsTim Schumacher
2022-04-18Base: Add some default completions to shellrcAli Mohammad Pur
2022-04-18LibWeb: Generate some metadata about transform functionsSam Atkins
This will be used to parse and validate their parameters.
2022-04-18LibWeb: Generate TransformFunction to/from string functionsSam Atkins
2022-04-18LibWeb: Add code generator for CSS transform functionsSam Atkins
This first step just generates the TransformFunction enum, but more will follow.
2022-04-17Meta: Keep timestamps of manually copied toolchain outputTim Schumacher
2022-04-17Tests: Implement reference image testing for LibGLJelle Raaijmakers
Each LibGL test can now be tested against a reference QOI image. Initially, these images can be generated by setting `SAVE_OUTPUT` to `true`, which will save a bunch of QOI images to `/home/anon`.
2022-04-16LibCore+Everywhere: Make Core::Stream read_line() return StringViewSam Atkins
Similar reasoning to making Core::Stream::read() return Bytes, except that every user of read_line() creates a StringView from the result, so let's just return one right away.
2022-04-16LibCore+Everywhere: Make Core::Stream::read() return BytesSam Atkins
A mistake I've repeatedly made is along these lines: ```c++ auto nread = TRY(source_file->read(buffer)); TRY(destination_file->write(buffer)); ``` It's a little clunky to have to create a Bytes or StringView from the buffer's data pointer and the nread, and easy to forget and just use the buffer. So, this patch changes the read() function to return a Bytes of the data that were just read. The other read_foo() methods will be modified in the same way in subsequent commits. Fixes #13687
2022-04-14LibWeb: Use generated enum code for property value validationSam Atkins
This has the nice benefit of removing a lot of duplicated lists of values from Properties.json. :^)
2022-04-14LibWeb: Assign an underlying type to generated CSS enumsSam Atkins
I'm *pretty* sure that even a u32 would be overkill but you never know with CSS specs.
2022-04-14LibWeb: Generate and use to_string(css_enum) functionsSam Atkins
The only one that's actually used is for Repeat, but it's easy to generate them so might as well. :^)
2022-04-14LibWeb: Generate to_value_id() functionsSam Atkins
2022-04-14LibWeb: Generate ValueID-to-enum conversion functionsSam Atkins
2022-04-14LibWeb: Add a new code generator for CSS enumsSam Atkins
Alias values are represented by "alias-name=real-name". We have a lot of repetitive code for converting between ValueID and property-specific enums. Let's see if we can generate it. :^) This first step just produces the enums, from a JSON file. The values in there are a duplication of what's in Properties.json, but eventually those will go away.
2022-04-12LibWeb: Move CSS Parser into new Web::CSS::Parser namespaceSam Atkins
The goal here is to move the parser-internal classes into this namespace so they can have more convenient names without causing collisions. The Parser itself won't collide, and would be more convenient to just remain `CSS::Parser`, but having a namespace and a class with the same name makes C++ unhappy.
2022-04-11Ports/pt2-clone: Update pt2-clone to version 1.43EWouters
Upgrade patches to git style, add ReadMe.md and remove from the list of ports missing descriptions.
2022-04-11Ports/klong: Update klong to version 20220315EWouters
Upgrade patch to git style, add ReadMe.md and remove from the list of ports missing descriptions.
2022-04-11Ports/gawk: Update gawk to version 5.1.1EWouters
The patch for config.sub is no longer required. This also removes gawk from the list of ports missing descriptions as it no longer has any patches.
2022-04-11Ports/diffutils: Update diffutils to version 3.8EWouters
The fnmatch patch that was added in 6de6dff is reverted because it is not clear why it is necessary, as discussed in #9206. This also removes diffutils from the list of ports missing descriptions as it no longer has any patches.
2022-04-09Meta/Lagom: Add a fuzzer for the WOFF parserSimon Wanner
2022-04-09LibGfx: Add a loader the Web Open Font Format (WOFF)Simon Wanner
This format is 'just' a zlib compressed wrapper for TrueType/OpenType which makes implementing it rather convenient. :^)
2022-04-09LibGfx: Move other font-related files to LibGfx/Font/Simon Wanner