mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Remove unused SerenityOS references from the GN build
This commit is contained in:
parent
d28412ed34
commit
a089c00e02
Notes:
sideshowbarker
2024-07-17 05:05:51 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/a089c00e02 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/35
15 changed files with 19 additions and 172 deletions
|
@ -1,31 +0,0 @@
|
|||
declare_args() {
|
||||
# Serenity architecture to build for
|
||||
serenity_arch = "x86_64"
|
||||
|
||||
# Serenity compiler to use, Clang or GNU
|
||||
serenity_toolchain = "GNU"
|
||||
}
|
||||
|
||||
if (serenity_toolchain == "GNU") {
|
||||
toolchain_root =
|
||||
rebase_path("//Toolchain/Local/$serenity_arch/", root_build_dir)
|
||||
toolchain_bin = toolchain_root + "bin/"
|
||||
|
||||
serenity_cc = toolchain_bin + serenity_arch + "-pc-serenity-gcc"
|
||||
serenity_cxx = toolchain_bin + serenity_arch + "-pc-serenity-g++"
|
||||
serenity_ld = serenity_cxx
|
||||
serenity_nm = toolchain_bin + serenity_arch + "-pc-serenity-nm"
|
||||
serenity_objcopy = toolchain_bin + serenity_arch + "-pc-serenity-objcopy"
|
||||
serenity_compiler_version = "13.1.0"
|
||||
} else {
|
||||
assert(serenity_toolchain == "Clang",
|
||||
"Expected GNU or Clang for serenity_toolchain")
|
||||
toolchain_root = rebase_path("//Toolchain/Local/clang/", root_build_dir)
|
||||
toolchain_bin = toolchain_root + "bin/"
|
||||
serenity_cc = toolchain_bin + serenity_arch + "-pc-serenity-clang"
|
||||
serenity_cxx = toolchain_bin + serenity_arch + "-pc-serenity-clang++"
|
||||
serenity_ld = serenity_cxx
|
||||
serenity_nm = toolchain_bin + "llvm-nm"
|
||||
serenity_objcopy = toolchain_bin + "llvm-objcopy"
|
||||
serenity_compiler_version = "16"
|
||||
}
|
|
@ -1,7 +1,4 @@
|
|||
declare_args() {
|
||||
# Path of sysroot to use.
|
||||
sysroot = ""
|
||||
if (current_os == "serenity") {
|
||||
sysroot = "$root_build_dir/Root"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import("//Meta/gn/build/serenity_target.gni")
|
||||
import("//Meta/gn/build/toolchain/compiler.gni")
|
||||
|
||||
unix_copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})"
|
||||
|
@ -76,13 +75,8 @@ template("unix_toolchain") {
|
|||
}
|
||||
description = "AR {{output}}"
|
||||
outputs = [ "{{output_dir}}/{{target_output_name}}.a" ]
|
||||
output_prefix = "lib"
|
||||
if (current_os == "serenity") {
|
||||
default_output_dir = "{{target_out_dir}}"
|
||||
} else {
|
||||
output_prefix = "liblagom-"
|
||||
default_output_dir = "{{root_out_dir}}/lib"
|
||||
}
|
||||
output_prefix = "liblagom-"
|
||||
default_output_dir = "{{root_out_dir}}/lib"
|
||||
}
|
||||
|
||||
# Make these apply to all tools below.
|
||||
|
@ -100,13 +94,8 @@ template("unix_toolchain") {
|
|||
}
|
||||
description = "SOLINK $outfile"
|
||||
outputs = [ outfile ]
|
||||
output_prefix = "lib"
|
||||
if (current_os == "serenity") {
|
||||
default_output_dir = "{{target_out_dir}}"
|
||||
} else {
|
||||
output_prefix = "liblagom-"
|
||||
default_output_dir = "{{root_out_dir}}/lib"
|
||||
}
|
||||
output_prefix = "liblagom-"
|
||||
default_output_dir = "{{root_out_dir}}/lib"
|
||||
}
|
||||
|
||||
tool("solink_module") {
|
||||
|
@ -120,12 +109,8 @@ template("unix_toolchain") {
|
|||
}
|
||||
description = "SOLINK $outfile"
|
||||
outputs = [ outfile ]
|
||||
if (current_os == "serenity") {
|
||||
default_output_dir = "{{target_out_dir}}"
|
||||
} else {
|
||||
output_prefix = "lagom-"
|
||||
default_output_dir = "{{root_out_dir}}/lib"
|
||||
}
|
||||
output_prefix = "lagom-"
|
||||
default_output_dir = "{{root_out_dir}}/lib"
|
||||
}
|
||||
|
||||
tool("link") {
|
||||
|
@ -140,14 +125,7 @@ template("unix_toolchain") {
|
|||
}
|
||||
description = "LINK $outfile"
|
||||
outputs = [ outfile ]
|
||||
|
||||
if (current_os == "serenity") {
|
||||
# Setting this allows targets to override the default executable output by
|
||||
# setting output_dir.
|
||||
default_output_dir = "{{target_out_dir}}"
|
||||
} else {
|
||||
default_output_dir = "{{root_out_dir}}/bin"
|
||||
}
|
||||
default_output_dir = "{{root_out_dir}}/bin"
|
||||
}
|
||||
|
||||
tool("copy") {
|
||||
|
@ -166,7 +144,7 @@ template("unix_toolchain") {
|
|||
}
|
||||
tool("compile_xcassets") {
|
||||
command = "false"
|
||||
description = "The serenity build doesn't use any xcasset files"
|
||||
description = "The Ladybird build doesn't use any xcasset files"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,15 +171,3 @@ unix_toolchain("unix") {
|
|||
ld = host_cxx
|
||||
}
|
||||
}
|
||||
|
||||
unix_toolchain("serenity") {
|
||||
cc = serenity_cc
|
||||
cxx = serenity_cxx
|
||||
ld = serenity_ld
|
||||
toolchain_args = {
|
||||
current_os = "serenity"
|
||||
current_cpu = serenity_arch
|
||||
is_clang = serenity_toolchain == "Clang"
|
||||
use_lld = is_clang
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,16 +12,6 @@ group("default") {
|
|||
testonly = true
|
||||
}
|
||||
|
||||
group("serenity") {
|
||||
deps = [ "//Kernel(//Meta/gn/build/toolchain:serenity)" ]
|
||||
}
|
||||
|
||||
group("macpdf") {
|
||||
if (current_os == "mac") {
|
||||
deps = [ "//Meta/Lagom/Contrib/MacPDF" ]
|
||||
}
|
||||
}
|
||||
|
||||
# A pool called "console" in the root BUILD.gn is magic and represents ninja's
|
||||
# built-in console pool. (Requires a GN with `gn --version` >= 552353.)
|
||||
pool("console") {
|
||||
|
|
|
@ -12,7 +12,10 @@ template("unittest") {
|
|||
deps = []
|
||||
}
|
||||
|
||||
deps += [ "//AK" ]
|
||||
deps += [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
]
|
||||
if (has_custom_main) {
|
||||
deps += [ "//Userland/Libraries/LibTest" ]
|
||||
} else if (use_js_main) {
|
||||
|
@ -21,10 +24,6 @@ template("unittest") {
|
|||
deps += [ "//Userland/Libraries/LibTest:test_main" ]
|
||||
}
|
||||
|
||||
if (current_os != "serenity") {
|
||||
deps += [ "//Userland/Libraries/LibCore" ]
|
||||
}
|
||||
|
||||
testonly = true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import("//Meta/gn/build/libs/pulse/enable.gni")
|
||||
|
||||
# TODO: AudioClient IPC files for serenity
|
||||
|
||||
shared_library("LibAudio") {
|
||||
include_dirs = [ "//Userland/Libraries" ]
|
||||
sources = [
|
||||
|
|
|
@ -122,9 +122,7 @@ source_set("sources") {
|
|||
sources += [ "MachPort.cpp" ]
|
||||
}
|
||||
|
||||
if (current_os == "serenity") {
|
||||
sources += [ "Platform/ProcessStatisticsSerenity.cpp" ]
|
||||
} else if (current_os == "linux") {
|
||||
if (current_os == "linux") {
|
||||
sources += [ "Platform/ProcessStatisticsLinux.cpp" ]
|
||||
} else if (current_os == "mac") {
|
||||
sources += [
|
||||
|
@ -150,8 +148,6 @@ source_set("filewatcher") {
|
|||
"CoreServices.framework",
|
||||
"Foundation.framework",
|
||||
]
|
||||
} else if (current_os == "serenity") {
|
||||
sources += [ "FileWatcherSerenity.cpp" ]
|
||||
} else {
|
||||
sources += [ "FileWatcherUnimplemented.cpp" ]
|
||||
}
|
||||
|
|
|
@ -1,36 +1,8 @@
|
|||
group("LibCrypt") {
|
||||
deps = []
|
||||
libs = []
|
||||
if (current_os == "serenity") {
|
||||
deps += [
|
||||
":crypt_shared",
|
||||
":crypt_static",
|
||||
]
|
||||
} else if (current_os == "linux") {
|
||||
|
||||
if (current_os == "linux") {
|
||||
libs += [ "crypt" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (current_os == "serenity") {
|
||||
# FIXME: Special handling for LibCrypo/Hash/SHA2.cpp
|
||||
shared_library("crypt_shared") {
|
||||
output_name = "crypt"
|
||||
cflags_cc = [ "-nostdlib" ]
|
||||
ldflags = [
|
||||
"-nostdlib",
|
||||
"-static-libstdc++",
|
||||
]
|
||||
sources = [
|
||||
"crypt.cpp",
|
||||
"crypt.h",
|
||||
]
|
||||
}
|
||||
|
||||
static_library("crypt_static") {
|
||||
output_name = "crypt"
|
||||
sources = [
|
||||
"crypt.cpp",
|
||||
"crypt.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@ action("generate_tiff_sources") {
|
|||
"$target_gen_dir/ImageFormats/TIFFMetadata.h",
|
||||
"$target_gen_dir/ImageFormats/TIFFTagHandler.cpp",
|
||||
]
|
||||
|
||||
# FIXME: install header into $prefix/include/LibGfx/ImageFormats on serenity
|
||||
}
|
||||
|
||||
config("tiff_headers") {
|
||||
|
|
|
@ -138,7 +138,6 @@ if (enable_unicode_database_download) {
|
|||
]
|
||||
}
|
||||
|
||||
# FIXME: Add optimization for serenity to use these as a shlib
|
||||
source_set("locale_data_sources") {
|
||||
include_dirs = [
|
||||
"//Userland/Libraries",
|
||||
|
|
|
@ -8,9 +8,6 @@ shared_library("LibRegex") {
|
|||
"RegexOptimizer.cpp",
|
||||
"RegexParser.cpp",
|
||||
]
|
||||
if (current_os == "serenity") {
|
||||
sources += [ "C/Regex.cpp" ]
|
||||
}
|
||||
deps = [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibUnicode",
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
group("LibSystem") {
|
||||
deps = []
|
||||
if (current_os == "serenity") {
|
||||
deps += [
|
||||
":system_shared",
|
||||
":system_static",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (current_os == "serenity") {
|
||||
shared_library("system_shared") {
|
||||
output_name = "system"
|
||||
cflags_cc = [ "-nostdlib" ]
|
||||
ldflags = [
|
||||
"-nostdlib",
|
||||
"-static-libstdc++",
|
||||
]
|
||||
sources = [
|
||||
"syscall.cpp",
|
||||
"syscall.h",
|
||||
]
|
||||
}
|
||||
|
||||
static_library("system_static") {
|
||||
output_name = "system"
|
||||
sources = [
|
||||
"syscall.cpp",
|
||||
"syscall.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ if (enable_cacert_download) {
|
|||
version_file = cacert_cache + "version.txt"
|
||||
sha256 = "ccbdfc2fe1a0d7bbbb9cc15710271acf1bb1afe4c8f1725fe95c4c7733fcbe5a"
|
||||
}
|
||||
# FIXME: Copy file to /etc/cacert.pem on serenity
|
||||
}
|
||||
|
||||
shared_library("LibTLS") {
|
||||
|
|
|
@ -13,10 +13,10 @@ shared_library("LibTest") {
|
|||
"TestSuite.h",
|
||||
]
|
||||
|
||||
deps = [ "//AK" ]
|
||||
if (current_os != "serenity") {
|
||||
deps += [ "//Userland/Libraries/LibCore" ]
|
||||
}
|
||||
deps = [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
]
|
||||
|
||||
output_name = "test"
|
||||
|
||||
|
|
|
@ -171,8 +171,4 @@ shared_library("LibWebView") {
|
|||
} else {
|
||||
defines = [ "ENABLE_PUBLIC_SUFFIX=0" ]
|
||||
}
|
||||
|
||||
if (current_os == "serenity") {
|
||||
sources += [ "OutOfProcessWebView.cpp" ]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue