Commit Graph

504 Commits

Author SHA1 Message Date
Timothy Flynn
6675ef3f24 CI+LibLocale: Remove the CLDR from the system 2024-06-16 06:57:08 +02:00
Timothy Flynn
4de8adabac LibLocale: Replace available locale lookups with ICU 2024-06-16 06:57:08 +02:00
Timothy Flynn
1bcc29d0d1 LibJS+LibLocale: Replace Unicode keyword lookups with ICU
Note: All of the changes to the test files in this patch are now aligned
with both Chrome and Firefox.
2024-06-16 06:57:08 +02:00
Timothy Flynn
5e2ee4447e LibJS+LibLocale: Replace plural rules selection with ICU
This uses ICU for all of the Intl.PluralRules prototypes, which lets us
remove all data from our plural rules generator.

Plural rules depend directly on internal data from the number formatter,
so rather than creating a separate Locale::PluralRules class (which will
make accessing that data awkward), this adds plural rules APIs to the
existing Locale::NumberFormat.
2024-06-15 06:57:16 +02:00
Timothy Flynn
7f9ccd39f5 LibJS+LibLocale: Replace relative time formatting with ICU
This uses ICU for all of the Intl.RelativeTimeFormat prototypes, which
lets us remove all data from our relative-time format generator.
2024-06-15 06:57:16 +02:00
Timothy Flynn
f9a7fc6263 LibLocale: Remove the number formatting data generator
The last user of the remaining data (Intl.DurationFormat) no longer
consumes these APIs.
2024-06-14 07:59:42 +02:00
Diego
991759f453 LibWasm: Enable the loop.wast test file 2024-06-13 12:15:20 +02:00
Timothy Flynn
4b3e26c583 LibJS+LibLocale: Replace calendar weekday information with ICU 2024-06-13 07:42:09 +02:00
Timothy Flynn
e2bffe5612 LibJS+LibLocale: Replace time zone display names with ICU 2024-06-13 07:42:09 +02:00
Timothy Flynn
67f3de2320 LibJS+LibLocale: Begin replacing number formatting with ICU
This uses ICU for the Intl.NumberFormat `format` and `formatToParts`
prototypes. It does not yet port the range formatter prototypes.

Most of the new code in LibLocale/NumberFormat is simply mapping from
ECMA-402 types to ICU types. Beyond that, the only algorithmic change is
that we have to mutate the output from ICU for `formatToParts` to match
what is expected by ECMA-402. This is explained in NumberFormat.cpp in
`flatten_partitions`.

This lets us remove most data from our number format generator. All that
remains are numbering system digits and symbols, which are relied upon
still for other interfaces (e.g. Intl.DateTimeFormat). So they will be
removed in a future patch.

Note: All of the changes to the test files in this patch are now aligned
with both Chrome and Safari.
2024-06-10 13:51:51 +02:00
circl
666f7338a0 Meta+AK: Clear out unused debug macro definitions 2024-06-09 10:48:19 +02:00
Timothy Flynn
5f7251fd91 LibJS+LibLocale: Replace list formatting with ICU
This also largely eliminates the need for some ECMA-402 AOs, as is it
all handled internally by ICU (which the spec is basically based on).
2024-06-09 10:47:28 +02:00
Timothy Flynn
9724a25daf LibJS+LibLocale: Replace canonical locales and display names with ICU
Note: We keep locale parsing and syntactic validation as-is. ECMA-402
places additional restrictions on locales above what is required by the
Unicode spec. ICU doesn't provide methods that let us easily check those
restrictions, whereas LibLocale does. Other browsers also implement
their own validators here.

This introduces a locale cache to re-use parsed locale data and various
related structures (not doing so has a non-negligible performance impact
on Intl tests).

