M116 stage 1

This commit is contained in:
Alexander Frick 2023-09-03 14:00:07 -05:00
parent d914ad134d
commit ba32626371
21 changed files with 1234 additions and 265 deletions

View File

@ -279,6 +279,7 @@ config("compiler") {
ldflags = []
defines = []
configs = []
rustflags = []
# System-specific flags. If your compiler flags apply to one of the
# categories here, add it to the associated file to keep this shared config
@ -457,9 +458,11 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
rustflags += [ "-Cforce-unwind-tables=no" ]
defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
rustflags += [ "-Cforce-unwind-tables=yes" ]
}
}
}
@ -781,8 +784,12 @@ config("compiler") {
cflags += [ "-fwhole-program-vtables" ]
# whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
# behaviour.
rustflags += [ "-Zsplit-lto-unit" ]
# behaviour. Rust needs to know the linker will be doing LTO in this case
# or it rejects the Zsplit-lto-unit flag.
rustflags += [
"-Zsplit-lto-unit",
"-Clinker-plugin-lto=yes",
]
if (!is_win) {
ldflags += [ "-fwhole-program-vtables" ]
@ -980,11 +987,6 @@ config("compiler") {
# to compile dylibs on Android, such as for constructing unit test APKs.
"-Cdefault-linker-libraries",
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
"-Dunsafe_op_in_unsafe_fn",
# To make Rust .d files compatible with ninja
"-Zdep-info-omit-d-target",
@ -1026,6 +1028,18 @@ config("compiler") {
"-Zpanic_abort_tests",
]
}
# Normally, this would be defined in the `runtime_library` config but NaCl
# saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
# isn't really a better config to add this define for the define to
# consistently apply in both Chromium and non-Chromium code *and* non-NaCl
# and NaCl code.
#
# TODO(https://crbug.com/702997): Move this back to the `runtime_library`
# config when NaCl is removed.
if (use_safe_libcxx) {
defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
}
}
# The BUILDCONFIG file sets this config on targets by default, which means when
@ -1617,6 +1631,16 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
# Rust and C++ both provide intrinsics for LLVM to call for math operations. We
# want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
# library. The Rust symbols are marked as weak, so that they can be replaced by
# the C++ symbols. This config ensures the C++ symbols exist and are strong in
# order to cause that replacement to occur by explicitly linking in clang's
# compiler-rt library.
if (is_clang && toolchain_has_rust) {
configs += [ "//build/config/clang:compiler_builtins" ]
}
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {
@ -1788,9 +1812,21 @@ config("default_warnings") {
# TODO(crbug.com/1412713) Evaluate and possibly enable.
"-Wno-deprecated-this-capture",
]
if (llvm_force_head_revision) {
# TODO(https://crbug.com/1448905): Evaluate and possibly enable.
cflags += [ "-Wno-builtin-macro-redefined" ]
}
}
}
}
# Rust warnings
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
}
# prevent_unsafe_narrowing ----------------------------------------------------
@ -1999,7 +2035,7 @@ config("no_chromium_code") {
config("noshadowing") {
# This flag has to be disabled for nacl because the nacl compiler is too
# strict about shadowing.
if (is_clang && (!is_nacl || is_nacl_saigo)) {
if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) {
cflags = [ "-Wshadow" ]
}
}
@ -2856,10 +2892,22 @@ config("strip_debug") {
}
if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
# On macOS and iOS, this enables support for ARC (automatic reference
# counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
#
# -fobjc-arc enables ARC overall.
#
# ARC does not add exception handlers to pure Objective-C code, but does add
# them to Objective-C++ code with the rationale that C++ pervasively adds them
# in for exception safety. However, exceptions are banned in Chromium code for
# C++ and exceptions in Objective-C code are intended to be fatal, so
# -fno-objc-arc-exceptions is specified to disable these unwanted exception
# handlers.
config("enable_arc") {
common_flags = [ "-fobjc-arc" ]
common_flags = [
"-fobjc-arc",
"-fno-objc-arc-exceptions",
]
cflags_objc = common_flags
cflags_objcc = common_flags
}

View File

@ -118,7 +118,7 @@ config("compiler") {
cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
}
} else if (current_cpu == "arm64") {
cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
} else {
assert(false, "unknown current_cpu " + current_cpu)
}
@ -435,6 +435,7 @@ config("delayloads") {
"/DELAYLOAD:setupapi.dll",
"/DELAYLOAD:shell32.dll",
"/DELAYLOAD:shlwapi.dll",
"/DELAYLOAD:uiautomationcore.dll",
"/DELAYLOAD:urlmon.dll",
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:usp10.dll",

View File

@ -279,6 +279,7 @@ config("compiler") {
ldflags = []
defines = []
configs = []
rustflags = []
# System-specific flags. If your compiler flags apply to one of the
# categories here, add it to the associated file to keep this shared config
@ -457,9 +458,11 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
rustflags += [ "-Cforce-unwind-tables=no" ]
defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
rustflags += [ "-Cforce-unwind-tables=yes" ]
}
}
}
@ -781,8 +784,12 @@ config("compiler") {
cflags += [ "-fwhole-program-vtables" ]
# whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
# behaviour.
rustflags += [ "-Zsplit-lto-unit" ]
# behaviour. Rust needs to know the linker will be doing LTO in this case
# or it rejects the Zsplit-lto-unit flag.
rustflags += [
"-Zsplit-lto-unit",
"-Clinker-plugin-lto=yes",
]
if (!is_win) {
ldflags += [ "-fwhole-program-vtables" ]
@ -971,11 +978,6 @@ config("compiler") {
# to compile dylibs on Android, such as for constructing unit test APKs.
"-Cdefault-linker-libraries",
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
"-Dunsafe_op_in_unsafe_fn",
# To make Rust .d files compatible with ninja
"-Zdep-info-omit-d-target",
@ -1017,6 +1019,18 @@ config("compiler") {
"-Zpanic_abort_tests",
]
}
# Normally, this would be defined in the `runtime_library` config but NaCl
# saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
# isn't really a better config to add this define for the define to
# consistently apply in both Chromium and non-Chromium code *and* non-NaCl
# and NaCl code.
#
# TODO(https://crbug.com/702997): Move this back to the `runtime_library`
# config when NaCl is removed.
if (use_safe_libcxx) {
defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
}
}
# The BUILDCONFIG file sets this config on targets by default, which means when
@ -1592,6 +1606,16 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
# Rust and C++ both provide intrinsics for LLVM to call for math operations. We
# want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
# library. The Rust symbols are marked as weak, so that they can be replaced by
# the C++ symbols. This config ensures the C++ symbols exist and are strong in
# order to cause that replacement to occur by explicitly linking in clang's
# compiler-rt library.
if (is_clang && toolchain_has_rust) {
configs += [ "//build/config/clang:compiler_builtins" ]
}
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {
@ -1763,9 +1787,21 @@ config("default_warnings") {
# TODO(crbug.com/1412713) Evaluate and possibly enable.
"-Wno-deprecated-this-capture",
]
if (llvm_force_head_revision) {
# TODO(https://crbug.com/1448905): Evaluate and possibly enable.
cflags += [ "-Wno-builtin-macro-redefined" ]
}
}
}
}
# Rust warnings
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
}
# prevent_unsafe_narrowing ----------------------------------------------------
@ -1974,7 +2010,7 @@ config("no_chromium_code") {
config("noshadowing") {
# This flag has to be disabled for nacl because the nacl compiler is too
# strict about shadowing.
if (is_clang && (!is_nacl || is_nacl_saigo)) {
if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) {
cflags = [ "-Wshadow" ]
}
}
@ -2791,10 +2827,22 @@ config("strip_debug") {
}
if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
# On macOS and iOS, this enables support for ARC (automatic reference
# counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
#
# -fobjc-arc enables ARC overall.
#
# ARC does not add exception handlers to pure Objective-C code, but does add
# them to Objective-C++ code with the rationale that C++ pervasively adds them
# in for exception safety. However, exceptions are banned in Chromium code for
# C++ and exceptions in Objective-C code are intended to be fatal, so
# -fno-objc-arc-exceptions is specified to disable these unwanted exception
# handlers.
config("enable_arc") {
common_flags = [ "-fobjc-arc" ]
common_flags = [
"-fobjc-arc",
"-fno-objc-arc-exceptions",
]
cflags_objc = common_flags
cflags_objcc = common_flags
}

View File

@ -277,12 +277,31 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
<part file="settings_chromium_strings.grdp" />
</if>
<message name="IDS_PRODUCT_NAME" desc="The Thorium application name">
Thorium
</message>
<message name="IDS_SHORT_PRODUCT_NAME" desc="The Thorium application short name.">
Thorium
</message>
<!--
Even though Google Thorium for Testing is a separate brand, there is
no separate file for it. Instead, we use the same file as Thorium, with
a few select overrides for the most prominent end-user strings.
Rationale: https://goo.gle/chrome-for-testing#bookmark=id.n1rat320av91
-->
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_PRODUCT_NAME" desc="The Thorium for Testing application name" translateable="false">
Google Thorium for Testing
</message>
<message name="IDS_SHORT_PRODUCT_NAME" desc="The Thorium for Testing application short name." translateable="false">
Thorium for Testing
</message>
</then>
<else>
<message name="IDS_PRODUCT_NAME" desc="The Thorium application name" translateable="false">
Thorium
</message>
<message name="IDS_SHORT_PRODUCT_NAME" desc="The Thorium application short name." translateable="false">
Thorium
</message>
</else>
</if>
<if expr="is_win">
<message name="IDS_SXS_SHORTCUT_NAME" desc="Unused in Thorium builds" translateable="false">
</message>
@ -443,7 +462,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
Thorium may not function correctly because it is no longer supported on this Linux distribution
</message>
</if>
<message name="IDS_ACCNAME_APP" desc="The accessible name for the app menu.">
<message name="IDS_ACCNAME_APP" desc="The accessible name for the app menu." translateable="false">
Thorium
</message>
<!-- Hung Browser Detector -->
@ -521,7 +540,7 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
<!-- Crash Recovery Dialog -->
<message name="IDS_CRASH_RECOVERY_TITLE" desc="Title of dialog shown when the browser crashes.">
<message name="IDS_CRASH_RECOVERY_TITLE" desc="Title of dialog shown when the browser crashes." translateable="false">
Thorium
</message>
<if expr="is_win">
@ -537,7 +556,7 @@ Permissions you've already given to websites and apps may apply to this account.
<message name="IDS_PASSWORD_MANAGER_ONBOARDING_DETAILS_C" desc="The explanation text that is shown below the title in the password manager onboarding dialog.">
Thorium lets you know if your passwords are ever compromised
</message>
<message name="IDS_PASSWORD_MANAGER_TITLE_BRAND" desc="The product name used in the title of the password bubble.">
<message name="IDS_PASSWORD_MANAGER_TITLE_BRAND" desc="The product name used in the title of the password bubble." translateable="false">
Thorium
</message>
<message name="IDS_PASSWORD_BUBBLES_PASSWORD_MANAGER_LINK_TEXT_SAVING_ON_DEVICE" desc="The text of the Google Password Manager links displayed on Password Manager bubbles footer when the credentials are stored only locally.">
@ -748,6 +767,17 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
<!-- Extension Safety Check Detail Page strings -->
<message name="IDS_SAFETY_CHECK_EXTENSIONS_MALWARE" desc="The text explaining the reason for disabling extension. The extension in question contains malware.">
This extension contains malware and is unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
</message>
<message name="IDS_SAFETY_CHECK_EXTENSIONS_POLICY_VIOLATION" desc="The text explaining the reason for disabling extension. The extension in question violates Thorium Web Store policy.">
This extension violates the Thorium Web Store policy, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
</message>
<message name="IDS_SAFETY_CHECK_EXTENSIONS_UNPUBLISHED" desc="The text explaining the reason for disabling extension. The extension in question was unpublished by the developer.">
This extension was unpublished by its developer, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
</message>
<!-- chrome://settings/extensions page -->
<message name="IDS_EXTENSIONS_ITEM_SHOW_ACCESS_REQUESTS_IN_TOOLBAR" desc="The label on the toggle to allow the extension to show site access requests in the toolbar.">
Allow extension to show access requests in the Thorium toolbar
@ -789,17 +819,35 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
<if expr="use_titlecase and not chromeos_ash">
<message name="IDS_ABOUT" desc="In Title Case: The text label of the About Thorium menu item">
About &amp;Thorium
</message>
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_ABOUT" desc="In Title Case: The text label of the About Thorium for Testing menu item">
About &amp;Google Thorium for Testing
</message>
</then>
<else>
<message name="IDS_ABOUT" desc="In Title Case: The text label of the About Thorium menu item">
About &amp;Thorium
</message>
</else>
</if>
<message name="IDS_RELAUNCH_TO_UPDATE" desc="In Title Case: The text label of the relaunch to update Thorium menu item">
Relaunch to Update &amp;Thorium
</message>
</if>
<if expr="not use_titlecase and not chromeos_ash">
<message name="IDS_ABOUT" desc="The text label of the About Thorium menu item">
About &amp;Thorium
</message>
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_ABOUT" desc="The text label of the About Thorium for Testing menu item">
About &amp;Google Thorium for Testing
</message>
</then>
<else>
<message name="IDS_ABOUT" desc="The text label of the About Thorium menu item">
About &amp;Thorium
</message>
</else>
</if>
<message name="IDS_RELAUNCH_TO_UPDATE" desc="The text label of the relaunch to update Thorium menu item">
Relaunch to update &amp;Thorium
</message>
@ -820,7 +868,7 @@ Permissions you've already given to websites and apps may apply to this account.
</if>
<if expr="is_macosx">
<message name="IDS_APP_MENU_PRODUCT_NAME" desc="The application's short name, used for the Mac's application menu, activity monitor, etc. This should be less than 16 characters. Example: Thorium, not Google Thorium.">
<message name="IDS_APP_MENU_PRODUCT_NAME" desc="The application's short name, used for the Mac's application menu, activity monitor, etc. This should be less than 16 characters. Example: Thorium, not Google Thorium." translateable="false">
Thorium
</message>
<message name="IDS_HELPER_NAME" desc="The helper application's name. Should contain the Thorium application name (IDS_PRODUCT_NAME). Example: Google Thorium Helper.">
@ -832,11 +880,11 @@ Permissions you've already given to websites and apps may apply to this account.
</if>
<message name="IDS_VIEW_PASSWORDS" desc="Item in the app menu which shows Password Manager page">
Password Manager
P&amp;assword Manager
</message>
<!-- Thorium sign-in page -->
<message name="IDS_CHROME_SIGNIN_TITLE" desc="Title on the about:chrome-signin page">
<message name="IDS_CHROME_SIGNIN_TITLE" desc="Title on the about:chrome-signin page" translateable="false">
Thorium
</message>
@ -1072,6 +1120,22 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
<if expr="not is_android">
<!-- Password Manager Tutorial Strings -->
<message name="IDS_TUTORIAL_PASSWORD_MANAGER_OPEN_APP_MENU" desc="The description of the 'open add menu' step in password manager tutorial">
Click the Thorium menu
</message>
<message name="IDS_TUTORIAL_PASSWORD_MANAGER_CLICK_PASSWORD_MANAGER" desc="The description of the 'click password manager' step in password manager tutorial">
Click “Password Manager”
</message>
<message name="IDS_TUTORIAL_PASSWORD_MANAGER_SUCCESS_BODY" desc="The description of the body text in the 'success' step in password manager tutorial">
Use your shortcut to quickly get to the Password Manager. You can move your shortcut to your computer's home screen or app launcher.
</message>
<message name="IDS_PASSWORD_MANAGER_IPH_CREATE_SHORTCUT_BODY" desc="Body of the in Product Help shown after successfully logging into a website telling user about how to create a shortcut">
Add a shortcut to Password Manager
</message>
</if>
<!-- Settings API bubble -->
<message name="IDS_EXTENSIONS_SETTINGS_API_FIRST_LINE_START_PAGES_SPECIFIC" desc="Text displayed in the Settings API bubble as first line when an extension has changed the start pages, and we are pointing to its icon.">
This extension has changed what page is shown when you start Thorium.
@ -1405,18 +1469,18 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
<message name="IDS_IDLE_TIMEOUT_CLOSE_BODY" desc="First sentence in the Idle Timeout dialog, warning the user that Thorium is going to close automatically.">
{COUNT, plural,
=1 {Your administrator automatically closes Thorium when it isn't used for 1 minute.}
other {Your administrator automatically closes Thorium when it isn't used for # minutes.}}
=1 {Your organization automatically closes Thorium when it isn't used for 1 minute.}
other {Your organization automatically closes Thorium when it isn't used for # minutes.}}
</message>
<message name="IDS_IDLE_TIMEOUT_CLEAR_BODY" desc="First sentence in the Idle Timeout dialog, warning the user that Thorium is going to clear data automatically.">
{COUNT, plural,
=1 {Your administrator automatically deletes browsing data when it isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.}
other {Your administrator automatically deletes browsing data when it isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}}
=1 {Your organization automatically deletes browsing data when Thorium isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.}
other {Your organization automatically deletes browsing data when Thorium isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}}
</message>
<message name="IDS_IDLE_TIMEOUT_CLOSE_AND_CLEAR_BODY" desc="First sentence in the Idle Timeout dialog, warning the user that Thorium is going to close and clear data automatically.">
{COUNT, plural,
=1 {Your administrator automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.}
other {Your administrator automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}}
=1 {Your organization automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.}
other {Your organization automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}}
</message>
<message name="IDS_IDLE_DISMISS_BUTTON" desc="Button label in the Idle Timeout dialog, this button dismisses the dialog and prevents browsers from closing automatically.">
Continue using Thorium
@ -1606,7 +1670,7 @@ Permissions you've already given to websites and apps may apply to this account.
<!-- ThoriumUpdater Strings -->
<if expr="is_win">
<message name="IDS_FRIENDLY_COMPANY_NAME" desc="Company name">
<message name="IDS_FRIENDLY_COMPANY_NAME" desc="Company name" translateable="false">
Thorium
</message>
<message name="IDS_NO_UPDATE_RESPONSE" desc="Updater response for no updates when handling install result.">
@ -1706,6 +1770,9 @@ Permissions you've already given to websites and apps may apply to this account.
Memory Saver made Thorium faster
</message>
</if>
<message name="IDS_HIGH_EFFICIENCY_DIALOG_BODY_V2" desc="Body text for a dialog describing that Memory Saver mode will use less memory.">
While this tab was inactive, memory was freed up to keep Thorium fast. You can choose to always exclude this site from being inactive.
</message>
</if>
<!-- High Efficiency IPH strings -->
@ -1721,18 +1788,6 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
</if>
<!-- Payments settings DeviceAuthentication strings -->
<if expr="is_macosx">
<message name="IDS_PAYMENTS_AUTOFILL_MANDATORY_REAUTH_PROMPT" desc="Message to be displayed to the user in the device authentication prompt when they click on the mandatory auth toggle on the Payments settings page, irrespective to enable or disable it. When mandatory auth toggle is enabled, we would authenticate the user before autofilling in the payment details. Note: MacOS has the wording 'Thorium is trying to' prepended onto the message during user auth.">
modify settings for filling payment methods.
</message>
</if>
<if expr="is_win">
<message name="IDS_PAYMENTS_AUTOFILL_MANDATORY_REAUTH_PROMPT" desc="Message to be displayed to the user in the device authentication prompt when they click on the mandatory auth toggle on the Payments settings page, irrespective to enable or disable it. When mandatory auth toggle is enabled, we would authenticate the user before autofilling in the payment details.">
Thorium is trying to modify settings for filling payment methods.
</message>
</if>
</messages>
</release>
</grit>

View File

@ -279,6 +279,7 @@ config("compiler") {
ldflags = []
defines = []
configs = []
rustflags = []
# System-specific flags. If your compiler flags apply to one of the
# categories here, add it to the associated file to keep this shared config
@ -457,9 +458,11 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
rustflags += [ "-Cforce-unwind-tables=no" ]
defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
rustflags += [ "-Cforce-unwind-tables=yes" ]
}
}
}
@ -781,8 +784,12 @@ config("compiler") {
cflags += [ "-fwhole-program-vtables" ]
# whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
# behaviour.
rustflags += [ "-Zsplit-lto-unit" ]
# behaviour. Rust needs to know the linker will be doing LTO in this case
# or it rejects the Zsplit-lto-unit flag.
rustflags += [
"-Zsplit-lto-unit",
"-Clinker-plugin-lto=yes",
]
if (!is_win) {
ldflags += [ "-fwhole-program-vtables" ]
@ -971,11 +978,6 @@ config("compiler") {
# to compile dylibs on Android, such as for constructing unit test APKs.
"-Cdefault-linker-libraries",
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
"-Dunsafe_op_in_unsafe_fn",
# To make Rust .d files compatible with ninja
"-Zdep-info-omit-d-target",
@ -1017,6 +1019,18 @@ config("compiler") {
"-Zpanic_abort_tests",
]
}
# Normally, this would be defined in the `runtime_library` config but NaCl
# saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
# isn't really a better config to add this define for the define to
# consistently apply in both Chromium and non-Chromium code *and* non-NaCl
# and NaCl code.
#
# TODO(https://crbug.com/702997): Move this back to the `runtime_library`
# config when NaCl is removed.
if (use_safe_libcxx) {
defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
}
}
# The BUILDCONFIG file sets this config on targets by default, which means when
@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") {
# tweak code generation for a particular CPU do not belong here!
# See "compiler_codegen", below.
config("compiler_cpu_abi") {
cflags = [ "-O3", ]
cflags = []
ldflags = []
defines = []
@ -1609,6 +1623,16 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
# Rust and C++ both provide intrinsics for LLVM to call for math operations. We
# want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
# library. The Rust symbols are marked as weak, so that they can be replaced by
# the C++ symbols. This config ensures the C++ symbols exist and are strong in
# order to cause that replacement to occur by explicitly linking in clang's
# compiler-rt library.
if (is_clang && toolchain_has_rust) {
configs += [ "//build/config/clang:compiler_builtins" ]
}
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {
@ -1780,9 +1804,21 @@ config("default_warnings") {
# TODO(crbug.com/1412713) Evaluate and possibly enable.
"-Wno-deprecated-this-capture",
]
if (llvm_force_head_revision) {
# TODO(https://crbug.com/1448905): Evaluate and possibly enable.
cflags += [ "-Wno-builtin-macro-redefined" ]
}
}
}
}
# Rust warnings
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
}
# prevent_unsafe_narrowing ----------------------------------------------------
@ -1991,7 +2027,7 @@ config("no_chromium_code") {
config("noshadowing") {
# This flag has to be disabled for nacl because the nacl compiler is too
# strict about shadowing.
if (is_clang && (!is_nacl || is_nacl_saigo)) {
if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) {
cflags = [ "-Wshadow" ]
}
}
@ -2910,10 +2946,22 @@ config("strip_debug") {
}
if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
# On macOS and iOS, this enables support for ARC (automatic reference
# counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
#
# -fobjc-arc enables ARC overall.
#
# ARC does not add exception handlers to pure Objective-C code, but does add
# them to Objective-C++ code with the rationale that C++ pervasively adds them
# in for exception safety. However, exceptions are banned in Chromium code for
# C++ and exceptions in Objective-C code are intended to be fatal, so
# -fno-objc-arc-exceptions is specified to disable these unwanted exception
# handlers.
config("enable_arc") {
common_flags = [ "-fobjc-arc" ]
common_flags = [
"-fobjc-arc",
"-fno-objc-arc-exceptions",
]
cflags_objc = common_flags
cflags_objcc = common_flags
}

View File

@ -118,7 +118,7 @@ config("compiler") {
cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
}
} else if (current_cpu == "arm64") {
cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
} else {
assert(false, "unknown current_cpu " + current_cpu)
}
@ -442,6 +442,7 @@ config("delayloads") {
"/DELAYLOAD:setupapi.dll",
"/DELAYLOAD:shell32.dll",
"/DELAYLOAD:shlwapi.dll",
"/DELAYLOAD:uiautomationcore.dll",
"/DELAYLOAD:urlmon.dll",
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:usp10.dll",

View File

@ -279,6 +279,7 @@ config("compiler") {
ldflags = []
defines = []
configs = []
rustflags = []
# System-specific flags. If your compiler flags apply to one of the
# categories here, add it to the associated file to keep this shared config
@ -457,9 +458,11 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
rustflags += [ "-Cforce-unwind-tables=no" ]
defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
rustflags += [ "-Cforce-unwind-tables=yes" ]
}
}
}
@ -781,8 +784,12 @@ config("compiler") {
cflags += [ "-fwhole-program-vtables" ]
# whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
# behaviour.
rustflags += [ "-Zsplit-lto-unit" ]
# behaviour. Rust needs to know the linker will be doing LTO in this case
# or it rejects the Zsplit-lto-unit flag.
rustflags += [
"-Zsplit-lto-unit",
"-Clinker-plugin-lto=yes",
]
if (!is_win) {
ldflags += [ "-fwhole-program-vtables" ]
@ -971,11 +978,6 @@ config("compiler") {
# to compile dylibs on Android, such as for constructing unit test APKs.
"-Cdefault-linker-libraries",
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
"-Dunsafe_op_in_unsafe_fn",
# To make Rust .d files compatible with ninja
"-Zdep-info-omit-d-target",
@ -1017,6 +1019,18 @@ config("compiler") {
"-Zpanic_abort_tests",
]
}
# Normally, this would be defined in the `runtime_library` config but NaCl
# saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
# isn't really a better config to add this define for the define to
# consistently apply in both Chromium and non-Chromium code *and* non-NaCl
# and NaCl code.
#
# TODO(https://crbug.com/702997): Move this back to the `runtime_library`
# config when NaCl is removed.
if (use_safe_libcxx) {
defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
}
}
# The BUILDCONFIG file sets this config on targets by default, which means when
@ -1606,6 +1620,16 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
# Rust and C++ both provide intrinsics for LLVM to call for math operations. We
# want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
# library. The Rust symbols are marked as weak, so that they can be replaced by
# the C++ symbols. This config ensures the C++ symbols exist and are strong in
# order to cause that replacement to occur by explicitly linking in clang's
# compiler-rt library.
if (is_clang && toolchain_has_rust) {
configs += [ "//build/config/clang:compiler_builtins" ]
}
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {
@ -1777,9 +1801,21 @@ config("default_warnings") {
# TODO(crbug.com/1412713) Evaluate and possibly enable.
"-Wno-deprecated-this-capture",
]
if (llvm_force_head_revision) {
# TODO(https://crbug.com/1448905): Evaluate and possibly enable.
cflags += [ "-Wno-builtin-macro-redefined" ]
}
}
}
}
# Rust warnings
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
}
# prevent_unsafe_narrowing ----------------------------------------------------
@ -1988,7 +2024,7 @@ config("no_chromium_code") {
config("noshadowing") {
# This flag has to be disabled for nacl because the nacl compiler is too
# strict about shadowing.
if (is_clang && (!is_nacl || is_nacl_saigo)) {
if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) {
cflags = [ "-Wshadow" ]
}
}
@ -2877,10 +2913,22 @@ config("strip_debug") {
}
if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
# On macOS and iOS, this enables support for ARC (automatic reference
# counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
#
# -fobjc-arc enables ARC overall.
#
# ARC does not add exception handlers to pure Objective-C code, but does add
# them to Objective-C++ code with the rationale that C++ pervasively adds them
# in for exception safety. However, exceptions are banned in Chromium code for
# C++ and exceptions in Objective-C code are intended to be fatal, so
# -fno-objc-arc-exceptions is specified to disable these unwanted exception
# handlers.
config("enable_arc") {
common_flags = [ "-fobjc-arc" ]
common_flags = [
"-fobjc-arc",
"-fno-objc-arc-exceptions",
]
cflags_objc = common_flags
cflags_objcc = common_flags
}

View File

@ -279,6 +279,7 @@ config("compiler") {
ldflags = []
defines = []
configs = []
rustflags = []
# System-specific flags. If your compiler flags apply to one of the
# categories here, add it to the associated file to keep this shared config
@ -457,9 +458,11 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
rustflags += [ "-Cforce-unwind-tables=no" ]
defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
rustflags += [ "-Cforce-unwind-tables=yes" ]
}
}
}
@ -781,8 +784,12 @@ config("compiler") {
cflags += [ "-fwhole-program-vtables" ]
# whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
# behaviour.
rustflags += [ "-Zsplit-lto-unit" ]
# behaviour. Rust needs to know the linker will be doing LTO in this case
# or it rejects the Zsplit-lto-unit flag.
rustflags += [
"-Zsplit-lto-unit",
"-Clinker-plugin-lto=yes",
]
if (!is_win) {
ldflags += [ "-fwhole-program-vtables" ]
@ -971,11 +978,6 @@ config("compiler") {
# to compile dylibs on Android, such as for constructing unit test APKs.
"-Cdefault-linker-libraries",
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
"-Dunsafe_op_in_unsafe_fn",
# To make Rust .d files compatible with ninja
"-Zdep-info-omit-d-target",
@ -1017,6 +1019,18 @@ config("compiler") {
"-Zpanic_abort_tests",
]
}
# Normally, this would be defined in the `runtime_library` config but NaCl
# saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
# isn't really a better config to add this define for the define to
# consistently apply in both Chromium and non-Chromium code *and* non-NaCl
# and NaCl code.
#
# TODO(https://crbug.com/702997): Move this back to the `runtime_library`
# config when NaCl is removed.
if (use_safe_libcxx) {
defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
}
}
# The BUILDCONFIG file sets this config on targets by default, which means when
@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") {
# tweak code generation for a particular CPU do not belong here!
# See "compiler_codegen", below.
config("compiler_cpu_abi") {
cflags = [ "-O3", ]
cflags = []
ldflags = []
defines = []
@ -1608,6 +1622,16 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
# Rust and C++ both provide intrinsics for LLVM to call for math operations. We
# want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
# library. The Rust symbols are marked as weak, so that they can be replaced by
# the C++ symbols. This config ensures the C++ symbols exist and are strong in
# order to cause that replacement to occur by explicitly linking in clang's
# compiler-rt library.
if (is_clang && toolchain_has_rust) {
configs += [ "//build/config/clang:compiler_builtins" ]
}
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {
@ -1779,9 +1803,21 @@ config("default_warnings") {
# TODO(crbug.com/1412713) Evaluate and possibly enable.
"-Wno-deprecated-this-capture",
]
if (llvm_force_head_revision) {
# TODO(https://crbug.com/1448905): Evaluate and possibly enable.
cflags += [ "-Wno-builtin-macro-redefined" ]
}
}
}
}
# Rust warnings
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
}
# prevent_unsafe_narrowing ----------------------------------------------------
@ -1990,7 +2026,7 @@ config("no_chromium_code") {
config("noshadowing") {
# This flag has to be disabled for nacl because the nacl compiler is too
# strict about shadowing.
if (is_clang && (!is_nacl || is_nacl_saigo)) {
if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) {
cflags = [ "-Wshadow" ]
}
}
@ -2909,10 +2945,22 @@ config("strip_debug") {
}
if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
# On macOS and iOS, this enables support for ARC (automatic reference
# counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
#
# -fobjc-arc enables ARC overall.
#
# ARC does not add exception handlers to pure Objective-C code, but does add
# them to Objective-C++ code with the rationale that C++ pervasively adds them
# in for exception safety. However, exceptions are banned in Chromium code for
# C++ and exceptions in Objective-C code are intended to be fatal, so
# -fno-objc-arc-exceptions is specified to disable these unwanted exception
# handlers.
config("enable_arc") {
common_flags = [ "-fobjc-arc" ]
common_flags = [
"-fobjc-arc",
"-fno-objc-arc-exceptions",
]
cflags_objc = common_flags
cflags_objcc = common_flags
}

View File

@ -118,7 +118,7 @@ config("compiler") {
cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
}
} else if (current_cpu == "arm64") {
cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
} else {
assert(false, "unknown current_cpu " + current_cpu)
}
@ -435,6 +435,7 @@ config("delayloads") {
"/DELAYLOAD:setupapi.dll",
"/DELAYLOAD:shell32.dll",
"/DELAYLOAD:shlwapi.dll",
"/DELAYLOAD:uiautomationcore.dll",
"/DELAYLOAD:urlmon.dll",
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:usp10.dll",

View File

@ -279,6 +279,7 @@ config("compiler") {
ldflags = []
defines = []
configs = []
rustflags = []
# System-specific flags. If your compiler flags apply to one of the
# categories here, add it to the associated file to keep this shared config
@ -457,9 +458,11 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
rustflags += [ "-Cforce-unwind-tables=no" ]
defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
rustflags += [ "-Cforce-unwind-tables=yes" ]
}
}
}
@ -781,8 +784,12 @@ config("compiler") {
cflags += [ "-fwhole-program-vtables" ]
# whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
# behaviour.
rustflags += [ "-Zsplit-lto-unit" ]
# behaviour. Rust needs to know the linker will be doing LTO in this case
# or it rejects the Zsplit-lto-unit flag.
rustflags += [
"-Zsplit-lto-unit",
"-Clinker-plugin-lto=yes",
]
if (!is_win) {
ldflags += [ "-fwhole-program-vtables" ]
@ -971,11 +978,6 @@ config("compiler") {
# to compile dylibs on Android, such as for constructing unit test APKs.
"-Cdefault-linker-libraries",
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
"-Dunsafe_op_in_unsafe_fn",
# To make Rust .d files compatible with ninja
"-Zdep-info-omit-d-target",
@ -1017,6 +1019,18 @@ config("compiler") {
"-Zpanic_abort_tests",
]
}
# Normally, this would be defined in the `runtime_library` config but NaCl
# saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
# isn't really a better config to add this define for the define to
# consistently apply in both Chromium and non-Chromium code *and* non-NaCl
# and NaCl code.
#
# TODO(https://crbug.com/702997): Move this back to the `runtime_library`
# config when NaCl is removed.
if (use_safe_libcxx) {
defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
}
}
# The BUILDCONFIG file sets this config on targets by default, which means when
@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") {
# tweak code generation for a particular CPU do not belong here!
# See "compiler_codegen", below.
config("compiler_cpu_abi") {
cflags = [ "-O3", ]
cflags = []
ldflags = []
defines = []
@ -1606,6 +1620,16 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
# Rust and C++ both provide intrinsics for LLVM to call for math operations. We
# want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
# library. The Rust symbols are marked as weak, so that they can be replaced by
# the C++ symbols. This config ensures the C++ symbols exist and are strong in
# order to cause that replacement to occur by explicitly linking in clang's
# compiler-rt library.
if (is_clang && toolchain_has_rust) {
configs += [ "//build/config/clang:compiler_builtins" ]
}
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {
@ -1777,9 +1801,21 @@ config("default_warnings") {
# TODO(crbug.com/1412713) Evaluate and possibly enable.
"-Wno-deprecated-this-capture",
]
if (llvm_force_head_revision) {
# TODO(https://crbug.com/1448905): Evaluate and possibly enable.
cflags += [ "-Wno-builtin-macro-redefined" ]
}
}
}
}
# Rust warnings
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
}
# prevent_unsafe_narrowing ----------------------------------------------------
@ -1988,7 +2024,7 @@ config("no_chromium_code") {
config("noshadowing") {
# This flag has to be disabled for nacl because the nacl compiler is too
# strict about shadowing.
if (is_clang && (!is_nacl || is_nacl_saigo)) {
if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) {
cflags = [ "-Wshadow" ]
}
}
@ -2905,10 +2941,22 @@ config("strip_debug") {
}
if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
# On macOS and iOS, this enables support for ARC (automatic reference
# counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
#
# -fobjc-arc enables ARC overall.
#
# ARC does not add exception handlers to pure Objective-C code, but does add
# them to Objective-C++ code with the rationale that C++ pervasively adds them
# in for exception safety. However, exceptions are banned in Chromium code for
# C++ and exceptions in Objective-C code are intended to be fatal, so
# -fno-objc-arc-exceptions is specified to disable these unwanted exception
# handlers.
config("enable_arc") {
common_flags = [ "-fobjc-arc" ]
common_flags = [
"-fobjc-arc",
"-fno-objc-arc-exceptions",
]
cflags_objc = common_flags
cflags_objcc = common_flags
}

View File

@ -118,7 +118,7 @@ config("compiler") {
cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
}
} else if (current_cpu == "arm64") {
cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
} else {
assert(false, "unknown current_cpu " + current_cpu)
}
@ -431,6 +431,7 @@ config("delayloads") {
"/DELAYLOAD:setupapi.dll",
"/DELAYLOAD:shell32.dll",
"/DELAYLOAD:shlwapi.dll",
"/DELAYLOAD:uiautomationcore.dll",
"/DELAYLOAD:urlmon.dll",
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:usp10.dll",

View File

@ -279,6 +279,7 @@ config("compiler") {
ldflags = []
defines = []
configs = []
rustflags = []
# System-specific flags. If your compiler flags apply to one of the
# categories here, add it to the associated file to keep this shared config
@ -457,9 +458,11 @@ config("compiler") {
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
rustflags += [ "-Cforce-unwind-tables=no" ]
defines += [ "NO_UNWIND_TABLES" ]
} else {
cflags += [ "-funwind-tables" ]
rustflags += [ "-Cforce-unwind-tables=yes" ]
}
}
}
@ -781,8 +784,12 @@ config("compiler") {
cflags += [ "-fwhole-program-vtables" ]
# whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
# behaviour.
rustflags += [ "-Zsplit-lto-unit" ]
# behaviour. Rust needs to know the linker will be doing LTO in this case
# or it rejects the Zsplit-lto-unit flag.
rustflags += [
"-Zsplit-lto-unit",
"-Clinker-plugin-lto=yes",
]
if (!is_win) {
ldflags += [ "-fwhole-program-vtables" ]
@ -971,11 +978,6 @@ config("compiler") {
# to compile dylibs on Android, such as for constructing unit test APKs.
"-Cdefault-linker-libraries",
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
"-Dunsafe_op_in_unsafe_fn",
# To make Rust .d files compatible with ninja
"-Zdep-info-omit-d-target",
@ -1017,6 +1019,18 @@ config("compiler") {
"-Zpanic_abort_tests",
]
}
# Normally, this would be defined in the `runtime_library` config but NaCl
# saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
# isn't really a better config to add this define for the define to
# consistently apply in both Chromium and non-Chromium code *and* non-NaCl
# and NaCl code.
#
# TODO(https://crbug.com/702997): Move this back to the `runtime_library`
# config when NaCl is removed.
if (use_safe_libcxx) {
defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
}
}
# The BUILDCONFIG file sets this config on targets by default, which means when
@ -1081,7 +1095,7 @@ config("thinlto_optimize_max") {
# tweak code generation for a particular CPU do not belong here!
# See "compiler_codegen", below.
config("compiler_cpu_abi") {
cflags = [ "-O3", ]
cflags = []
ldflags = []
defines = []
@ -1609,6 +1623,16 @@ config("runtime_library") {
configs += [ "//build/config/c++:runtime_library" ]
}
# Rust and C++ both provide intrinsics for LLVM to call for math operations. We
# want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
# library. The Rust symbols are marked as weak, so that they can be replaced by
# the C++ symbols. This config ensures the C++ symbols exist and are strong in
# order to cause that replacement to occur by explicitly linking in clang's
# compiler-rt library.
if (is_clang && toolchain_has_rust) {
configs += [ "//build/config/clang:compiler_builtins" ]
}
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
# configuration.
if (is_posix || is_fuchsia) {
@ -1780,9 +1804,21 @@ config("default_warnings") {
# TODO(crbug.com/1412713) Evaluate and possibly enable.
"-Wno-deprecated-this-capture",
]
if (llvm_force_head_revision) {
# TODO(https://crbug.com/1448905): Evaluate and possibly enable.
cflags += [ "-Wno-builtin-macro-redefined" ]
}
}
}
}
# Rust warnings
# Require `unsafe` blocks even in `unsafe` fns. This is intended to become
# an error by default eventually; see
# https://github.com/rust-lang/rust/issues/71668
rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
}
# prevent_unsafe_narrowing ----------------------------------------------------
@ -1991,7 +2027,7 @@ config("no_chromium_code") {
config("noshadowing") {
# This flag has to be disabled for nacl because the nacl compiler is too
# strict about shadowing.
if (is_clang && (!is_nacl || is_nacl_saigo)) {
if (is_clang && (!is_nacl || is_nacl_saigo) && !llvm_force_head_revision) {
cflags = [ "-Wshadow" ]
}
}
@ -2910,10 +2946,22 @@ config("strip_debug") {
}
if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
# On macOS and iOS, this enables support for ARC (automatic reference
# counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
#
# -fobjc-arc enables ARC overall.
#
# ARC does not add exception handlers to pure Objective-C code, but does add
# them to Objective-C++ code with the rationale that C++ pervasively adds them
# in for exception safety. However, exceptions are banned in Chromium code for
# C++ and exceptions in Objective-C code are intended to be fatal, so
# -fno-objc-arc-exceptions is specified to disable these unwanted exception
# handlers.
config("enable_arc") {
common_flags = [ "-fobjc-arc" ]
common_flags = [
"-fobjc-arc",
"-fno-objc-arc-exceptions",
]
cflags_objc = common_flags
cflags_objcc = common_flags
}

View File

@ -118,7 +118,7 @@ config("compiler") {
cflags += [ "--target=x86_64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
}
} else if (current_cpu == "arm64") {
cflags += [ "--target=arm64-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
cflags += [ "--target=aarch64-pc-windows", "/clang:-O3", "-Xclang", "-O3", "-Wno-unused-command-line-argument", ]
} else {
assert(false, "unknown current_cpu " + current_cpu)
}
@ -435,6 +435,7 @@ config("delayloads") {
"/DELAYLOAD:setupapi.dll",
"/DELAYLOAD:shell32.dll",
"/DELAYLOAD:shlwapi.dll",
"/DELAYLOAD:uiautomationcore.dll",
"/DELAYLOAD:urlmon.dll",
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:usp10.dll",

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2023 Alex313031. -->
<!-- This file contains definitions of strings that are distribution specific.
If you update this file, be sure also to update google_chrome_strings.grd. -->
@ -277,12 +276,31 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
<part file="settings_chromium_strings.grdp" />
</if>
<message name="IDS_PRODUCT_NAME" desc="The Thorium application name">
Thorium
</message>
<message name="IDS_SHORT_PRODUCT_NAME" desc="The Thorium application short name.">
Thorium
</message>
<!--
Even though Google Thorium for Testing is a separate brand, there is
no separate file for it. Instead, we use the same file as Thorium, with
a few select overrides for the most prominent end-user strings.
Rationale: https://goo.gle/chrome-for-testing#bookmark=id.n1rat320av91
-->
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_PRODUCT_NAME" desc="The Thorium for Testing application name" translateable="false">
Google Thorium for Testing
</message>
<message name="IDS_SHORT_PRODUCT_NAME" desc="The Thorium for Testing application short name." translateable="false">
Thorium for Testing
</message>
</then>
<else>
<message name="IDS_PRODUCT_NAME" desc="The Thorium application name" translateable="false">
Thorium
</message>
<message name="IDS_SHORT_PRODUCT_NAME" desc="The Thorium application short name." translateable="false">
Thorium
</message>
</else>
</if>
<if expr="is_win">
<message name="IDS_SXS_SHORTCUT_NAME" desc="Unused in Thorium builds" translateable="false">
</message>
@ -443,7 +461,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. -->
Thorium may not function correctly because it is no longer supported on this Linux distribution
</message>
</if>
<message name="IDS_ACCNAME_APP" desc="The accessible name for the app menu.">
<message name="IDS_ACCNAME_APP" desc="The accessible name for the app menu." translateable="false">
Thorium
</message>
<!-- Hung Browser Detector -->
@ -521,7 +539,7 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
<!-- Crash Recovery Dialog -->
<message name="IDS_CRASH_RECOVERY_TITLE" desc="Title of dialog shown when the browser crashes.">
<message name="IDS_CRASH_RECOVERY_TITLE" desc="Title of dialog shown when the browser crashes." translateable="false">
Thorium
</message>
<if expr="is_win">
@ -537,7 +555,7 @@ Permissions you've already given to websites and apps may apply to this account.
<message name="IDS_PASSWORD_MANAGER_ONBOARDING_DETAILS_C" desc="The explanation text that is shown below the title in the password manager onboarding dialog.">
Thorium lets you know if your passwords are ever compromised
</message>
<message name="IDS_PASSWORD_MANAGER_TITLE_BRAND" desc="The product name used in the title of the password bubble.">
<message name="IDS_PASSWORD_MANAGER_TITLE_BRAND" desc="The product name used in the title of the password bubble." translateable="false">
Thorium
</message>
<message name="IDS_PASSWORD_BUBBLES_PASSWORD_MANAGER_LINK_TEXT_SAVING_ON_DEVICE" desc="The text of the Google Password Manager links displayed on Password Manager bubbles footer when the credentials are stored only locally.">
@ -748,6 +766,17 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
<!-- Extension Safety Check Detail Page strings -->
<message name="IDS_SAFETY_CHECK_EXTENSIONS_MALWARE" desc="The text explaining the reason for disabling extension. The extension in question contains malware.">
This extension contains malware and is unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
</message>
<message name="IDS_SAFETY_CHECK_EXTENSIONS_POLICY_VIOLATION" desc="The text explaining the reason for disabling extension. The extension in question violates Thorium Web Store policy.">
This extension violates the Thorium Web Store policy, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
</message>
<message name="IDS_SAFETY_CHECK_EXTENSIONS_UNPUBLISHED" desc="The text explaining the reason for disabling extension. The extension in question was unpublished by the developer.">
This extension was unpublished by its developer, and might be unsafe. Remove it from Thorium so it can no longer see and change your data on sites you visit, including your personal info.
</message>
<!-- chrome://settings/extensions page -->
<message name="IDS_EXTENSIONS_ITEM_SHOW_ACCESS_REQUESTS_IN_TOOLBAR" desc="The label on the toggle to allow the extension to show site access requests in the toolbar.">
Allow extension to show access requests in the Thorium toolbar
@ -789,17 +818,35 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
<if expr="use_titlecase and not chromeos_ash">
<message name="IDS_ABOUT" desc="In Title Case: The text label of the About Thorium menu item">
About &amp;Thorium
</message>
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_ABOUT" desc="In Title Case: The text label of the About Thorium for Testing menu item">
About &amp;Google Thorium for Testing
</message>
</then>
<else>
<message name="IDS_ABOUT" desc="In Title Case: The text label of the About Thorium menu item">
About &amp;Thorium
</message>
</else>
</if>
<message name="IDS_RELAUNCH_TO_UPDATE" desc="In Title Case: The text label of the relaunch to update Thorium menu item">
Relaunch to Update &amp;Thorium
</message>
</if>
<if expr="not use_titlecase and not chromeos_ash">
<message name="IDS_ABOUT" desc="The text label of the About Thorium menu item">
About &amp;Thorium
</message>
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_ABOUT" desc="The text label of the About Thorium for Testing menu item">
About &amp;Google Thorium for Testing
</message>
</then>
<else>
<message name="IDS_ABOUT" desc="The text label of the About Thorium menu item">
About &amp;Thorium
</message>
</else>
</if>
<message name="IDS_RELAUNCH_TO_UPDATE" desc="The text label of the relaunch to update Thorium menu item">
Relaunch to update &amp;Thorium
</message>
@ -820,7 +867,7 @@ Permissions you've already given to websites and apps may apply to this account.
</if>
<if expr="is_macosx">
<message name="IDS_APP_MENU_PRODUCT_NAME" desc="The application's short name, used for the Mac's application menu, activity monitor, etc. This should be less than 16 characters. Example: Thorium, not Google Thorium.">
<message name="IDS_APP_MENU_PRODUCT_NAME" desc="The application's short name, used for the Mac's application menu, activity monitor, etc. This should be less than 16 characters. Example: Thorium, not Google Thorium." translateable="false">
Thorium
</message>
<message name="IDS_HELPER_NAME" desc="The helper application's name. Should contain the Thorium application name (IDS_PRODUCT_NAME). Example: Google Thorium Helper.">
@ -832,11 +879,11 @@ Permissions you've already given to websites and apps may apply to this account.
</if>
<message name="IDS_VIEW_PASSWORDS" desc="Item in the app menu which shows Password Manager page">
Password Manager
P&amp;assword Manager
</message>
<!-- Thorium sign-in page -->
<message name="IDS_CHROME_SIGNIN_TITLE" desc="Title on the about:chrome-signin page">
<message name="IDS_CHROME_SIGNIN_TITLE" desc="Title on the about:chrome-signin page" translateable="false">
Thorium
</message>
@ -1072,6 +1119,22 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
<if expr="not is_android">
<!-- Password Manager Tutorial Strings -->
<message name="IDS_TUTORIAL_PASSWORD_MANAGER_OPEN_APP_MENU" desc="The description of the 'open add menu' step in password manager tutorial">
Click the Thorium menu
</message>
<message name="IDS_TUTORIAL_PASSWORD_MANAGER_CLICK_PASSWORD_MANAGER" desc="The description of the 'click password manager' step in password manager tutorial">
Click “Password Manager”
</message>
<message name="IDS_TUTORIAL_PASSWORD_MANAGER_SUCCESS_BODY" desc="The description of the body text in the 'success' step in password manager tutorial">
Use your shortcut to quickly get to the Password Manager. You can move your shortcut to your computer's home screen or app launcher.
</message>
<message name="IDS_PASSWORD_MANAGER_IPH_CREATE_SHORTCUT_BODY" desc="Body of the in Product Help shown after successfully logging into a website telling user about how to create a shortcut">
Add a shortcut to Password Manager
</message>
</if>
<!-- Settings API bubble -->
<message name="IDS_EXTENSIONS_SETTINGS_API_FIRST_LINE_START_PAGES_SPECIFIC" desc="Text displayed in the Settings API bubble as first line when an extension has changed the start pages, and we are pointing to its icon.">
This extension has changed what page is shown when you start Thorium.
@ -1405,18 +1468,18 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
<message name="IDS_IDLE_TIMEOUT_CLOSE_BODY" desc="First sentence in the Idle Timeout dialog, warning the user that Thorium is going to close automatically.">
{COUNT, plural,
=1 {Your administrator automatically closes Thorium when it isn't used for 1 minute.}
other {Your administrator automatically closes Thorium when it isn't used for # minutes.}}
=1 {Your organization automatically closes Thorium when it isn't used for 1 minute.}
other {Your organization automatically closes Thorium when it isn't used for # minutes.}}
</message>
<message name="IDS_IDLE_TIMEOUT_CLEAR_BODY" desc="First sentence in the Idle Timeout dialog, warning the user that Thorium is going to clear data automatically.">
{COUNT, plural,
=1 {Your administrator automatically deletes browsing data when it isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.}
other {Your administrator automatically deletes browsing data when it isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}}
=1 {Your organization automatically deletes browsing data when Thorium isn't used for 1 minute. This could include history, autofill, and downloads. Your existing tabs will remain open.}
other {Your organization automatically deletes browsing data when Thorium isn't used for # minutes. This could include history, autofill, and downloads. Your existing tabs will remain open.}}
</message>
<message name="IDS_IDLE_TIMEOUT_CLOSE_AND_CLEAR_BODY" desc="First sentence in the Idle Timeout dialog, warning the user that Thorium is going to close and clear data automatically.">
{COUNT, plural,
=1 {Your administrator automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.}
other {Your administrator automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}}
=1 {Your organization automatically closes Thorium when it isn't used for 1 minute. Browsing data is deleted. This could include history, autofill, and downloads.}
other {Your organization automatically closes Thorium when it isn't used for # minutes. Browsing data is deleted. This could include history, autofill, and downloads.}}
</message>
<message name="IDS_IDLE_DISMISS_BUTTON" desc="Button label in the Idle Timeout dialog, this button dismisses the dialog and prevents browsers from closing automatically.">
Continue using Thorium
@ -1606,7 +1669,7 @@ Permissions you've already given to websites and apps may apply to this account.
<!-- ThoriumUpdater Strings -->
<if expr="is_win">
<message name="IDS_FRIENDLY_COMPANY_NAME" desc="Company name">
<message name="IDS_FRIENDLY_COMPANY_NAME" desc="Company name" translateable="false">
Thorium
</message>
<message name="IDS_NO_UPDATE_RESPONSE" desc="Updater response for no updates when handling install result.">
@ -1706,6 +1769,9 @@ Permissions you've already given to websites and apps may apply to this account.
Memory Saver made Thorium faster
</message>
</if>
<message name="IDS_HIGH_EFFICIENCY_DIALOG_BODY_V2" desc="Body text for a dialog describing that Memory Saver mode will use less memory.">
While this tab was inactive, memory was freed up to keep Thorium fast. You can choose to always exclude this site from being inactive.
</message>
</if>
<!-- High Efficiency IPH strings -->
@ -1721,18 +1787,6 @@ Permissions you've already given to websites and apps may apply to this account.
</message>
</if>
</if>
<!-- Payments settings DeviceAuthentication strings -->
<if expr="is_macosx">
<message name="IDS_PAYMENTS_AUTOFILL_MANDATORY_REAUTH_PROMPT" desc="Message to be displayed to the user in the device authentication prompt when they click on the mandatory auth toggle on the Payments settings page, irrespective to enable or disable it. When mandatory auth toggle is enabled, we would authenticate the user before autofilling in the payment details. Note: MacOS has the wording 'Thorium is trying to' prepended onto the message during user auth.">
modify settings for filling payment methods.
</message>
</if>
<if expr="is_win">
<message name="IDS_PAYMENTS_AUTOFILL_MANDATORY_REAUTH_PROMPT" desc="Message to be displayed to the user in the device authentication prompt when they click on the mandatory auth toggle on the Payments settings page, irrespective to enable or disable it. When mandatory auth toggle is enabled, we would authenticate the user before autofilling in the payment details.">
Thorium is trying to modify settings for filling payment methods.
</message>
</if>
</messages>
</release>
</grit>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 Alex313031. -->
<!-- Settings-specific Thorium strings (included from chromium_strings.grd). -->
<grit-part>
<!-- Shared across multiple page -->
@ -9,12 +8,24 @@
</message>
</if>
<!-- About Page -->
<message name="IDS_SETTINGS_ABOUT_PROGRAM" desc="Menu title for the About Thorium page.">
About Thorium
</message>
<message name="IDS_SETTINGS_GET_HELP_USING_CHROME" desc="Text of the button which takes the user to the Thorium help page.">
Get help with Thorium
</message>
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_SETTINGS_ABOUT_PROGRAM" desc="Menu title for the About Thorium for Testing page.">
About Thorium for Testing
</message>
<message name="IDS_SETTINGS_GET_HELP_USING_CHROME" desc="Text of the button which takes the user to the Thorium for Testing help page.">
Get help with Thorium for Testing
</message>
</then>
<else>
<message name="IDS_SETTINGS_ABOUT_PROGRAM" desc="Menu title for the About Thorium page.">
About Thorium
</message>
<message name="IDS_SETTINGS_GET_HELP_USING_CHROME" desc="Text of the button which takes the user to the Thorium help page.">
Get help with Thorium
</message>
</else>
</if>
<if expr="not chromeos_ash">
<message name="IDS_SETTINGS_UPGRADE_UPDATING" desc="Status label: Updating Thorium">
Updating Thorium
@ -89,9 +100,18 @@
<message name="IDS_SETTINGS_DEFAULT_BROWSER_ERROR" desc="The text displayed when Thorium cannot determine or set the default browser">
Thorium cannot determine or set the default browser
</message>
<message name="IDS_SETTINGS_DEFAULT_BROWSER_SECONDARY" desc="The text displayed when Thorium is installed in side-by-side mode, which does not support setting as the default browser.">
This is a secondary installation of Thorium, and cannot be made your default browser.
</message>
<if expr="_is_chrome_for_testing_branded">
<then>
<message name="IDS_SETTINGS_DEFAULT_BROWSER_SECONDARY" desc="The text displayed when Thorium for Testing is installed in side-by-side mode, which does not support setting as the default browser.">
Google Thorium for Testing cannot be made your default browser.
</message>
</then>
<else>
<message name="IDS_SETTINGS_DEFAULT_BROWSER_SECONDARY" desc="The text displayed when Thorium is installed in side-by-side mode, which does not support setting as the default browser.">
This is a secondary installation of Thorium, and cannot be made your default browser.
</message>
</else>
</if>
</if>
<!-- Privacy Page -->
@ -275,9 +295,6 @@
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_SETTING_DESCRIPTION" desc="Description for the memory saver mode setting">
When on, Thorium frees up memory from inactive tabs. This gives active tabs and other apps more computer resources and keeps Thorium fast. Your inactive tabs automatically become active again when you go back to them.
</message>
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_HEURISTICS_LABEL" desc="Label for the memory saver mode to discard tabs based on a set of heuristics" translateable="false">
Thorium decides when a tab becomes inactive
</message>
<message name="IDS_SETTINGS_PERFORMANCE_BATTERY_SAVER_MODE_SETTING_DESCRIPTION" desc="Description for the energy saver mode setting">
When on, Thorium conserves battery power by limiting background activity and visual effects, such as smooth scrolling and video frame rates.
</message>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 Alex313031. -->
<!-- Settings-specific strings (included from generated_resources.grd). -->
<grit-part>
<message name="IDS_SETTINGS_EMPTY_STRING" desc="Empty string, exist only to make code generic. No translation required."></message>
@ -114,10 +113,10 @@
Downloading text recognition files
</message>
<message name="IDS_SETTINGS_PDF_OCR_TITLE" desc="Description for screen reader pdf ocr feature.">
Convert images to text
Convert PDF images to text
</message>
<message name="IDS_SETTINGS_PDF_OCR_SUBTITLE" desc="Subtitle for screen reader pdf ocr feature.">
Scan PDF images to convert text for screen reader when necessary
Scan PDF images to convert content to text for the screen reader, when available. Only supported on Thorium browser.
</message>
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_TITLE" desc="Name of the setting to enable Live Caption feature.">
Live Caption
@ -126,7 +125,7 @@
Live Translate
</message>
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_TRANSLATE_SUBTITLE" desc="Description text for Live Translate feature.">
Automatically translate captions to a target language.
Automatically translates captions
</message>
<if expr="chromeos_ash">
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_SUBTITLE_ENGLISH_ONLY" desc="Description text for Live Caption feature. When audio or video is playing, the user will see captions on the screen. Only works in Thorium browser initially. Currently only works for English media.">
@ -237,6 +236,9 @@
<message name="IDS_SETTINGS_SHOW_BOOKMARKS_BAR" desc="Label for the checkbox which enables or disables showing the bookmarks bar in the toolbar.">
Show bookmarks bar
</message>
<message name="IDS_SETTINGS_SHOW_HOVER_CARD_IMAGES" desc="Label for the checkbox which enables or disables showing image previews for tab hovercards.">
Show images on tab hover preview cards
</message>
<message name="IDS_SETTINGS_SIDE_PANEL" desc="Title for the side panel section. Allows the user to toggle which side the side panel is displayed on.">
Side panel
</message>
@ -586,6 +588,12 @@
=1 {1 weak password}
other {{NUM_WEAK} weak passwords}}
</message>
<message name="IDS_SETTINGS_REUSED_PASSWORDS_COUNT_SHORT" desc="This short text shows the amount of reused passwords that the Thorium password check found.">
{NUM_REUSED, plural,
=0 {No reused passwords}
=1 {1 reused password}
other {{NUM_REUSED} reused passwords}}
</message>
<message name="IDS_SETTINGS_INSECURE_PASSWORDS_COUNT" desc="Number of insecure passwords present in the database">
{COUNT, plural,
=0 {No security issues found}
@ -1408,6 +1416,9 @@
<message name="IDS_SETTINGS_CLEAR_COOKIES_AND_SITE_DATA_SUMMARY_BASIC_MAIN_PROFILE" desc="A summary for the 'Cookies and site data' option in the 'Clear Browsing Data' screen, explaining that deleting cookies and site data will sign the user out of most websites but your Google sign in will stay.">
Signs you out of most sites. You won't be signed out of your Google Account.
</message>
<message name="IDS_SETTINGS_CLEAR_COOKIES_AND_SITE_DATA_SUMMARY_BASIC_SUPERVISED_PROFILE" desc="A summary for the 'Cookies and site data' option in the 'Clear Browsing Data' screen, explaining that deleting cookies and site data will sign the the child user out of most websites but your Google account and Family Link settings will stay .">
Signs you out of most sites. You'll stay signed in to your Google Account so your Family Link settings for Thorium apply.
</message>
<message name="IDS_SETTINGS_CLEAR_BROWSING_HISTORY_SUMMARY" desc="A subtext for the basic tab explaining browsing history.">
Clears history, including in the search box
</message>
@ -1538,12 +1549,21 @@
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_SETTING" desc="Memory saver mode setting label. This mode allows the browser to save memory from background tabs">
Memory Saver
</message>
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_ON_TIMER_LABEL" desc="Label for the memory saver mode to discard tabs on a timer" translateable="false">
Select when your tabs become inactive
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_HEURISTICS_LABEL" desc="Label for the memory saver mode to discard tabs based on a set of heuristics">
Free up memory based on usage
</message>
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_RADIO_GROUP_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focus enters the memory saver mode radio group. When memory saver mode is enabled, this radio group will be expanded and allow the user to choose between different tab discarding policies." translateable="false">
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_RECOMMENDED_BADGE" desc="Label for the recommended badge for the heuristics based memory saver option">
Recommended
</message>
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_ON_TIMER_LABEL" desc="Label for the memory saver mode to discard tabs on a timer">
Free up memory based on tab inactivity
</message>
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_RADIO_GROUP_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focus enters the memory saver mode radio group. When memory saver mode is enabled, this radio group will be expanded and allow the user to choose between different tab discarding policies.">
Memory saver options
</message>
<message name="IDS_SETTINGS_PERFORMANCE_HIGH_EFFICIENCY_MODE_CHOOSE_DISCARD_TIME_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focus enters the dropdown menu in the second option of the memory saver radio group. The dropdown allows the user to select the time before a tab is discarded by memory saver.">
Choose time range
</message>
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ADD_BUTTON_ARIA_LABEL" desc="Accessibility label which will be read by screen readers when focusing the tab discarding exceptions list add button. Sites added to the list will not be discarded by memory saver.">
Add to the "always keep these sites active" list
</message>
@ -1556,6 +1576,18 @@
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ADDITIONAL_SITES" desc="Label for button that expands the tab discarding exceptions list to show all entries. Sites added to the list will not be discarded by memory saver.">
Additional sites
</message>
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ADD_DIALOG_CURRENT_TABS" desc="Label for the first tab of the tab discarding exception list add dialog, that allows users to pick sites from currently opened tabs to add to the list.">
Add current sites
</message>
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ADD_DIALOG_MANUAL" desc="Label for the second tab of the tab discarding exception list add dialog, where users can manually input a site to be added to the list.">
Add sites manually
</message>
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ACTIVE_SITE_ARIA_DESCRIPTION" desc="Accessibilty description which will be read by screen readers when focusing a currently opened site in the list under the first tab of the add exception dialog.">
Active site
</message>
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ADD_DIALOG_HELP" desc="Label for button that expands the tab discarding exceptions list to show all entries. Sites added to the list will not be discarded by memory saver.">
Sites you add will always stay active and memory won't be freed up from them. <ph name="BEGIN_LINK">&lt;a href="$1" target="_blank"&gt;</ph>Learn more about site exclusion<ph name="END_LINK">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_BATTERY_PAGE_TITLE" desc="Title of the power section of the performance settings page">
Power
</message>
@ -2012,6 +2044,9 @@
<message name="IDS_SETTINGS_TOPICS_PAGE_BLOCKED_TOPICS_REGION_A11Y_DESCRIPTION" desc="Read by screen readers to describe the list of blocked topics.">
List of topics you blocked that you don't want shared with sites
</message>
<message name="IDS_SETTINGS_TOPICS_PAGE_LEARN_MORE_BULLET_3" desc="Paragraph 3 of 3 on the Learn more about ad topics page. * 'auto-deletes': this could also read 'Thorium deletes...' We included the 'auto' to reinforce that this is part of a system and the deletion is done regularly.">
Thorium auto-deletes topics that are older than 4 weeks. As you keep browsing, a topic might reappear on the list. Or you can block topics you dont want Thorium to share with sites. Learn more about <ph name="BEGIN_LINK">&lt;a href="$1" target="_blank"&gt;</ph>managing your ad privacy in Thorium.<ph name="END_LINK">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_TOPICS_PAGE_FOOTER" desc="This footer helps the user understand that this setting is just one signal among others that affect whether this user sees personalized ads on a site. We define 'personalize' as 'when Google provides recommendations and other content for users based on their data'. At a high level, there are 4 things that affect whether an ad is personalized in this context: * 'this setting' refers to the 'Ad topics' setting. The user is on this page. * 'Site-suggested ads': this is a link to the other new ad setting Thorium is launching and that sites can use to personalize ads a user sees. * 'cookie settings': this is a link to the cookies control section in Thorium settings. The Privacy Sandbox project deprecates third-party cookies, but it's a process, and we're launching new functionality that will replace important functionality of cookies. Until third-party cookies are deprecated, the two systems remain active in Thorium. * 'site you're viewing personalizes ads': When a user engages with a site, Thorium has no control over whether that site shows the user personalized ads. Imagine you visit www.interesting-site.com and they know a lot about you already based on previous visits. They can personalize content and ads to you if they like. They can use an ad-serving product, like Facebook or Google Ads to deliver personalized ads. They can also use the new Privacy Sandbox APIs (if they so choose) in order to get more information about the user that could be helpful to them in order to personalize ads. Those 2 APIs (settings, from the user's perspective), are 'Ad topics' and 'Site-suggested ads'.">
As you browse, whether an ad you see is personalized depends on this setting, <ph name="BEGIN_LINK1">&lt;a href="$1" target="_blank"&gt;</ph>Site-suggested ads<ph name="LINK_END1">&lt;/a&gt;</ph>, your <ph name="BEGIN_LINK2">&lt;a href="$2" target="_blank"&gt;</ph>cookie settings<ph name="LINK_END2">&lt;/a&gt;</ph>, and if the site youre viewing personalizes ads
</message>
@ -2084,7 +2119,7 @@
For example, if you visit a site that sells long-distance running shoes, the site might decide that you're interested in running marathons. Later, if you visit a different site, that site can show you an ad for running shoes suggested by the first site.
</message>
<message name="IDS_SETTINGS_FLEDGE_PAGE_LEARN_MORE_BULLET_3" desc="3 of 3 paragraphs on the Learn more page for Site-suggested ads. * 'Auto-deletes': This could just read 'Thorium deletes...' but we include the 'auto' to suggest that the deletion happens regularly and as part of the system. * 'A site you visit again...': We want to reassure the user. We just told them sites are automatically deleted. And yet, a user might see the same site in the list month after month if they visit that site regularly.">
Thorium auto-deletes sites that are older than 30 days. A site you visit again might reappear on the list. Or you can block a site from suggesting ads for you.
Thorium auto-deletes sites that are older than 30 days. A site you visit again might reappear on the list. Or you can block a site from suggesting ads for you. Learn more about <ph name="BEGIN_LINK">&lt;a href="$1" target="_blank"&gt;</ph>managing your ad privacy in Thorium.<ph name="END_LINK">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_FLEDGE_PAGE_CURRENT_SITES_DESCRIPTION_LEARN_MORE_A11Y_LABEL" desc="Text read by screen readers to help users distinguish this 'Learn more' link from others that might get added to this page.">
Learn more about site-suggested ads
@ -3970,6 +4005,24 @@
Cancel
</message>
<!-- Site Settings - Storage Access Page -->
<!-- TODO(https://crbug.com/1433644): Replace with the final SAA strings. -->
<message name="IDS_SETTINGS_STORAGE_ACCESS_DESCRIPTION" translateable="false" desc="It explains that an embedded site can request access to its unpartitioned cookies that it would normally only have access to in a first-party context (i.e. when loaded directly in a browser tab).">
Sites you visit can embed content from other sites, for example images, ads, and text. These other sites can ask for permission to use info theyve saved about you as you browse the site.
</message>
<message name="IDS_SETTINGS_STORAGE_ACCESS_ALLOWED" translateable="false" desc="It explains that an embedded site can request access to its unpartitioned cookies that it would normally only have access to in a first-party context (i.e. when loaded directly in a browser tab).">
Sites can ask to use info theyve saved about you
</message>
<message name="IDS_SETTINGS_STORAGE_ACCESS_BLOCKED" translateable="false" desc="It explains that an embedded site is blocked from accessing its unpartitioned cookies that it would normally only have access to in a first-party context (i.e. when loaded directly in a browser tab) ">
Sites are blocked from asking you to use info theyve saved about you
</message>
<message name="IDS_SETTINGS_STORAGE_ACCESS_ALLOWED_EXCEPTIONS" translateable="false" desc="It explains that an embedded site is allowed to access its unpartitioned cookies that it would normally only have access to in a first-party context (i.e. when loaded directly in a browser tab) ">
Allowed to access info they've about you while embedded in another site
</message>
<message name="IDS_SETTINGS_STORAGE_ACCESS_BLOCKED_EXCEPTIONS" translateable="false" desc="It explains that an embedded site is blocked from accessing its unpartitioned cookies that it would normally only have access to in a first-party context (i.e. when loaded directly in a browser tab) ">
Not allowed to access info they've about you while embedded in another site
</message>
<message name="IDS_SETTINGS_NO_BLUETOOTH_DEVICES_FOUND" desc="Explanation for not showing Bluetooth devices in site settings.">
No Bluetooth devices found
</message>
@ -3997,6 +4050,9 @@
<message name="IDS_SETTINGS_ADD_SITE_TITLE" desc="Title for the Add Site dialog">
Add a site
</message>
<message name="IDS_SETTINGS_ADD_SITES_TITLE" desc="Title for the Add Sites dialog">
Add sites
</message>
<message name="IDS_SETTINGS_EDIT_SITE_TITLE" desc="Title for the Edit Site dialog">
Edit site
</message>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2023 Alex313031. -->
<!-- Settings-specific strings shared by Browser and ThoriumOS settings -->
<grit-part>
<!-- All subpages -->
@ -96,11 +95,14 @@
Default
</message>
<message name="IDS_SETTINGS_CAPTIONS_LANGUAGE" desc="Name of the language setting for the caption text.">
Caption language
Preferred caption language
</message>
<message name="IDS_SETTINGS_CAPTIONS_MANAGE_LANGUAGES_TITLE" desc="Name of the caption settings section for managing language packs.">
Manage languages
</message>
<message name="IDS_SETTINGS_CAPTIONS_MANAGE_LANGUAGES_SUBTITLE" desc="Subtitle for the caption settings section for managing language packs.">
Add and remove languages to caption
</message>
<message name="IDS_SETTINGS_CAPTIONS_LIVE_TRANSLATE_TARGET_LANGUAGE" desc="Description of the target language setting for the Live Translate feature.">
Translate to
</message>
@ -421,6 +423,9 @@
<message name="IDS_SETTINGS_ABOUT_UPGRADE_CHECK_STARTED" desc="Status label: About to start checking for updates">
Checking for updates
</message>
<message name="IDS_SETTINGS_UPDATE_TO_ROLLBACK_VERSION_DISALLOWED" desc="Status label: After a consumer rollback, updating to the previously installed version just rolledback from is disallowed (ThoriumOS/ThoriumOS)">
You reverted to a previous version of ThoriumOS. To get updates, wait until the next version is available.
</message>
<if expr="chromeos_ash">
<message name="IDS_SETTINGS_THEMES_AND_WALLPAPERS_CHECKBOX_LABEL" desc="Label for the checkbox which enables or disables syncing themes and wallpapers between multiple browser instances.">

View File

@ -20,7 +20,6 @@
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
#include "base/one_shot_event.h"
#include "base/strings/utf_string_conversions.h"
@ -298,9 +297,6 @@ BackgroundModeManager::BackgroundModeManager(
// outlives the profile storage.
profile_storage_->AddObserver(this);
UMA_HISTOGRAM_BOOLEAN("BackgroundMode.OnStartup.IsBackgroundModePrefEnabled",
IsBackgroundModePrefEnabled());
// Listen for the background mode preference changing.
if (g_browser_process->local_state()) { // Skip for unit tests
pref_registrar_.Init(g_browser_process->local_state());

View File

@ -56,6 +56,8 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry) {
registry->RegisterIntegerPref(
prefs::kMacRestoreLocationPermissionsExperimentCount, 0);
#endif // BUILDFLAG(IS_MAC)
registry->RegisterBooleanPref(prefs::kHoverCardImagesEnabled, true);
}
void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {

View File

@ -460,7 +460,7 @@ ComponentResult IDNToUnicodeOneComponent(
// Valid punycode must not end with a dash.
static constexpr char16_t kIdnPrefix[] = u"xn--";
if (!base::StartsWith(comp, kIdnPrefix) || comp.back() == '-') {
out->append(comp.data(), comp.size());
out->append(comp);
return result;
}
@ -503,7 +503,7 @@ ComponentResult IDNToUnicodeOneComponent(
// We get here with no IDN or on error, in which case we just revert to
// original string and append the literal input.
out->resize(original_length);
out->append(comp.data(), comp.size());
out->append(comp);
return result;
}