1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

Meta: Port recent changes to gn build

299d35aadc
7d9fe44039
58f08107b0
2cb0039a13
bc70144df1
48a9d0ede8
149e382735
This commit is contained in:
Andrew Kaster 2023-12-12 20:25:27 -07:00 committed by Andrew Kaster
parent e0f990f1cb
commit 6e4d5b310f
5 changed files with 75 additions and 4 deletions

View file

@ -9,3 +9,8 @@ lagom_tool("GenerateEmojiData") {
sources = [ "GenerateEmojiData.cpp" ]
deps = [ "//Userland/Libraries/LibMain" ]
}
lagom_tool("GenerateIDNAData") {
sources = [ "GenerateIDNAData.cpp" ]
deps = [ "//Userland/Libraries/LibMain" ]
}

View file

@ -0,0 +1,22 @@
shared_library("LibELF") {
output_name = "elf"
include_dirs = [ "//Userland/Libraries" ]
sources = [
"AuxiliaryVector.h",
"Core.h",
"ELFABI.h",
"ELFBuild.cpp",
"ELFBuild.h",
"Hashes.h",
"Image.cpp",
"Image.h",
"Relocation.cpp",
"Relocation.h",
"Validation.cpp",
"Validation.h",
]
deps = [
"//AK",
"//Userland/Libraries/LibCore",
]
}

View file

@ -53,6 +53,7 @@ shared_library("LibGfx") {
"Font/Typeface.cpp",
"Font/WOFF/Font.cpp",
"Font/WOFF2/Font.cpp",
"FontCascadeList.cpp",
"GradientPainting.cpp",
"ICC/BinaryWriter.cpp",
"ICC/Enums.cpp",

View file

@ -4,9 +4,18 @@ shared_library("LibJIT") {
sources = [
"Assembler.cpp",
"Assembler.h",
"GDB.cpp",
"GDB.h",
]
deps = [
"//AK",
"//Userland/Libraries/LibCore",
]
if (current_os == "mac") {
sources += [ "GDBUnsupported.cpp" ]
} else {
sources += [ "GDBElf.cpp" ]
deps += [ "//Userland/Libraries/LibELF" ]
}
}

View file

@ -6,22 +6,33 @@ import("//Userland/Libraries/LibUnicode/enable_unicode_download.gni")
unicode_cache = cache_path + "UCD/"
emoji_cache = cache_path + "EMOJI/"
idna_cache = cache_path + "IDNA/"
unicode_version = "15.1.0"
emoji_version = "15.1"
if (enable_unicode_database_download) {
download_file("unicode_database_download") {
version = "15.1.0"
url = "https://www.unicode.org/Public/" + version + "/ucd/UCD.zip"
version = unicode_version
url = "https://www.unicode.org/Public/$version/ucd/UCD.zip"
cache = unicode_cache
output = "UCD.zip"
version_file = "version.txt"
}
download_file("emoji_test_download") {
version = "15.1"
url = "https://www.unicode.org/Public/emoji/" + version + "/emoji-test.txt"
version = emoji_version
url = "https://www.unicode.org/Public/emoji/$version/emoji-test.txt"
cache = emoji_cache
output = "emoji-test.txt"
version_file = "emoji-test-version.txt"
}
download_file("idna_mapping_table_download") {
version = unicode_version
url = "https://www.unicode.org/Public/idna/$version/IdnaMappingTable.txt"
cache = idna_cache
output = "IdnaMappingTable.txt"
version_file = "version.txt"
}
extract_archive_contents("unicode_database_files") {
deps = [ ":unicode_database_download" ]
@ -128,6 +139,24 @@ if (enable_unicode_database_download) {
# "//Base/home/anon/Documents/emoji-serenity.txt"
# and "//Base/res/emoji"?
}
compiled_action("generate_idna_sources") {
tool = "//Meta/Lagom/Tools/CodeGenerators/LibUnicode:GenerateIDNAData"
deps = [ ":idna_mapping_table_download" ]
inputs = get_target_outputs(":idna_mapping_table_download")
outputs = [
"$target_gen_dir/IDNAData.h",
"$target_gen_dir/IDNAData.cpp",
]
args = [
"-h",
rebase_path(outputs[0], root_build_dir),
"-c",
rebase_path(outputs[1], root_build_dir),
"-m",
rebase_path(inputs[0], root_build_dir),
]
}
}
source_set("LibUnicode") {
@ -140,9 +169,12 @@ source_set("LibUnicode") {
"CharacterTypes.cpp",
"CurrencyCode.cpp",
"Emoji.cpp",
"IDNA.cpp",
"Normalize.cpp",
"Punycode.cpp",
"Segmentation.cpp",
"String.cpp",
"URL.cpp",
"UnicodeUtils.cpp",
]
deps = [
@ -152,10 +184,12 @@ source_set("LibUnicode") {
if (enable_unicode_database_download) {
deps += [
":generate_emoji_sources",
":generate_idna_sources",
":generate_unicode_sources",
]
sources += get_target_outputs(":generate_unicode_sources")
sources += get_target_outputs(":generate_emoji_sources")
sources += get_target_outputs(":generate_idna_sources")
defines = [ "ENABLE_UNICODE_DATA=1" ]
} else {
defines = [ "ENABLE_UNICODE_DATA=0" ]