The existing APIs for canonicalization and display names are pretty
intertwined, so they must both be adapted at once here. The results of
canonicalization are slightly different on some edge cases. But the
changed results are actually now aligned with Chrome and Safari.
2024-06-09 10:47:28 +02:00
Andreas Kling
2f68e36137 Ladybird: Use fontconfig to choose generic fonts on non-Apple systems
If we get a suggestion from fontconfig, we try those fonts first, before
falling back on the hard coded list of known suitable fonts for each
generic family.
2024-06-08 10:23:36 +02:00
Andrew Kaster
9f25dc6b09 CMake+CI: Remove BUILD_LAGOM=OFF option in favor of LAGOM_TOOLS_ONLY=ON
The far more common configuration for Ladybird is to always build the
Lagom libraries.
2024-06-08 07:58:11 +02:00
Andrew Kaster
1af9e44130 CMake: Use CMAKE_LINKER_TYPE on CMake >= 3.29 2024-06-08 07:58:11 +02:00
Andreas Kling
28d4e326f8 LibGfx: Use the woff2 library to decode WOFF2 font files
This saves us the trouble of maintaining our own implementation,
and instantly brings us to full WOFF2 feature parity with others.

Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
2024-06-07 18:42:12 +02:00
Andrew Kaster
41176a4f4e CMake: Remove Superbuild-specific install rule guard 2024-06-06 12:51:14 -06:00
Andrew Kaster
f55f64755d CMake: Remove ENABLE_LAGOM_LIBWEB and ENABLE_LAGOM_LADYBIRD options 2024-06-06 12:51:14 -06:00
Timothy Flynn
8362c073f3 Everywhere: Remove LibSQL, SQLServer, and the sql REPL :^)
It is now entirely unused and replaced by sqlite3.
2024-06-06 11:27:03 -04:00
Davide Cavalca
9af91eb622 Meta: ENABLE_NETWORK_DOWNLOADS for ca_certificates and public_suffix 2024-06-05 13:03:31 -04:00
Andrew Kaster
90af26e309 Meta+CMake: Remove unused CMake functions and features
Goodbye, serenity_components and Jakt.
2024-06-05 12:23:54 -04:00
Andreas Kling
e70d96e4e7 Everywhere: Remove a lot more things we don't need 2024-06-03 10:53:53 +02:00
Andrew Kaster
9b05fb98f3 CMake: Remove unused files 2024-06-03 10:53:53 +02:00
Tim Ledbetter
1a4fbfe495 Everywhere: Remove references to the kernel 2024-06-03 10:53:53 +02:00
Simon Wanner
2ce61fe6ea LibTextCodec: Add GBK/GB18030 decoder
Includes changes from GB-18030-2022, which are not yet included in the
Encoding Specification, but WebKit, Blink and WPT are already updated.
2024-05-31 07:56:26 +02:00
Matthew Olsson
5740f93ef4 ClangPlugins: Check for strong root fields in GC allocated objects
GC-allocated objects should never have JS::SafeFunction/JS::Handle
fields.

For now the plugin only emits warnings here, as there are many cases
of this occurring in the codebase that aren't trivial to fix. It is also
behind a CMake flag since it is a _very_ loud warning.
2024-05-30 09:29:20 -06:00
Timothy Flynn
398c99e981 Meta: Use SHA-256 verification for downloaded CA certificate files 2024-05-24 08:47:26 -04:00
Timothy Flynn
3b2c8d0af2 Meta: Use SHA-256 verification for downloaded TZDB files 2024-05-24 08:47:26 -04:00
Timothy Flynn
4d65a073b5 Meta: Use SHA-256 verification for downloaded CLDR files 2024-05-24 08:47:26 -04:00
Timothy Flynn
4ce7f49f2f Meta: Use SHA-256 verification for downloaded UCD files 2024-05-24 08:47:26 -04:00
Timothy Flynn
2f4e2436e8 Meta: Download files at configure time a bit more atomically
Download files to a temporary location, then only move the downloaded
file to the real location once the download is complete. This prevents
CMake from being confused about partially-downloaded files, e.g. if
someone presses ctrl+c in the middle of a download.

