Enable official build (#11847)
* Updated libchromiumcontent submodule * Use same LTO settings as libcc * Use whole program optimization, favour speed, remove redundancies * Don't use variable template as it confuses LTCG * Use lld and ThinLTO only on limited set of architectures
This commit is contained in:
parent
8b9b1e5595
commit
efb44050db
4 changed files with 25 additions and 10 deletions
|
@ -231,10 +231,8 @@
|
||||||
'msvs_settings': {
|
'msvs_settings': {
|
||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
'RuntimeLibrary': '2', # /MD (nondebug DLL)
|
'RuntimeLibrary': '2', # /MD (nondebug DLL)
|
||||||
# 1, optimizeMinSpace, Minimize Size (/O1)
|
'Optimization': '2', # /O2
|
||||||
'Optimization': '1',
|
'WholeProgramOptimization': 'true', # /GL
|
||||||
# 2, favorSize - Favor small code (/Os)
|
|
||||||
'FavorSizeOrSpeed': '2',
|
|
||||||
# See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
|
# See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
|
||||||
'InlineFunctionExpansion': '2', # 2 = max
|
'InlineFunctionExpansion': '2', # 2 = max
|
||||||
# See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
|
# See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
|
||||||
|
@ -246,6 +244,9 @@
|
||||||
# "/Oy /Oy-" and warnings about overriding.
|
# "/Oy /Oy-" and warnings about overriding.
|
||||||
'AdditionalOptions': ['/Oy-', '/d2guard4'],
|
'AdditionalOptions': ['/Oy-', '/d2guard4'],
|
||||||
},
|
},
|
||||||
|
'VCLibrarianTool': {
|
||||||
|
'LinkTimeCodeGeneration': 'true', # /LTCG
|
||||||
|
},
|
||||||
'VCLinkerTool': {
|
'VCLinkerTool': {
|
||||||
# Control Flow Guard is a security feature in Windows
|
# Control Flow Guard is a security feature in Windows
|
||||||
# 8.1 and higher designed to prevent exploitation of
|
# 8.1 and higher designed to prevent exploitation of
|
||||||
|
@ -256,6 +257,9 @@
|
||||||
'AdditionalOptions': ['/guard:cf'],
|
'AdditionalOptions': ['/guard:cf'],
|
||||||
# Turn off incremental linking to save binary size.
|
# Turn off incremental linking to save binary size.
|
||||||
'LinkIncremental': '1', # /INCREMENTAL:NO
|
'LinkIncremental': '1', # /INCREMENTAL:NO
|
||||||
|
'LinkTimeCodeGeneration': '1', # /LTCG
|
||||||
|
'OptimizeReferences': 2, # /OPT:REF
|
||||||
|
'EnableCOMDATFolding': 2, # /OPT:ICF
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
@ -280,6 +284,18 @@
|
||||||
'-Wl,--gc-sections',
|
'-Wl,--gc-sections',
|
||||||
],
|
],
|
||||||
}], # OS=="linux"
|
}], # OS=="linux"
|
||||||
|
['OS=="linux" and target_arch in ["ia32", "x64", "arm64"]', {
|
||||||
|
'cflags': [
|
||||||
|
'-flto=thin',
|
||||||
|
],
|
||||||
|
'ldflags': [
|
||||||
|
'-flto=thin',
|
||||||
|
'-fuse-ld=lld', # Chromium Clang uses lld for doing LTO
|
||||||
|
'-Wl,--lto-O0', # this could be removed in future; see https://codereview.chromium.org/2939923004
|
||||||
|
'-Wl,-mllvm,-function-sections',
|
||||||
|
'-Wl,-mllvm,-data-sections',
|
||||||
|
],
|
||||||
|
}],
|
||||||
],
|
],
|
||||||
}, # Release_Base
|
}, # Release_Base
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
|
|
@ -174,7 +174,7 @@ void DesktopNotificationController::AnimateAll() {
|
||||||
if (SystemParametersInfo(SPI_GETWORKAREA, 0, &work_area, 0)) {
|
if (SystemParametersInfo(SPI_GETWORKAREA, 0, &work_area, 0)) {
|
||||||
ScreenMetrics metrics;
|
ScreenMetrics metrics;
|
||||||
POINT origin = { work_area.right,
|
POINT origin = { work_area.right,
|
||||||
work_area.bottom - metrics.Y(toast_margin_<int>) };
|
work_area.bottom - metrics.Y(toast_margin_) };
|
||||||
|
|
||||||
auto hdwp =
|
auto hdwp =
|
||||||
BeginDeferWindowPos(static_cast<int>(instances_.size()));
|
BeginDeferWindowPos(static_cast<int>(instances_.size()));
|
||||||
|
@ -231,7 +231,7 @@ void DesktopNotificationController::AnimateAll() {
|
||||||
// Set new toast positions
|
// Set new toast positions
|
||||||
if (!instances_.empty()) {
|
if (!instances_.empty()) {
|
||||||
ScreenMetrics metrics;
|
ScreenMetrics metrics;
|
||||||
auto margin = metrics.Y(toast_margin_<int>);
|
auto margin = metrics.Y(toast_margin_);
|
||||||
|
|
||||||
int target_pos = 0;
|
int target_pos = 0;
|
||||||
for (auto&& inst : instances_) {
|
for (auto&& inst : instances_) {
|
||||||
|
@ -305,7 +305,7 @@ void DesktopNotificationController::CreateToast(NotificationLink&& data) {
|
||||||
auto toast = Toast::Get(item.hwnd);
|
auto toast = Toast::Get(item.hwnd);
|
||||||
toast_pos = toast->GetVerticalPosition() +
|
toast_pos = toast->GetVerticalPosition() +
|
||||||
toast->GetHeight() +
|
toast->GetHeight() +
|
||||||
scr.Y(toast_margin_<int>);
|
scr.Y(toast_margin_);
|
||||||
}
|
}
|
||||||
|
|
||||||
instances_.push_back({ hwnd, move(data) });
|
instances_.push_back({ hwnd, move(data) });
|
||||||
|
|
|
@ -36,8 +36,7 @@ class DesktopNotificationController {
|
||||||
TimerID_Animate = 1
|
TimerID_Animate = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
static constexpr int toast_margin_ = 20;
|
||||||
static constexpr T toast_margin_ = 20;
|
|
||||||
|
|
||||||
// Wrapper around `NotificationData` which makes sure that
|
// Wrapper around `NotificationData` which makes sure that
|
||||||
// the `controller` member is cleared when the controller object
|
// the `controller` member is cleared when the controller object
|
||||||
|
|
2
vendor/libchromiumcontent
vendored
2
vendor/libchromiumcontent
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 2bdad005879d7557731f85c626b46bd3ebe6e3a9
|
Subproject commit 69984b41aaae78be9186ba880b84cf1e75d379a2
|
Loading…
Add table
Reference in a new issue