Commit graph

2246 commits

Author SHA1 Message Date
Dominique Liberda d7644d1d86 Meta: Improve build compatibility with non-GNU userspaces
We depend on GNU-specific du switch `--apparent-size`. Busybox has this
implemented, but as `-b` instead.
Another part of the build system uses `cp --preserve=timestamps`. This
can be replaced by `rsync -t`, and rsync is already used through the
file.

Thanks to those changes, Serenity can be built on a Busybox system,
without GNU coreutils.
2023-07-09 06:16:31 +01:00
Dominique Liberda fddbd11baa Meta: Implement proper checks for sudo alternatives
This introduces support for building with doas.
2023-07-09 06:16:31 +01:00
Timothy Flynn c911781c21 Everywhere: Remove needless trailing semi-colons after functions
This is a new option in clang-format-16.
2023-07-08 10:32:56 +01:00
Timothy Flynn 388d455575 Meta: Switch to clang-format-16 as the standard formatter
This includes a few new options to the .clang-format configuration file
to A) adhere to option changes within clang-format 16 (namely the option
AlignTrailingComments), and B) enforce existing style guide rules with
new clang-format rules.
2023-07-08 10:32:56 +01:00
Andrew Kaster aa329cb2f8 IPCCompiler: Add option to pass output file path
Instead of requiring the caller to redirect stdout, let's be nice
citizens and add an option for the output file.
2023-07-07 06:41:51 -04:00
Luke Wilde 165abafb80 LibWeb: Add initial implementation of IntersectionObserver
The main missing features are rootMargin, proper nested browsing
context support and content clip/clip-path support.

This makes images appear on some sites, such as YouTube and
howstuffworks.com.
2023-07-07 05:27:25 +02:00
Jonah e9840bfd4e LibWeb: Build out the ARIA role model
We now have implemented the ARIA role model. These classes will
control which states and properties are exposed to end users.
2023-07-06 11:21:36 +01:00
Sam Atkins 38f954cba5 LibWeb: Generate function for what properties resolve percentages to
This is required by "determine the type of a calculation".
https://www.w3.org/TR/css-values-4/#determine-the-type-of-a-calculation
2023-07-06 09:28:16 +02:00
Timothy Flynn 00d8e221f3 Meta: Support enabling compile-time format string checking on Lagom 2023-07-06 08:55:11 +02:00
Timothy Flynn eed0c32357 IPCMagicLinter: Add missing format parameter to an error log 2023-07-06 08:55:11 +02:00
kleines Filmröllchen d7a2b5e65b markdown-check: Allow generating a manpage link graph
Using the cross-page links, we can generate a directed graph showing the
topology of which pages refer to other pages. This is not just for fun:
the links show how often a page is linked (since links are not
deduplicated on purpose), which pairs of pages only have links in one
direction (where a link in the other direction may be useful), which
groups of closely-interlinked pages exist, and which pages have few or
no links to other pages.

The EXTRA_MARKDOWN_CHECK_ARGS argument to the check-markdown script can
be used to inject the -g flag for generating the graph on all manpages.
2023-07-05 16:15:42 +01:00
kleines Filmröllchen 8df714ff1e Meta/Fuzzers: Extract common audio fuzzing code
Apart from the class used audio fuzzers have identical behavior: Create
a memory stream from the fuzzer input and pass this to the loader, then
try to load audio until an error occurs. Since the loader plugins need
to have the same static create() function anyways for LibAudio itself,
we can unify the fuzzer implementations and reduce code duplication.
2023-07-05 11:58:50 +01:00
Timothy Flynn 260b0451b0 LibLocale: Update to CLDR version 43.1.0
https://cldr.unicode.org/index/downloads/cldr-43#h.qobmda543waj
2023-07-04 07:26:50 +02:00
Nico Weber efad31dac1 Utilities: Add a pdf utility
This utility will learn tricks such as extracting images from PDFs and
dumping tables from PDFs so that we can create code from specs.

It also allows testing LibPDF things in lagom, and allows testing
reading large amounts of PDFs using a shell script.
2023-07-04 06:50:15 +02:00
Sebastian Zaha ef8f0f4f68 Meta: Update path to ladybird in gdb invocation 2023-07-02 18:43:46 +02:00
Andrew Kaster e0cf52b024 CI: Enable detect_stack_use_after_return ASAN option 2023-07-01 07:03:11 +02:00
Andrew Kaster bfd6deed1e AK+Meta: Disable consteval completely when building for oss-fuzz
This was missed in 02b74e5a70

We need to disable consteval in AK::String as well as AK::StringView,
and we need to disable it when building both the tools build and the
fuzzer build.
2023-06-29 15:55:54 -06:00
Lucas CHOLLET 4e0b52d009 Meta: Add a gdb pretty-printer for FixedArray 2023-06-28 08:01:01 +01:00
Daniel 30e67721ae Meta: Fix IDL binding generation for dictionary members
- Previously was generating bad syntax and missed a snakecase conversion
2023-06-28 05:22:51 +02:00
kleines Filmröllchen 5f1dbbaaa6 LibAudio: Extract loader stream creation from the plugins
This removes a lot of duplicated stream creation code from the plugins,
and also simplifies the way that the appropriate plugin is found. This
mirrors the ImageDecoderPlugin design and necessitates new sniffing
methods on the loaders.
2023-06-27 15:28:22 +01:00
implicitfield 1e1fcb2ae7 Meta: Remove unused LLVM_VERSION declaration
All uses of this were removed in c4707ed.
2023-06-27 12:40:38 +02:00
implicitfield 941d68ac2d Toolchain+Ports: Update LLVM to 16.0.6 2023-06-27 12:40:38 +02:00
implicitfield 007f3cdb00 Everywhere: Remove exceptions for using #include <LibC/...>
Once LibC is installed to the sysroot and its conflicts with libc++
are resolved, including LibC headers in such a way will cause errors
with a modern LLVM-based toolchain.
2023-06-27 12:40:38 +02:00
implicitfield 79adeb626b LibC+LibELF: Move ELF definitions from LibC to LibELF
This is needed to avoid including LibC headers in Lagom builds.
Unfortunately, we cannot rely on the build machine to provide a
fully POSIX-compatible ELF header for Lagom builds, so we have to
use our own.
2023-06-27 12:40:38 +02:00
implicitfield ec636a404b Meta: Make check-style.py complain if a non-AK complex header is used
LibC's complex.h should not be used in C++ code, and libc++'s version
implementation does not follow the Serenity C++ style.
2023-06-27 12:40:38 +02:00
Sam Atkins 5056668ab2 Meta: Add lint check that ports have an executable package.sh 2023-06-25 00:18:52 +02:00
Jelle Raaijmakers f619b61b00 Lagom: Link aconv with LibFileSystem 2023-06-22 22:27:03 +02:00
kleines Filmröllchen 0d65e5f518 Meta: Add aconv as a Lagom tool 2023-06-22 21:45:54 +02:00
Andreas Kling 6537ed8fff LibJS/Bytecode: Simplify Bytecode::Interpreter lifetime model
The JS::VM now owns the one Bytecode::Interpreter. We no longer have
multiple bytecode interpreters, and there is no concept of a "current"
bytecode interpreter.

If you ask for VM::bytecode_interpreter_if_exists(), it will return null
if we're not running the program in "bytecode enabled" mode.

If you ask for VM::bytecode_interpreter(), it will return a bytecode
interpreter in all modes. This is used for situations where even the AST
interpreter switches to bytecode mode (generators, etc.)
2023-06-22 21:16:17 +02:00
Andreas Kling 6150960671 Tests: Remove test-bytecode-js
This was meant to be a temporary unit testuntil we could run test-js
in bytecode mode. This has been possible for a long time now, so let's
remove the unnecessary extra program.
2023-06-22 21:16:17 +02:00
Daniel Bertalan 3ee908df27 Meta: Always use the default host compiler for the toolchain on macOS
GCC's build fails in `libisl`'s configure step if `CC` is set to
Homebrew Clang with the message "Link Time Optimisation is not
supported". This is likely due to the fact that it tries to use ranlib
from Xcode, which is not compatible with the newer LLVM version's
bitcode format.