Note the GN build already behaves this way.
2024-05-24 08:47:26 -04:00
Timothy Flynn
ec63f442f9 Meta: Add support for verifying downloaded files with their SHA-256 hash 2024-05-24 08:47:26 -04:00
Timothy Flynn
473f840142 Meta: Rename a variable in the invoke_generator() utility
This isn't always a "version file".
2024-05-24 08:47:26 -04:00
Andrew Kaster
d51c96d56d CMake: Export targets for Clang Plugins so they can be used by Serenity 2024-05-14 12:46:05 -06:00
Matthew Olsson
4ae7bbda52 Lagom: Add ClangPlugins to the build system 2024-05-13 16:50:54 -06:00
implicitfield
a08d1637e2 Kernel: Add FUSE support
This adds both the fuse device (used for communication between the
kernel and the filesystem) and filesystem implementation itself.
2024-05-07 16:54:27 -06:00
Dan Klishch
ce5813d6ab LibC: Remove libssp_nonshared.a
__stack_chk_fail_local, which libssp_nonshared.a provides, is a relic of
i386 times and is not used on modern architectures.
2024-05-07 16:39:17 -06:00
Andrew Kaster
77e890b15e Meta+Documentation+Ports: Move from C++20 to C++23
Now that oss-fuzz is on a clang commit > the 17.x release candidates,
we can start looking at some shiny new features to enable.
2024-05-06 11:46:28 -06:00
Andrew Kaster
37a0466285 CMake: Resolve FIXMEs related to CMake < 3.20
We already have required this version for quite a while for Lagom,
Ladybird and Serenity. Now that we require it in all of our CMakeLists,
let's scrub for better ways of writing things.
2024-04-30 07:14:17 -06:00
Andrew Kaster
65bfd2ca2d CMake: Bump Superbuild CMake requirement to 3.20
This more closely matches the serenity requirement (3.25), the Lagom
requirement (3.21) and the Ladybird requirement (3.23)
2024-04-30 07:14:17 -06:00
Shannon Booth
22705e3065 LibWeb: Don't generate Bindings/Forward.h
This is no longer used.
2024-04-27 18:29:35 -04:00
Dan Klishch
d8119c4b4a LibLocale: Statically link LibLocaleData into LibLocale 2024-04-21 13:34:04 -06:00
Timothy Flynn
5a3efb8842 LibLocale: Update to CLDR version 45.0.0
https://cldr.unicode.org/index/downloads/cldr-45
2024-04-19 11:00:31 +02:00
Space Meyer
5d89d3090e Kernel: Add KCOV recursion debugging 2024-04-15 21:16:22 -06:00
Andrew Kaster
8c5e64e686 Ladybird+LibWebView: Add mechanism to get Mach task port for helpers
On macOS, it's not trivial to get a Mach task port for your children.
This implementation registers the chrome process as a well-known
service with launchd based on its pid, and lets each child process
send over a reference to its mach_task_self() back to the chrome.

We'll need this Mach task port right to get process statistics.
2024-04-09 16:43:27 -06:00
Timothy Flynn
4c08a1e0c0 Meta: Remove serenity_lib_static() CMake helper function
Its one user (LibMain) can now just specify a STATIC library type in an
invocation of serenity_lib().
2024-03-26 12:25:21 -04:00
Timothy Flynn
d1e2d2a4df Meta: Allow specifying the library type when invoking serenity_lib()
This will allow creating object libraries with this function.
2024-03-26 12:25:21 -04:00
Nico Weber
1ab28276f6 LibGfx: Add the start of a JPEG2000 loader
JPEG2000 is the last image format used in PDF filters that we
don't have a loader for. Let's change that.

This adds all the scaffolding, but no actual implementation yet.
2024-03-25 20:35:00 +01:00
Timothy Flynn
91cd43a7ac Meta: Add a file containing a list of all emoji file names
And add a verification step to the emoji data generator to ensure all
emoji are listed in this file. This file will be used as a sources list
in both the CMake and GN build systems.

It is probably possible to generate this list. But in a first attempt,
the CMake code to set the file as a dependency of a pseudo target, which
would then parse the file and install the listed emoji was getting quite
verbose and complicated. So for now, let's just maintain this list.
2024-03-23 17:26:31 -04:00
Andrew Kaster
1d70306c41 Meta: Handle output directories for multi-config CMake generators
For Ninja Multi-Config, Xcode and Visual Studio, the way we set up our
output directories would result in exectuables that can't run from the
build directory. Add the same sauce that we added to Jakt to insert
``$<CONFIG>`` where appropriate.
2024-03-14 17:05:05 -06:00
Nico Weber
58838db445 LibGfx: Add the start of a JBIG2 loader
JBIG2 is infamous for two things:

