From faa8ef98c91411c7d73cd723f597ef24bb0c0551 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Fri, 27 Oct 2023 14:26:41 -0600 Subject: [PATCH] Meta: Port recent changes to gn BUILD 5c7e5cc738b0dbdc76f84c470d52eb778c605225 a8f0fa5dd4432b49c262c6503b390979dee00d29 0d417cd604588c9e41059ce62697f62623febe47 5b87d26027f6a9df4d25ffd5dd43b64c805d651c (and other friends from the JIT PR) f915aa70cd2f428e460cd5463f617dc0f2d7013a --- Meta/gn/secondary/Ladybird/BUILD.gn | 14 +++-- .../secondary/Ladybird/ImageDecoder/BUILD.gn | 19 ++++++ .../gn/secondary/Ladybird/WebContent/BUILD.gn | 1 + .../{LibPublicSuffix => LibWebView}/BUILD.gn | 0 .../Userland/Libraries/LibCore/BUILD.gn | 3 + .../Libraries/LibImageDecoderClient/BUILD.gn | 43 ++++++++++++++ .../Userland/Libraries/LibJIT/BUILD.gn | 12 ++++ .../Userland/Libraries/LibJS/BUILD.gn | 4 ++ .../Libraries/LibPublicSuffix/BUILD.gn | 59 ------------------- .../Userland/Libraries/LibWeb/CSS/BUILD.gn | 1 + .../Libraries/LibWeb/Painting/BUILD.gn | 3 + .../Userland/Libraries/LibWebView/BUILD.gn | 50 ++++++++++++++++ 12 files changed, 146 insertions(+), 63 deletions(-) create mode 100644 Meta/gn/secondary/Ladybird/ImageDecoder/BUILD.gn rename Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/{LibPublicSuffix => LibWebView}/BUILD.gn (100%) create mode 100644 Meta/gn/secondary/Userland/Libraries/LibImageDecoderClient/BUILD.gn create mode 100644 Meta/gn/secondary/Userland/Libraries/LibJIT/BUILD.gn delete mode 100644 Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn diff --git a/Meta/gn/secondary/Ladybird/BUILD.gn b/Meta/gn/secondary/Ladybird/BUILD.gn index 2ed4679e675..f2f8d755a02 100644 --- a/Meta/gn/secondary/Ladybird/BUILD.gn +++ b/Meta/gn/secondary/Ladybird/BUILD.gn @@ -4,7 +4,7 @@ import("//Ladybird/moc_qt_objects.gni") group("Ladybird") { if (current_os == "mac") { - deps = [ ":ladybird.app" ] + deps = [ ":Ladybird.app" ] } else { deps = [ ":ladybird_executable" ] } @@ -54,6 +54,7 @@ executable("ladybird_executable") { ] data_deps = [ ":headless-browser", + "ImageDecoder", "RequestServer", "SQLServer", "WebContent", @@ -69,10 +70,10 @@ executable("ladybird_executable") { "//Userland/Libraries/LibGUI", "//Userland/Libraries/LibGfx", "//Userland/Libraries/LibIPC", + "//Userland/Libraries/LibImageDecoderClient", "//Userland/Libraries/LibJS", "//Userland/Libraries/LibMain", "//Userland/Libraries/LibProtocol", - "//Userland/Libraries/LibPublicSuffix", "//Userland/Libraries/LibSQL", "//Userland/Libraries/LibWeb", "//Userland/Libraries/LibWebView", @@ -113,6 +114,7 @@ executable("headless-browser") { "//Userland/Libraries/LibGfx", "//Userland/Libraries/LibHTTP", "//Userland/Libraries/LibIPC", + "//Userland/Libraries/LibImageDecoderClient", "//Userland/Libraries/LibJS", "//Userland/Libraries/LibMain", "//Userland/Libraries/LibProtocol", @@ -139,6 +141,7 @@ if (current_os == "mac") { public_deps = [ ":headless-browser", ":ladybird_executable", + "ImageDecoder", "RequestServer", "SQLServer", "WebContent", @@ -146,6 +149,7 @@ if (current_os == "mac") { "WebSocket", ] sources = [ + "$root_out_dir/bin/ImageDecoder", "$root_out_dir/bin/Ladybird", "$root_out_dir/bin/RequestServer", "$root_out_dir/bin/SQLServer", @@ -174,11 +178,12 @@ if (current_os == "mac") { "//Userland/Libraries/LibHTTP", "//Userland/Libraries/LibIDL", "//Userland/Libraries/LibIPC", + "//Userland/Libraries/LibImageDecoderClient", + "//Userland/Libraries/LibJIT", "//Userland/Libraries/LibJS", "//Userland/Libraries/LibLine", "//Userland/Libraries/LibMarkdown", "//Userland/Libraries/LibProtocol", - "//Userland/Libraries/LibPublicSuffix", "//Userland/Libraries/LibRegex", "//Userland/Libraries/LibSQL", "//Userland/Libraries/LibSoftGPU", @@ -208,12 +213,13 @@ if (current_os == "mac") { "$root_out_dir/lib/liblagom-gui.dylib", "$root_out_dir/lib/liblagom-http.dylib", "$root_out_dir/lib/liblagom-idl.dylib", + "$root_out_dir/lib/liblagom-imagedecoderclient.dylib", "$root_out_dir/lib/liblagom-ipc.dylib", + "$root_out_dir/lib/liblagom-jit.dylib", "$root_out_dir/lib/liblagom-js.dylib", "$root_out_dir/lib/liblagom-line.dylib", "$root_out_dir/lib/liblagom-markdown.dylib", "$root_out_dir/lib/liblagom-protocol.dylib", - "$root_out_dir/lib/liblagom-publicsuffix.dylib", "$root_out_dir/lib/liblagom-regex.dylib", "$root_out_dir/lib/liblagom-softgpu.dylib", "$root_out_dir/lib/liblagom-sql.dylib", diff --git a/Meta/gn/secondary/Ladybird/ImageDecoder/BUILD.gn b/Meta/gn/secondary/Ladybird/ImageDecoder/BUILD.gn new file mode 100644 index 00000000000..efe9ea440c6 --- /dev/null +++ b/Meta/gn/secondary/Ladybird/ImageDecoder/BUILD.gn @@ -0,0 +1,19 @@ +executable("ImageDecoder") { + configs += [ "//Ladybird:ladybird_config" ] + include_dirs = [ + "//Userland/Libraries", + "//Userland/Services", + ] + deps = [ + "//AK", + "//Userland/Libraries/LibCore", + "//Userland/Libraries/LibGfx", + "//Userland/Libraries/LibIPC", + "//Userland/Libraries/LibImageDecoderClient", + "//Userland/Libraries/LibMain", + ] + sources = [ + "//Userland/Services/ImageDecoder/ConnectionFromClient.cpp", + "main.cpp", + ] +} diff --git a/Meta/gn/secondary/Ladybird/WebContent/BUILD.gn b/Meta/gn/secondary/Ladybird/WebContent/BUILD.gn index a67d0a09fa7..a825e303f73 100644 --- a/Meta/gn/secondary/Ladybird/WebContent/BUILD.gn +++ b/Meta/gn/secondary/Ladybird/WebContent/BUILD.gn @@ -36,6 +36,7 @@ executable("WebContent") { "//Userland/Libraries/LibFileSystem", "//Userland/Libraries/LibGfx", "//Userland/Libraries/LibIPC", + "//Userland/Libraries/LibImageDecoderClient", "//Userland/Libraries/LibJS", "//Userland/Libraries/LibMain", "//Userland/Libraries/LibProtocol", diff --git a/Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix/BUILD.gn b/Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibWebView/BUILD.gn similarity index 100% rename from Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix/BUILD.gn rename to Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibWebView/BUILD.gn diff --git a/Meta/gn/secondary/Userland/Libraries/LibCore/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibCore/BUILD.gn index 4aba55140d1..c83a7685231 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibCore/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibCore/BUILD.gn @@ -52,6 +52,9 @@ source_set("sources") { "ProcessStatisticsReader.h", "Promise.h", "Proxy.h", + "Resource.cpp", + "ResourceImplementation.cpp", + "ResourceImplementationFile.cpp", "SOCKSProxyClient.cpp", "SOCKSProxyClient.h", "SecretString.cpp", diff --git a/Meta/gn/secondary/Userland/Libraries/LibImageDecoderClient/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibImageDecoderClient/BUILD.gn new file mode 100644 index 00000000000..c6dea2ef450 --- /dev/null +++ b/Meta/gn/secondary/Userland/Libraries/LibImageDecoderClient/BUILD.gn @@ -0,0 +1,43 @@ +import("//Meta/gn/build/compiled_action.gni") + +compiled_action("ImageDecoderClientEndpoint") { + tool = "//Meta/Lagom/Tools/CodeGenerators/IPCCompiler" + inputs = [ "//Userland/Services/ImageDecoder/ImageDecoderClient.ipc" ] + outputs = [ "$root_gen_dir/ImageDecoder/ImageDecoderClientEndpoint.h" ] + args = [ + rebase_path(inputs[0], root_build_dir), + "-o", + rebase_path(outputs[0], root_build_dir), + ] +} + +compiled_action("ImageDecoderServerEndpoint") { + tool = "//Meta/Lagom/Tools/CodeGenerators/IPCCompiler" + inputs = [ "//Userland/Services/ImageDecoder/ImageDecoderServer.ipc" ] + outputs = [ "$root_gen_dir/ImageDecoder/ImageDecoderServerEndpoint.h" ] + args = [ + rebase_path(inputs[0], root_build_dir), + "-o", + rebase_path(outputs[0], root_build_dir), + ] +} + +shared_library("LibImageDecoderClient") { + output_name = "imagedecoderclient" + include_dirs = [ + "//Userland/Libraries", + "//Userland/Services", + "//Userland/", + ] + deps = [ + ":ImageDecoderClientEndpoint", + ":ImageDecoderServerEndpoint", + "//AK", + "//Userland/Libraries/LibCore", + "//Userland/Libraries/LibGfx", + "//Userland/Libraries/LibIPC", + ] + sources = [ "Client.cpp" ] + sources += get_target_outputs(":ImageDecoderClientEndpoint") + + get_target_outputs(":ImageDecoderServerEndpoint") +} diff --git a/Meta/gn/secondary/Userland/Libraries/LibJIT/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibJIT/BUILD.gn new file mode 100644 index 00000000000..de39ac92074 --- /dev/null +++ b/Meta/gn/secondary/Userland/Libraries/LibJIT/BUILD.gn @@ -0,0 +1,12 @@ +shared_library("LibJIT") { + output_name = "jit" + include_dirs = [ "//Userland/Libraries" ] + sources = [ + "Assembler.cpp", + "Assembler.h", + ] + deps = [ + "//AK", + "//Userland/Libraries/LibCore", + ] +} diff --git a/Meta/gn/secondary/Userland/Libraries/LibJS/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibJS/BUILD.gn index acce50cc2dd..ec9ff488bc8 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibJS/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibJS/BUILD.gn @@ -11,6 +11,7 @@ shared_library("LibJS") { "//Userland/Libraries/LibCore", "//Userland/Libraries/LibCrypto", "//Userland/Libraries/LibFileSystem", + "//Userland/Libraries/LibJIT", "//Userland/Libraries/LibLocale", "//Userland/Libraries/LibRegex", "//Userland/Libraries/LibSyntax", @@ -21,6 +22,7 @@ shared_library("LibJS") { "Bytecode/ASTCodegen.cpp", "Bytecode/BasicBlock.cpp", "Bytecode/CodeGenerationError.cpp", + "Bytecode/CommonImplementations.cpp", "Bytecode/Executable.cpp", "Bytecode/Generator.cpp", "Bytecode/IdentifierTable.cpp", @@ -41,6 +43,8 @@ shared_library("LibJS") { "Heap/Heap.cpp", "Heap/HeapBlock.cpp", "Heap/MarkedVector.cpp", + "JIT/Compiler.cpp", + "JIT/NativeExecutable.cpp", "Lexer.cpp", "MarkupGenerator.cpp", "Module.cpp", diff --git a/Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn deleted file mode 100644 index ac3fb0eb309..00000000000 --- a/Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn +++ /dev/null @@ -1,59 +0,0 @@ -import("//Meta/gn/build/compiled_action.gni") -import("//Meta/gn/build/download_cache.gni") -import("//Meta/gn/build/download_file.gni") - -declare_args() { - # If true, Download public suffix list from GitHub. - # Data will be downloaded to $cache_path/PublicSuffix and used by LibPublicSuffix - enable_public_suffix_list_download = true -} - -public_suffix_cache = cache_path + "PublicSuffix/" - -if (enable_public_suffix_list_download) { - download_file("public_suffix_list_download") { - version = "master" - url = "https://raw.githubusercontent.com/publicsuffix/list/" + version + - "/public_suffix_list.dat" - output = "$public_suffix_cache/public_suffix_list.dat" - version_file = public_suffix_cache + "version.txt" - } - - compiled_action("generate_public_suffix_list_sources") { - tool = "//Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix:GeneratePublicSuffixData" - deps = [ ":public_suffix_list_download" ] - outputs = [ - "$target_gen_dir/PublicSuffixData.h", - "$target_gen_dir/PublicSuffixData.cpp", - ] - args = [ - "-h", - rebase_path(outputs[0], root_build_dir), - "-c", - rebase_path(outputs[1], root_build_dir), - "-p", - rebase_path("$public_suffix_cache/public_suffix_list.dat", - root_build_dir), - ] - } -} - -shared_library("LibPublicSuffix") { - output_name = "publicsuffix" - include_dirs = [ - "//Userland/Libraries", - "$target_gen_dir/..", - ] - sources = [ "URL.cpp" ] - deps = [ - "//AK", - "//Userland/Libraries/LibCore", - ] - if (enable_public_suffix_list_download) { - deps += [ ":generate_public_suffix_list_sources" ] - sources += get_target_outputs(":generate_public_suffix_list_sources") - defines = [ "ENABLE_PUBLIC_SUFFIX_DOWNLOAD=1" ] - } else { - defines = [ "ENABLE_PUBLIC_SUFFIX_DOWNLOAD=0" ] - } -} diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/BUILD.gn index 7dc029699b0..12a80600d84 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/BUILD.gn @@ -59,6 +59,7 @@ source_set("CSS") { "Supports.cpp", "SystemColor.cpp", "Time.cpp", + "Transformation.cpp", "VisualViewport.cpp", ] } diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/Painting/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibWeb/Painting/BUILD.gn index b64ba6883f8..0fabb127aa1 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWeb/Painting/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/Painting/BUILD.gn @@ -8,6 +8,7 @@ source_set("Painting") { "AudioPaintable.cpp", "BackgroundPainting.cpp", "BorderPainting.cpp", + "BorderRadiiData.cpp", "BorderRadiusCornerClipper.cpp", "ButtonPaintable.cpp", "CanvasPaintable.cpp", @@ -23,8 +24,10 @@ source_set("Painting") { "PaintContext.cpp", "Paintable.cpp", "PaintableBox.cpp", + "PaintingCommandExecutorCPU.cpp", "ProgressPaintable.cpp", "RadioButtonPaintable.cpp", + "RecordingPainter.cpp", "SVGGeometryPaintable.cpp", "SVGGraphicsPaintable.cpp", "SVGPaintable.cpp", diff --git a/Meta/gn/secondary/Userland/Libraries/LibWebView/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibWebView/BUILD.gn index 16d2274e127..d71239653a6 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWebView/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibWebView/BUILD.gn @@ -1,6 +1,45 @@ import("//Meta/gn/build/compiled_action.gni") +import("//Meta/gn/build/download_cache.gni") +import("//Meta/gn/build/download_file.gni") import("//Meta/gn/build/embed_as_string_view.gni") +declare_args() { + # If true, Download public suffix list from GitHub. + # Data will be downloaded to $cache_path/PublicSuffix and used by LibPublicSuffix + enable_public_suffix_list_download = true +} + +public_suffix_cache = cache_path + "PublicSuffix/" + +if (enable_public_suffix_list_download) { + download_file("public_suffix_list_download") { + version = "master" + url = "https://raw.githubusercontent.com/publicsuffix/list/" + version + + "/public_suffix_list.dat" + output = "$public_suffix_cache/public_suffix_list.dat" + version_file = public_suffix_cache + "version.txt" + } + + compiled_action("generate_public_suffix_list_sources") { + tool = + "//Meta/Lagom/Tools/CodeGenerators/LibWebView:GeneratePublicSuffixData" + deps = [ ":public_suffix_list_download" ] + outputs = [ + "$target_gen_dir/PublicSuffixData.h", + "$target_gen_dir/PublicSuffixData.cpp", + ] + args = [ + "-h", + rebase_path(outputs[0], root_build_dir), + "-c", + rebase_path(outputs[1], root_build_dir), + "-p", + rebase_path("$public_suffix_cache/public_suffix_list.dat", + root_build_dir), + ] + } +} + compiled_action("WebContentClientEndpoint") { tool = "//Meta/Lagom/Tools/CodeGenerators/IPCCompiler" inputs = [ "//Userland/Services/WebContent/WebContentClient.ipc" ] @@ -58,6 +97,7 @@ shared_library("LibWebView") { "//Userland/Libraries", "//Userland/Services", "//Userland/", + "$target_gen_dir/..", ] deps = [ ":WebContentClientEndpoint", @@ -67,6 +107,7 @@ shared_library("LibWebView") { ":generate_native_stylesheet_source", "//AK", "//Userland/Libraries/LibCore", + "//Userland/Libraries/LibFileSystem", "//Userland/Libraries/LibGUI", "//Userland/Libraries/LibGfx", "//Userland/Libraries/LibIPC", @@ -83,8 +124,10 @@ shared_library("LibWebView") { "Database.cpp", "History.cpp", "RequestServerAdapter.cpp", + "SearchEngine.cpp", "SourceHighlighter.cpp", "StylePropertiesModel.cpp", + "URL.cpp", "UserAgent.cpp", "ViewImplementation.cpp", "WebContentClient.cpp", @@ -95,4 +138,11 @@ shared_library("LibWebView") { get_target_outputs(":WebDriverClientEndpoint") + get_target_outputs(":WebDriverServerEndpoint") + get_target_outputs(":generate_native_stylesheet_source") + if (enable_public_suffix_list_download) { + deps += [ ":generate_public_suffix_list_sources" ] + sources += get_target_outputs(":generate_public_suffix_list_sources") + defines = [ "ENABLE_PUBLIC_SUFFIX=1" ] + } else { + defines = [ "ENABLE_PUBLIC_SUFFIX=0" ] + } }