The toolchain build runs after `pick_host_compiler` is called, which
selects Homebrew Clang if the installed Xcode version is too old. We
need to unset `CC` and `CXX` for the toolchain build to sidestep the
issue.
2023-06-21 06:49:54 -04:00
Timothy Flynn 421aa8da1e Meta: Document that clang-15 is required, and update the compiler checks
We require clang-15 for consteval.
2023-06-21 06:49:47 -04:00
Lucas CHOLLET e5685078c1 Meta: Add a gdb pretty-printer for Optional 2023-06-21 06:15:35 +02:00
Timothy Flynn 0fd35b4dd8 Meta: Ignore local includes of .moc files
These are generated by Qt and added to the include path automatically by
CMake.
2023-06-21 06:14:15 +02:00
Cameron Youell 0a0ba4cbc5 Meta: Ignore empty directories in lint-ports
Git doesn't track empty directories, so we can just ignore them
2023-06-19 23:13:36 +02:00
Cameron Youell bc75fa878e Meta: Use Python to parse a port's package.sh in lint-ports
This reduced the runtime of `lint-ports` from 72s down to 0.5s on
my computer (a reduction of ~99.2%)! While it may not be as
accurate as running `package.sh showproperty` it makes using
`precommit` while editing ports much nicer!
2023-06-19 23:13:36 +02:00
implicitfield d4f5e6eb81 Fuzzers: Update the path to fuzzer binaries
This was overlooked in 71b184a, which broke the oss-fuzz configuration.
2023-06-19 07:40:17 -04:00
Ali Mohammad Pur 2e2e535abb Meta: Build LibCpp for Lagom 2023-06-18 20:30:21 +02:00
Tim Ledbetter 586b47cede Kernel: Put loopback adapter debug spam behind a flag
This significantly increases loopback adapter speed in normal use.
2023-06-18 08:50:33 +01:00
Sam Atkins acaf2368ad CodeGenerators: Port GenerateCSSValueID to new SourceGenerator API 2023-06-17 17:48:06 +01:00
Sam Atkins acb600496b CodeGenerators: Port GenerateCSSTransformFunctions to new SourceGen API 2023-06-17 17:48:06 +01:00
Sam Atkins d197b4b051 CodeGenerators: Port GenerateCSSPropertyID to new SourceGenerator API 2023-06-17 17:48:06 +01:00
Sam Atkins e7dd5e5b05 CodeGenerators: Port GenerateCSSMediaFeatureID to new SourceGen API 2023-06-17 17:48:06 +01:00
Sam Atkins 17473e3d5e CodeGenerators: Port GenerateCSSEnums to new SourceGenerator API 2023-06-17 17:48:06 +01:00
Sam Atkins 8e53e5afc4 AK: Propagate errors from SourceGenerator::fork() 2023-06-17 17:48:06 +01:00
Sam Atkins 540cc42618 CodeGenerators: Convert GeneratorUtil to String
I may have got a little carried away propagating some of the errors. :^)
2023-06-17 17:48:06 +01:00
Andreas Kling d063f35afd LibJS/Bytecode: Leave GlobalDeclarationInstantiation in C++
Don't try to implement this AO in bytecode. Instead, the bytecode
Interpreter class now has a run() API with the same inputs as the AST
interpreter. It sets up the necessary environments etc, including
invoking the GlobalDeclarationInstantiation AO.
2023-06-16 08:40:45 +02:00
Sam Atkins 5cdcd135ab LibWeb: Add parsing for CSS <paint> values
This gets rid of a couple of FIXMEs in Properties.json :^)
2023-06-16 07:03:57 +02:00
Timothy Flynn 6520a9a849 LibWeb: Support TrackEvent instances with an AudioTrack track type 2023-06-14 17:54:40 +02:00
Aliaksandr Kalenik edf11b3809 Meta: Exclude cloned WPT repo from linting by check-markdown.sh 2023-06-14 06:45:04 +02:00