1. It's used in xerox scanners were it falsifies scanned numbers:

https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning

2. It was allegedly used in an iOS zero day, in a very cool way:

https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-into-nso-zero-click.html

Needless to say, we need support for it in Serenity. (...because it's
used in PDF files.)

This adds all the scaffolding, but no actual implementation yet.

It's enough for `file` to print the mime type of .jb2 files, but `image`
can't do anything with the files yet.
2024-03-09 16:01:22 +01:00
Filiph Siitam Sandström
fd694e8672 AK+Lagom: Make it possible to build for iOS
This commit makes it possible to build AK and most of Lagom for iOS,
based on the work for the Ladybird build demoed on discord:
https://discord.com/channels/830522505605283862/830525031720943627/1211987732646068314
2024-03-03 13:13:42 -07:00
Dan Klishch
9966feab4d Meta: Allow collecting code coverage on Lagom 2024-02-24 17:13:16 -07:00
implicitfield
d3c6e31bf3 CMake: Build lagom with -D_FILE_OFFSET_BITS=64 on Linux
32-bit glibc limits off_t to 32 bits without this definition, which
makes working with large files rather difficult.
2024-02-24 15:54:52 -07:00
Andrew Kaster
bc9c710904 LibWeb: Hide WebDriver::match_route debug behind its own flag
When enabling WEBDRIVER_DEBUG globally, this function's debug spam
overpowers the rest of the useful logs.
2024-02-08 15:53:46 +01:00
Timothy Flynn
3bf90fdab1 LibTimeZone: Update to TZDB version 2024a
https://mm.icann.org/pipermail/tz-announce/2024-February/000081.html
2024-02-04 08:14:06 +01:00
Nico Weber
9c762b9650 LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB
CMYK data describes which inks a printer should use to print a color.
If a screen should display a color that's supposed to look similar
to what the printer produces, it results in a color very different
to what Color::from_cmyk() produces. (It's also printer-dependent.)

There are many ICC profiles describing printing processes. It doesn't
matter too much which one we use -- most of them look somewhat
similar, and they all look dramatically better than Color::from_cmyk().

This patch adds a function to download a zip file that Adobe offers
on their web site. They even have a page for redistribution:
https://www.adobe.com/support/downloads/iccprofiles/icc_eula_win_dist.html

(That one leads to a broken download though, so this downloads the
end-user version.)

In case we have to move off this download at some point, there are also
a whole bunch of profiles at https://www.color.org/registry/index.xalter
that "may be used, embedded, exchanged, and shared without restriction".

The adobe zip contains a whole bunch of other useful and fun profiles,
so I went with it.

For now, this only unzips the USWebCoatedSWOP.icc file though, and
installs it in ${CMAKE_BINARY_DIR}/Root/res/icc/Adobe/CMYK/. In
Serenity builds, this will make it to /res/icc/Adobe/CMYK in the
disk image. And in lagom build, after #23016 this is the
lagom res staging directory that tools can install via
Core::ResourceImplementation. `pdf` and `MacPDF` already do that,
`TestPDF` now does it too.

The final piece is that LibPDF then loads the profile from there
and uses it for DeviceCMYK color conversions.

(Doing file access from the bowels of a library is a bit weird,
especially in a system that has sandboxing built in. But LibGfx does
that in FontDatabase too already, and LibPDF uses that, so it's not a
new problem.)
2024-02-01 13:42:04 -07:00
Nico Weber
90490d9fb8 Meta: Use extract_path() in extract_tzdb_file()
No behavior change.
2024-01-29 22:03:27 -05:00
Nico Weber
ffcd5cf443 Meta: Remove extract_tar_path() function
It's identical to extract_path() after #23000.

No behavior change.
2024-01-29 22:03:27 -05:00
Nico Weber
125d92fe85 Meta: Remove "Extracting using cmake" messages
As requested on #23000.
2024-01-29 22:03:27 -05:00
Nico Weber
17f37cbd8c Meta: Remove some obsolete cmake version checks
We require CMake 3.25 nowadays.

No behavior change.
2024-01-29 20:09:12 -05:00
ronak69
d720fb8845 CMake: Set CMAKE_COLOR_DIAGNOSTICS to ON for colored diagnostics
This patch removes the explicit compile flag that only works for g++
(`-fdiagnostics-color=always`; clang++ needs `-fcolor-diagnostics`) and
uses CMake's built in variable that can control color output.

Now both compilers should output colored diagnostics.
2024-01-18 13:59:35 +01:00
Timothy Flynn
7d2172ff3d LibLocale: Update to CLDR version 44.1.0
https://cldr.unicode.org/index/downloads/cldr-44#h.nvqx283jwsx
2023-12-23 20:05:36 +01:00
Timothy Flynn
697bb27c97 LibTimeZone: Update to TZDB version 2023d
https://mm.icann.org/pipermail/tz-announce/2023-December/000080.html
2023-12-23 20:05:16 +01:00
Andrew Kaster
b4a8d2a19f Meta: Support -DCMAKE_BUILD_TYPE=DEBUG for Lagom builds
It's exhausting to have to do a full rebuild when stashing/unstashing
these changes locally.
2023-12-21 19:03:40 +01:00
Daniel Bertalan
19a2cc5634 CMake: Query Python interpreter with find_package
This lets us fail early at configure time if a suitable Python 3
interpreter is not present, instead of delaying the error until Ninja
attempts to run `embed_as_string_view.py` to generate a header in the
middle of the build.

Refs #21791
2023-12-20 12:54:08 -07:00
Sönke Holz
f04a2b81be Meta: Disable -Wcast-align warning on RISC-V
Also explicitly specify `-mstrict-align` (The current default `-mcpu`
on gcc doesn't support unaligned accesses, so aligned memory accesses
are already implicitly required).
The `-Wcast-align` warning seems to oversensitive as it flags code like
this: https://godbolt.org/z/c8481o8aa

This used to be added for aarch64 in a473cfd71b, but was later removed
in 11896868d6.
2023-12-14 09:02:15 -07:00
Sönke Holz
7768f97333 Meta: Force signed char on all architectures 2023-12-14 09:02:15 -07:00
Andrew Kaster
db7eff582e Meta: Update cacert.pem to 2023-12-12 2023-12-14 08:36:25 -07:00
Andrew Kaster
e0f990f1cb CMake: Don't download IDNA files when ENABLE_NETWORK_DOWNLOAD is OFF
Also tweak the debug message for the Emoji test file.
2023-12-13 10:51:27 -07:00
Andrew Kaster
0052f9e895 CMake: Don't try to enable install options if no languages are enabled
This removes a CMake dev warning when building serenity via the
Superbuild.
2023-12-11 11:03:32 -07:00
Simon Wanner
7d9fe44039 LibUnicode: Download and parse IDNA data 2023-12-10 08:04:58 -05:00
Dan Klishch
96d44b1572 Userland: Make bit-fields compatible with MSVC C++ ABI 2023-12-07 10:28:19 -07:00
Timothy Flynn
82398e5724 Meta: Silence warnings from optional CMake packages
These can be quite verbose on the command line if the packages aren't
found. As they do not break the build, let's not spam warnings.

The OpenGL package is also now skipped on macOS, where there's no point
in looking for the package anyways.
2023-11-28 06:54:16 -05:00
Andreas Kling
a6106ca221 AK: Use __builtin_offsetof() + -Wno-invalid-offsetof to silence ASAN
ASAN was crying way too much when running the LibJS JIT since the old
OFFSET_OF implementation was too wild for its liking.

By turning off the invalid-offsetof warnings, we can use the offsetof
builtin instead. However, I'm leaving this as a wrapper macro, since
we may still want to do something different for other compilers.
2023-11-24 12:49:15 +01:00
Dan Klishch
2dba79bc6b Meta: Globally disable floating point contraction
FP contraction is a standard-conforming behavior which allows the
compiler to calculate intermediate results of expressions containing
floating point numbers with a greater precision than the expression type
allows. And in theory, it enables additional optimizations, such as
replacing `a * b + c` with fma(a, b, c).

Unfortunately, it is extremely hard to predict when the contraction will
happen. For example, Clang 17 on x86_64 with the default options will
use FMA only for constant-folded non-constexpr expressions. So, in
practice, FP contraction leads to hard-to-find bugs and inconsistencies
between executables compiled with different toolchains or for different
OSes. And we had two instances of this happening last week.

Since we did not ever used -mfma on x86_64, this patch can only possibly
regress performance on Apple ARM devices, where FMA is enabled by
default. However, this regression will likely be negligible since the
difference would be one additional add instruction, which would be then
likely executed in parallel with something else.
2023-11-16 19:05:13 -05:00
Aliaksandr Kalenik
61a2e59d87 LibAccelGfx+WebContent: Add GPU painter support on macOS
With these changes it is now possible to create OpenGL context on macOS
and run GPU-painter. For now only QT client has a CLI param that turns
it on though.
2023-11-16 15:13:16 +01:00
Timothy Flynn
2c1bbf5a99 AK+LibIDL: Put IDL dbgln statement behind a debug flag
This is a bit spammy now that we are performing some overload resolution
at build time. The fallback to an interface has generally worked fine on
the types it warns about (BufferSource, Module, etc.) so let's not warn
about it for every build.
2023-11-15 23:42:53 +01:00
Lucas CHOLLET
86ee7d219e LibCompress/LZW: Use its own debug flag
The file still used the `GIF_DEBUG` flag from when it was a part of the
GIF decoder. Let's give `LZWDecoder` its own flag.
2023-11-12 13:56:27 +01:00
Timothy Flynn
fefbbff0a5 LibEDID: Replace the HTML-based PNP ID parser with a CSV-based parser
The PNP ID file is now a CSV file. Update the generator to handle the
new format.
2023-11-08 08:19:04 +01:00
Lucas CHOLLET
75caccafa4 LibGfx: Add a TIFF loader 2023-11-06 12:29:30 -07:00
Timothy Flynn
38dd284915 LibLocale: Update to CLDR version 44.0.1
https://cldr.unicode.org/index/downloads/cldr-44

Notable changes that affect us include:

* The Islamic Calendar is now localized as the Hijri Calender (in en-US)
  but has not been updated for all locales. So this patch updates tests
  where possible and removes a few test cases that currently cannot be
  localized.

* The und locale has received more likely subtag data (the und locale is
  basically a pseudo-locale meaning "undetermined").

* The exponential symbol in the Arabic number system was changed from
  U+0627 to U+0623.
2023-11-06 08:31:56 -05:00
Daniel Bertalan
cf3c8a216b CMake: Disable Clang 18+ -Wvla-cxx-extension warning
This warning warns about variable-length arrays being a non-standard
extension to the C++ language. We still have a few instances of VLAs, so
let's disable the warning for now.

This does not interfere with `-Wvla`, which we use to completely forbid
this (potentially dangerous) feature in the Kernel and LibCrypto.
2023-11-05 13:41:13 -07:00
Andrew Kaster
49d21619d4 CMake: Use a helper file to find GL and EGL in a platform agnostic way
Also add a flag to turn off accelerated graphics entirely.
2023-10-31 02:32:58 -06:00
Andrew Kaster
2148b89d95 Meta: Update CA certificate to 2023-08-22 2023-10-31 00:36:51 +03:30
Edwin Rijkee
8388fe51b5 Kernel: Add a framebuffer driver for 3Dfx Voodoo 3
A bit old but a relatively uncomplicated device capable of outputting
1920x1080 video with 32-bit color. Tested with a Voodoo 3 3000 16MB
PCI card. Resolution switching from DisplaySettings also works.

If the requested mode contains timing information, it is used directly.
Otherwise, display timing values are selected from the EDID. First the
detailed timings are checked, and then standard and established
timings for which there is a matching DMT mode. The driver does not
(yet) read the actual EDID, so the generic EDID in DisplayConnector now
includes a set of common display modes to make this work.

The driver should also be compatible with the Voodoo Banshee, 4 and 5
but I don't have these cards to test this with. The PCI IDs of these
cards are included as a commented line in case someone wants to give it
a try.
2023-10-16 01:25:45 +02:00
Nico Weber
3c49d0dad3 LibPDF: Add a CFF_DEBUG toggle
I'd like to put some debug prints behind this soon.

No behavior change.
2023-10-15 07:14:29 +02:00
Andrew Kaster
3e86f88d6a CMake: Actually set the LAGOM_USE_LINKER option automatically
When this feature was finally merged, the serenity_option in
lagom_options.cmake had the unintended side effect of always setting the
cache variable to "" in the initial cache. In order to actually set the
linker to use to be lld or mold, we need to set with the FORCE flag in
the use_linker.cmake file.

Found by checking with the CMake variable_watch() function.

This will stop the build from spamming the "Using LLD to link Lagom"
message all over the place :^)
2023-10-11 15:02:42 -04:00
Andrew Kaster
c8cf361bbd LibWeb: Install generated CSS/PseudoClass.h file the same as the others 2023-10-11 12:35:35 -04:00
Sam Atkins
ae4b8d86df LibWeb: Include standard SVG user agent style sheet
For now, part of this is commented-out. Our current implementations of
`<mask>` and `<symbol>` rely on creating layout nodes, so they can't be
`display: none`.
2023-09-23 16:27:14 +02:00
Daniel Bertalan
6fd8f9ea51 CMake: Link with -Bsymbolic-non-weak-functions if supported
This flag makes the linker bind default-visibility functions locally, so
that calls to them do not have to go through the PLT. This makes it
impossible to override them by preloading a DSO. This was already the
case partially due to `-fno-semantic-interposition`, however that flag
is only able to optimize call sites that are in the same Translation
Unit as the function definitions.

