summaryrefslogtreecommitdiff
path: root/Meta/Lagom/CMakeLists.txt
AgeCommit message (Collapse)Author
2022-03-29markdown-check: Port to LibMainKenneth Myhra
2022-03-29Tests: Add a basic UTF-8 to UTF-8 LibTextCodec testKarol Kosek
2022-03-28LibXML: Add a fairly basic XML parserAli Mohammad Pur
Currently this can parse XML and resolve external resources/references, and read a DTD (but not apply or verify its rules). That's good enough for _most_ XHTML documents as the HTML 5 spec enforces its own rules about document well-formedness, and does not make use of XML DTDs (aside from a list of predefined entities). An accompanying `xml` utility is provided that can read and dump XML documents, and can also run the XML conformance test suite.
2022-03-20Lagom: Build with -fsigned-charNico Weber
When building on an arm host system, char defaults to unsigned, leading to errors such as: serenity/AK/StringBuilder.cpp:198:20: error: comparison is always true due to limited range of data type [-Werror=type-limits] 198 | if (ch >= 0 && ch <= 0x1f) | Building with -fsigned-char makes things work like on Intel, and it's what we already do in Kernel/CMakeLists.txt for the same reasons.
2022-03-19Meta: Error out on find_program errors with CMake less than 3.18Brian Gianforcaro
We have seen some cases where the build fails for folks, and they are missing unzip/tar/gzip etc. We can catch some of these in CMake itself, so lets make sure to handle that uniformly across the build system. The REQUIRED flag to `find_program` was only added on in CMake 3.18 and above, so we can't rely on that to actually halt the program execution.
2022-02-25Userland: Rename IPC ClientConnection => ConnectionFromClientItamar
This was done with CLion's automatic rename feature and with: find . -name ClientConnection.h | rename 's/ClientConnection\.h/ConnectionFromClient.h/' find . -name ClientConnection.cpp | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-23LibTest+Spreadsheet: Add some basic spreadsheet runtime behaviour testsAli Mohammad Pur
As there's a somewhat active development going on, let's keep the expected behaviour under tests to make sure nothing blows up :^)
2022-02-21Lagom: Port LibSyntaxFiliph Sandström
LibSyntax was already building for lagom without any extra changes so let's just enable it :^)
2022-02-20Lagom: Add two-stage build for Fuzzers to enable fuzzing generated codeAndrew Kaster
This allows us to fuzz the generated unicode and timezone database helpers, and to fuzz things like LibJS using Fuzzilli to get proper coverage of our unicode handling code. Update the Azure CI to use the new two-stage build as well, and cleanup some unused CMake options there.
2022-02-09Meta: Add a CPack installation target for js(1)Timothy Flynn
This adds a CPack configuration to generate a release package for js(1). Our current CMake requirement is 3.16, which doesn't have a great story for automatically installing a binary target's library dependencies. If we eventually require CMake 3.21 or above, we can remove the helper .cmake file added here in lieu of RUNTIME_DEPENDENCIES.
2022-02-07LibGUI: Remove GML prefix in favor of proper namespacekleines Filmröllchen
Prefixes are very much a C thing which we don't need in C++. This commit moves all GML-related classes in LibGUI into the GUI::GML namespace, a change somewhat overdue.
2022-02-06Lagom: Exclude libraries with X86 code when building for macOS on ArmMorten Larsen
The CMakeLists.txt for Lagom contains a few libraries and executables with X86-specific code. By excluding those libraries, Lagom builds for macOS on Arm as well. The places are marked FIXME to be removed when the libraries will build for Arm.
2022-01-25Tests+LibJS: Add very simple bytecode LibJS testsdavidot
These tests are not meant as a replacement to test-js with the -b option but are meant to test simple cases until that works. Before this it was very easy to accidentally break bytecode since no tests were run in bytecode mode. This hopefully makes it easier to spot such regressions :^).
2022-01-22Utilities+Lagom: Remove test-cryptoNico Weber
After 4d5ffd364a3, Tests/{LibCrypto,LibTLS} test the same things and test-crypto has been redundant since then.
2022-01-21adjtime: Port to LibMainmjz19910
2022-01-14gml-format: Port to LibMainLucas CHOLLET
2022-01-14disasm: Port to LibMainLucas CHOLLET
2022-01-11LibTimeZone: Add a unit test for generated time zone dataTimothy Flynn
2022-01-09Userland: Port wasm to LibMainFederico Guerinoni
2022-01-09Shell: Port to LibMainLucas CHOLLET
2022-01-08Lagom: Execute `LibPDF` unit tests on the hostSimon Woertz
Add lagom unit tests for `LibPDF`.
2022-01-08LibUnicode: Use LibTimeZone's list of time zone namesTimothy Flynn
LibUnicode no longer needs to generate a list of time zone names that it parsed from metaZones.json. We can defer to the TZDB for a golden list of time zones.
2022-01-08LibTimeZone+Meta: Add plumbing for an IANA Time Zone Database generatorTimothy Flynn
The IANA Time Zone Database contains data needed, at least, for various JavaScript objects. This adds plumbing for a parser and code generator for this data. The generated data will be made available by LibTimeZone, much like how UCD and CLDR data is available through LibUnicode.
2022-01-08Meta: Remove -ldl linkage from LagomUnicodeTimothy Flynn
This was needed for dlopen() on some systems, but is no longer needed as of commit 1116a29c19c797bd1299aa42827bb69286d3bade.
2022-01-07Everywhere: Fix spelling mistakesmjz19910
2022-01-07Meta+CI+Documentation: Bump host gcc requirement up to gcc 11Andrew Kaster
Bump macOS CI version to macOS 11 while we're here.
2022-01-07LibSQL: Implement LIKE SQL expressionsGuilherme Gonçalves
2021-12-29Build: Remove gzip -k usage in PCI/USB ID files and crypt for OpenBSDtuftedocelot
OpenBSD gzip does not have the -k flag to keep the original after extraction. Work around this by copying the original gzip to the dest and then extracting. A bit of a hack, but only needs to be done for the first-time or rebuilds OpenBSD provides crypt in libc, not libcrypt. Adjust if/else to check for either and proceed accordingly Remove outdated OpenBSD checks when building the toolchain
2021-12-24LibGL+LibSoftGPU: Move rendering related code to LibSoftGPU libraryStephan Unverwerth
This introduces a new library, LibSoftGPU, that incorporates all rendering related features that formerly resided within LibGL itself. Going forward we will make both libraries completely independent from each other allowing LibGL to load different, possibly accelerated, rendering backends.
2021-12-22Meta: Add a cmake flag for building for compiler explorerAli Mohammad Pur
We don't need to build tests/binaries for CE.
2021-12-21LibUnicode: Dynamically load the generated UnicodeData symbolsTimothy Flynn
The generated data for libunicodedata.so is quite large, and loading it is a price paid by nearly every application by way of depending on LibRegex. In order to defer this cost until an application actually uses one of the surrounding APIs, dynamically load the generated symbols. To be able to load the symbols dynamically, the generated methods must have demangled names. Typically, this is accomplished with `extern "C"` blocks. The clang toolchain complains about this here because the types returned from the generators are strictly C++ types. So to demangle the names, we use the asm() compiler directive to manually define a symbol name; the caveat is that we *must* be sure the symbols are unique. As an extra precaution, we prefix each symbol name with "unicode_". For more details, see: https://gcc.gnu.org/onlinedocs/gcc/Asm-Labels.html This symbol loader used in this implementation provides the additional benefit of removing many [[maybe_unused]] attributes from the LibUnicode methods. Internally, if ENABLE_UNICODE_DATABASE_DOWNLOAD is OFF, the loader is able to stub out the function pointers it returns. Note that as of this commit, LibUnicode is still directly linked against LibUnicodeData. This commit is just a first step towards removing that.
2021-12-15Lagom: Add argument `WORKING_DIRECTORY` to `lagom_test(...)`Simon Woertz
So far the working directory was set in some cases using `set_tests_properties(...)`, but this requires to know which name is picked by `lagom_test(...)` when calling `add_test(...)`. In case of adding multiple test cases using a globbing pattern this would require to duplicate code to construct the test name from the file name.
2021-11-29Tests: Add a simple LibGL render-testHendiadyoin1
At the moment we just check if we *can* render a simple triangle, we do not yet actually test if the image is indeed the triangle we wanted. This test also outputs the rendered image when GL_DEBUG is enabled to a file called "picture.bmp" for manual verification. Co-authored-by: sunverwerth <s.unverwerth@serenityos.org>
2021-11-29Lagom: Add LibGL to the librariesHendiadyoin1
2021-11-29Lagom: Disable implicit-const-int-float-conversion warningsHendiadyoin1
2021-11-23Meta: Define LagomMain outside of the BUILD_LAGOM branchTimothy Flynn
This allows code generators to use LagomMain. Otherwise, during CI, they are built during the superbuild without BUILD_LAGOM=ON.
2021-11-22js: Port to LibMain :^)Linus Groh
This wasn't particularly difficult, and there's not much use for the nicer interface yet either. While unveil() is of limited use in js(1) as it should be able to open arbitrary files, I feel like we should be able to add a pledge() call.
2021-11-22Lagom: Add LibMain as a lagom_lib()Linus Groh
2021-10-30Lagom/Fuzzers: Add fuzzer for PDF documentBrendan Coles
2021-10-16Lagom: Do not use -fno-sematic-interposition in fuzzer buildsNico Weber
Apparently it breaks the fuzzer build. There's probably a better fix for this, but for now just unbreak the fuzzer build. Keep this for non-fuzzer builds though since it's apparently a 17% speedup for running test262 tests :^)
2021-10-15Lagom: Build with -fno-no-semantic-interpositionNico Weber
Lagom: Build with -fno-no-semantic-interposition We build with this in non-lagom builds, and serenity's gcc even adds it to its CC1_SPEC. Let's use it for lagom too. Reduces the number of dynamic relocations in liblagom-js.so.0.0.0 (per `objdump -R`) from 15133 to 14534, and increases its size back to 91M (95156800 bytes), probably due to more inlining being possible. This might help perf of lagom binaries.
2021-10-15Lagom: Build with -fno-exceptionsNico Weber
We build with this in non-lagom builds, so there's no reason not to use it in lagom builds as well. Reduces the size of liblagom-js.so.0.0.0 from 94M to 90M (from 98352784 to 93831056 bytes to be exact).
2021-10-10markdown-checker: New tool that checks document linksBen Wiederhake
2021-10-10Meta: Re-enable warnings for deprecated copies also for LagomBen Wiederhake
2021-10-07Meta: Disable -Wmaybe-uninitialized for LagomIdan Horowitz
2021-10-03LibJS: Add a specific test for invalid unicode characters in the lexerdavidot
Also fixes that it tried to make substrings past the end of the source if we overran the source length.
2021-09-16Meta: Fix Lagom RPATH for non-Ubuntu Linux and macOS hostsAndrew Kaster
Multi-lib distros like Gentoo and Fedora install lagom-core.so into lagom-install/lib64 rather than lib. Set the install RPATH based on CMAKE_INSTALL_LIBDIR to avoid the wrong path being set in the binaries. Also apply macOS specific RPATH rules to fix the build on that platform.
2021-09-15Meta: Add FIXME for not setting BUILD_SHARED_LIBS in Lagom buildAndrew Kaster
This is really the business of the consuming project. We will need to make changes to libjs-test262 and to oss-fuzz to address this properly.
2021-09-15Meta: Switch to a SuperBuild that splits host and target buildsAndrew Kaster
Replace the old logic where we would start with a host build, and swap all the CMake compiler and target variables underneath it to trick CMake into building for Serenity after we configured and built the Lagom code generators. The SuperBuild creates two ExternalProjects, one for Lagom and one for Serenity. The Serenity project depends on the install stage for the Lagom build. The SuperBuild also generates a CMakeToolchain file for the Serenity build to use that replaces the old toolchain file that was only used for Ports. To ensure that code generators are rebuilt when core libraries such as AK and LibCore are modified, developers will need to direct their manual `ninja` invocations to the SuperBuild's binary directory instead of the Serenity binary directory. This commit includes warning coalescing and option style cleanup for the affected CMakeLists in the Kernel, top level, and runtime support libraries. A large part of the cleanup is replacing USE_CLANG_TOOLCHAIN with the proper CMAKE_CXX_COMPILER_ID variable, which will no longer be confused by a host clang compiler.
2021-09-15Meta: Move all options to targetname_options.cmake filesAndrew Kaster
This common strategy of having a serenity_option() macro defined in either the Lagom or top level CMakeLists.txt allows us to do two things: First, we can more clearly see which options are Serenity-specific, Lagom-specific, or common between the target and host builds. Second, it enables the upcoming SuperBuild changes to set() the options in the SuperBuild's CMake cache and forward each target's options to the corresponding ExternalProject.