mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-09 11:27:32 -03:00
CrOS updates
This commit is contained in:
parent
cea0336649
commit
f01177e3b0
7 changed files with 8759 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2023 The Chromium Authors and Alex313031. All rights reserved.
|
||||
# Copyright 2023 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
|
@ -572,6 +572,13 @@ config("compiler") {
|
|||
ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
|
||||
}
|
||||
}
|
||||
|
||||
# TODO(crbug.com/1235145): Investigate why/if this should be needed.
|
||||
if (is_win) {
|
||||
cflags += [ "/clang:-ffp-contract=off" ]
|
||||
} else {
|
||||
cflags += [ "-ffp-contract=off" ]
|
||||
}
|
||||
}
|
||||
|
||||
# C11/C++11 compiler flags setup.
|
||||
|
@ -685,6 +692,7 @@ config("compiler") {
|
|||
"-mllvm:-import-instr-limit=$import_instr_limit",
|
||||
"-mllvm:-import-hot-multiplier=15",
|
||||
"-mllvm:-import-cold-multiplier=4",
|
||||
"-mllvm:-disable-auto-upgrade-debug-info",
|
||||
# "/lldltocache:" +
|
||||
# rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
|
||||
# "/lldltocachepolicy:$cache_policy",
|
||||
|
@ -727,6 +735,14 @@ config("compiler") {
|
|||
}
|
||||
|
||||
ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
|
||||
|
||||
if (!is_chromeos) {
|
||||
# TODO(https://crbug.com/972449): turn on for ChromeOS when that
|
||||
# toolchain has this flag.
|
||||
# We only use one version of LLVM within a build so there's no need to
|
||||
# upgrade debug info, which can be expensive since it runs the verifier.
|
||||
ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
|
||||
}
|
||||
}
|
||||
|
||||
# TODO(https://crbug.com/1211155): investigate why this isn't effective on
|
||||
|
@ -890,7 +906,7 @@ config("compiler") {
|
|||
"-Zremap-cwd-prefix=.",
|
||||
|
||||
# Full RUSTC optimizations.
|
||||
"-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul",
|
||||
"-Copt-level=3", "-Ctarget-feature=+sse4.1",
|
||||
]
|
||||
if (rust_abi_target != "") {
|
||||
rustflags += [ "--target=$rust_abi_target" ]
|
||||
|
@ -900,7 +916,7 @@ config("compiler") {
|
|||
rustflags += [ "-Cembed-bitcode=no" ]
|
||||
}
|
||||
if (is_official_build) {
|
||||
rustflags += [ "-Ccodegen-units=1", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ]
|
||||
rustflags += [ "-Ccodegen-units=1", "-Copt-level=3", "-Ctarget-feature=+sse4.1", ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -915,7 +931,7 @@ config("compiler") {
|
|||
# https://doc.rust-lang.org/rustc/linker-plugin-lto.html
|
||||
config("rust_defer_lto_to_linker") {
|
||||
if (!is_debug && use_thin_lto && is_a_target_toolchain) {
|
||||
rustflags = [ "-Clinker-plugin-lto", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ]
|
||||
rustflags = [ "-Clinker-plugin-lto", "-Copt-level=3", "-Ctarget-feature=+sse4.1", ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -935,7 +951,7 @@ config("thinlto_optimize_default") {
|
|||
# ldflags += [ "-Wl,-mllvm,-enable-pre=false", ]
|
||||
}
|
||||
|
||||
rustflags = [ "-Clto=thin" ]
|
||||
rustflags = [ "-Clinker-plugin-lto=yes" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -965,7 +981,7 @@ config("thinlto_optimize_max") {
|
|||
# ldflags += [ "-Wl,-mllvm,-enable-pre=false", ]
|
||||
}
|
||||
|
||||
rustflags = [ "-Clto=thin" ]
|
||||
rustflags = [ "-Clinker-plugin-lto=yes" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -997,11 +1013,9 @@ config("compiler_cpu_abi") {
|
|||
cflags += [
|
||||
"-m64",
|
||||
"-O3",
|
||||
"-mavx",
|
||||
"-maes",
|
||||
"-mpclmul",
|
||||
"-msse4.1",
|
||||
]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-mavx", "-maes", "-mpclmul", ]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-msse4.1", ]
|
||||
} else if (current_cpu == "x86") {
|
||||
cflags += [ "-m32" ]
|
||||
ldflags += [ "-m32", "-Wl,-O3", "-msse3", ]
|
||||
|
@ -1773,14 +1787,14 @@ config("chromium_code") {
|
|||
defines += [ "_FORTIFY_SOURCE=2" ]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
|
||||
cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
|
||||
if (is_apple) {
|
||||
cflags_objc = [ "-Wimplicit-retain-self" ]
|
||||
cflags_objcc = [ "-Wimplicit-retain-self" ]
|
||||
}
|
||||
|
||||
if (is_ios) {
|
||||
cflags_objc = [ "-Wimplicit-retain-self" ]
|
||||
cflags_objcc = cflags_objc
|
||||
if (is_mac) {
|
||||
cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
|
||||
cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2082,9 +2096,7 @@ if (is_win) {
|
|||
"-mllvm", "-enable-dfa-jump-thread",
|
||||
"/O2",
|
||||
"/clang:-O3",
|
||||
"/clang:-mavx",
|
||||
"/clang:-maes",
|
||||
"/clang:-mpclmul",
|
||||
"/clang:-msse4.1",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
|
||||
|
@ -2347,7 +2359,7 @@ config("optimize_max") {
|
|||
} else {
|
||||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
}
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ]
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+sse4.1", ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2380,13 +2392,13 @@ config("optimize_speed") {
|
|||
} else {
|
||||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
}
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ]
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+sse4.1", ]
|
||||
}
|
||||
}
|
||||
|
||||
config("optimize_fuzzing") {
|
||||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ]
|
||||
rustflags = [ "-Copt-level=3", "-Ctarget-feature=+sse4.1", ]
|
||||
ldflags = common_optimize_on_ldflags
|
||||
visibility = [ ":default_optimization" ]
|
||||
}
|
||||
|
@ -2510,6 +2522,7 @@ config("win_pdbaltpath") {
|
|||
|
||||
# Full symbols.
|
||||
config("symbols") {
|
||||
rustflags = []
|
||||
if (is_win) {
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
|
@ -2548,11 +2561,13 @@ config("symbols") {
|
|||
if (!is_nacl && current_os != "aix") {
|
||||
if (use_dwarf5) {
|
||||
cflags += [ "-gdwarf-5" ]
|
||||
rustflags += [ "-Zdwarf-version=5" ]
|
||||
} else if (!is_apple) {
|
||||
# Recent clang versions default to DWARF5 on Linux, and Android is about
|
||||
# to switch. TODO: Adopt that in controlled way.
|
||||
# Apple platforms still default to 4, so the flag is not needed there.
|
||||
cflags += [ "-gdwarf-4" ]
|
||||
rustflags += [ "-Zdwarf-version=4" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2643,7 +2658,7 @@ config("symbols") {
|
|||
]
|
||||
}
|
||||
}
|
||||
rustflags = [ "-g", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ]
|
||||
rustflags += [ "-g", "-Copt-level=3", "-Ctarget-feature=+sse4.1", ]
|
||||
}
|
||||
|
||||
# Minimal symbols.
|
||||
|
@ -2717,7 +2732,7 @@ config("minimal_symbols") {
|
|||
|
||||
asmflags = cflags
|
||||
}
|
||||
rustflags = [ "-Cdebuginfo=1", "-Copt-level=3", "-Ctarget-feature=+aes,+avx,-pclmul", ]
|
||||
rustflags = [ "-Cdebuginfo=1", "-Copt-level=3", "-Ctarget-feature=+sse4.1", ]
|
||||
}
|
||||
|
||||
# This configuration contains function names only. That is, the compiler is
|
||||
|
|
|
@ -285,9 +285,6 @@ if (!is_android && !is_mac) {
|
|||
# Chromium functionality directly into the executable.
|
||||
":dependencies",
|
||||
|
||||
# For configuring PartitionAlloc
|
||||
"//base/allocator:buildflags",
|
||||
|
||||
# For the sampling profiler.
|
||||
"//chrome/common/profiler",
|
||||
|
||||
|
@ -433,7 +430,6 @@ if (is_win) {
|
|||
":chrome_dll_manifest",
|
||||
":chrome_dll_version",
|
||||
":dependencies",
|
||||
"//base/allocator:buildflags",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:command_ids",
|
||||
"//chrome/app/theme:chrome_unscaled_resources",
|
||||
|
@ -947,6 +943,8 @@ if (is_win) {
|
|||
|
||||
bundle_data("chrome_framework_resources") {
|
||||
sources = [
|
||||
"//ui/gl/resources/angle-metal/gpu_shader_cache.bin",
|
||||
|
||||
# This image is used to badge the lock icon in the
|
||||
# authentication dialogs, such as those used for installation
|
||||
# from disk image and Keystone promotion (if so enabled). It
|
||||
|
@ -1161,7 +1159,6 @@ if (is_win) {
|
|||
|
||||
deps = [
|
||||
":dependencies",
|
||||
"//base/allocator:buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
"//chrome/app:command_ids",
|
||||
"//chrome/app:notification_metrics",
|
||||
|
@ -1428,6 +1425,7 @@ group("dependencies") {
|
|||
"//build:branding_buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
"//chrome/browser",
|
||||
"//chrome/browser:buildflags",
|
||||
"//chrome/browser/policy:path_parser",
|
||||
"//chrome/child",
|
||||
"//chrome/common",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2023 The Chromium Authors and Alex313031
|
||||
// Copyright 2023 The Chromium Authors and Alex313031
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
|
1076
other/CrOS/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
vendored
Executable file
1076
other/CrOS/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
vendored
Executable file
File diff suppressed because it is too large
Load diff
7626
other/CrOS/v8/BUILD.gn
Normal file
7626
other/CrOS/v8/BUILD.gn
Normal file
File diff suppressed because it is too large
Load diff
13
setup.sh
13
setup.sh
|
@ -26,6 +26,7 @@ displayHelp () {
|
|||
printf "${bold}${YEL}Use the --sse3 flag for SSE3 Builds.${c0}\n" &&
|
||||
printf "${bold}${YEL}Use the --sse2 flag for 32 bit SSE2 Builds.${c0}\n" &&
|
||||
printf "${bold}${YEL}Use the --android flag for Android Builds.${c0}\n" &&
|
||||
printf "${bold}${YEL}Use the --cros flag for ChromiumOS Builds.${c0}\n" &&
|
||||
printf "${bold}${YEL}IMPORTANT: For Polly builds, first run build_polly.sh in Thorium/infra, then use the setup_polly.sh${c0}\n" &&
|
||||
printf "${bold}${YEL}script in Thorium/other/Polly. Both of these actions should be taken AFTER running this script!${c0}\n" &&
|
||||
printf "\n"
|
||||
|
@ -194,6 +195,18 @@ case $1 in
|
|||
--android) copyAndroid;
|
||||
esac
|
||||
|
||||
# Copy CrOS files
|
||||
copyCros () {
|
||||
printf "\n" &&
|
||||
printf "${YEL}Copying ChromiumOS build files...${c0}\n" &&
|
||||
cp -r -v other/CrOS/* ${CR_SRC_DIR}/ &&
|
||||
cp -r -v other/CrOS/* ${CR_SRC_DIR}/ &&
|
||||
printf "\n"
|
||||
}
|
||||
case $1 in
|
||||
--cros) copyCros;
|
||||
esac
|
||||
|
||||
printf "${GRE}Done!\n" &&
|
||||
printf "\n" &&
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2023 The Chromium Authors and Alex313031
|
||||
// Copyright 2023 The Chromium Authors and Alex313031
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
|
Loading…
Reference in a new issue