This removes 80% of the PLT relocations in `libjs.so.serenity`.

Obsoletes #20877
2023-09-18 10:26:42 +02:00
Daniel Bertalan
1f747b9132 CMake: Use CMAKE_POSITION_INDEPENDENT_CODE instead of explicit -fpic
This makes CMake pass `-fpie` instead of `-fpic` to the compiler when
building the Kernel and userland *executables*. This allows the compiler
to make certain optimizations based on the fact that the code will be
used in an executable, such as not having to emit `.localalias` symbols.
This leads to a 450 KiB decrease in the size of the Kernel binary.
2023-09-18 10:26:42 +02:00
Timothy Flynn
139c575cc9 LibUnicode: Update to Unicode version 15.1.0
https://unicode.org/versions/Unicode15.1.0/

This update includes a new set of code point properties, Indic Conjunct
Break. These may have the values Consonant, Linker, or Extend. These are
used in text segmentation to prevent breaking on some extended grapheme
cluster sequences.
2023-09-15 18:30:26 +02:00
Tim Schumacher
b0c1dc14f3 Meta: Download pnp_ids.html to the cache directory 2023-09-14 08:05:00 +01:00
Tim Schumacher
cc6054ae3b Meta: Download commonmark.spec.json to the cache directory 2023-09-14 08:05:00 +01:00
Daniel Bertalan
dac443fbff Meta: Link Lagom with LLD by default and allow configuring the linker
This ports over the `LADYBIRD_USE_LLD` option from the standalone
Ladybird build and generalizes it to work for mold as well: the
`LAGOM_USE_LINKER` variable can be set to the desired name of the
linker. If it's empty, we default to trying LLD and Mold on ELF
platforms (in this order).
2023-09-05 14:50:36 +02:00
Sönke Holz
d6906736cc Meta: Add -fno-omit-frame-pointer flag
We currently only use frame pointer-based backtrace generation.
This option is necessary for RISC-V as otherwise the compiler doesn't
save `fp` most of the time.
I made this flag not riscv64 exclusive, as we should do everything
to make that kind of backtrace generation work.
(https://discord.com/channels/830522505605283862/1139481927594803260/1148020960499351643)
2023-09-04 07:45:35 +02:00
Andrew Kaster
7bc009d80f Ladybird: Add new template Kotlin Android application without Qt
This template app from Android Studio should hopefully be more fun to
work on than the Qt wrapped application we were using before. :^)

It currently builds the native code using gradle rules, and has a stub
WebViewImplementationNative class that will wrap a c++ class of the same
name that inhertis from WebView::ViewImplementation. Spawning helper
processes and creating proper views in Kotlin is next on the list.
2023-09-03 11:38:51 +02:00
Sam Atkins
eab44f982a Meta: Use embed_as_string_view() for stringify_gml() 2023-08-24 07:42:12 +01:00