mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Meta: Port recent changes to gn BUILD
5c7e5cc738
a8f0fa5dd4
0d417cd604
5b87d26027
(and other friends from the JIT PR)f915aa70cd
This commit is contained in:
parent
d8ab9ed87c
commit
faa8ef98c9
Notes:
sideshowbarker
2024-07-17 23:00:03 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/faa8ef98c9 Pull-request: https://github.com/SerenityOS/serenity/pull/21624
12 changed files with 146 additions and 63 deletions
|
@ -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",
|
||||
|
|
19
Meta/gn/secondary/Ladybird/ImageDecoder/BUILD.gn
Normal file
19
Meta/gn/secondary/Ladybird/ImageDecoder/BUILD.gn
Normal file
|
@ -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",
|
||||
]
|
||||
}
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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")
|
||||
}
|
12
Meta/gn/secondary/Userland/Libraries/LibJIT/BUILD.gn
Normal file
12
Meta/gn/secondary/Userland/Libraries/LibJIT/BUILD.gn
Normal file
|
@ -0,0 +1,12 @@
|
|||
shared_library("LibJIT") {
|
||||
output_name = "jit"
|
||||
include_dirs = [ "//Userland/Libraries" ]
|
||||
sources = [
|
||||
"Assembler.cpp",
|
||||
"Assembler.h",
|
||||
]
|
||||
deps = [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
]
|
||||
}
|
|
@ -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",
|
||||
|
|
|
@ -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" ]
|
||||
}
|
||||
}
|
|
@ -59,6 +59,7 @@ source_set("CSS") {
|
|||
"Supports.cpp",
|
||||
"SystemColor.cpp",
|
||||
"Time.cpp",
|
||||
"Transformation.cpp",
|
||||
"VisualViewport.cpp",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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" ]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue