Skip to content

Commit 0856b56

Browse files
darrenwu-gitcopybara-github
authored andcommitted
android: Add support for android-desktop-x64 pgo profile
This CL adds the support for android-desktop-x64 pgo profile. - Add a new hook in DEPS to fetch the android-desktop-x64 pgo profile. - Update pgo_optimization_flags to use the android-desktop-x64 pgo profile when building for android with x64 target cpu. Bug: 415122000 Change-Id: Ifeac1a648b85f553998bc54f1ab0fd82a562add7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6677431 Reviewed-by: Gary Tong <[email protected]> Reviewed-by: Junji Watanabe <[email protected]> Reviewed-by: Peter Wen <[email protected]> Commit-Queue: Darren Wu <[email protected]> Reviewed-by: Chinglin Yu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1480326} NOKEYCHECK=True GitOrigin-RevId: e059dbcc642661f8156745a2146f0b3f9edf012d
1 parent 9a17ade commit 0856b56

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config/compiler/pgo/BUILD.gn

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5+
import("//build/config/chrome_build.gni")
56
import("//build/config/clang/clang.gni")
67
import("//build/config/compiler/compiler.gni")
78
import("//build/config/compiler/pgo/pgo.gni")
@@ -63,7 +64,9 @@ config("pgo_optimization_flags") {
6364
_pgo_target = "linux"
6465
} else if (is_android) {
6566
# Use |current_cpu| and not |target_cpu|; for Android we may built both.
66-
if (current_cpu == "arm64") {
67+
if (is_desktop_android && current_cpu == "x64") {
68+
_pgo_target = "android-desktop-x64"
69+
} else if (current_cpu == "arm64") {
6770
_pgo_target = "android-arm64"
6871
} else {
6972
_pgo_target = "android-arm32"
@@ -98,6 +101,8 @@ config("pgo_optimization_flags") {
98101
inputs = [ "//chrome/build/android-arm32.pgo.txt" ]
99102
} else if (_pgo_target == "android-arm64") {
100103
inputs = [ "//chrome/build/android-arm64.pgo.txt" ]
104+
} else if (_pgo_target == "android-desktop-x64") {
105+
inputs = [ "//chrome/build/android-desktop-x64.pgo.txt" ]
101106
}
102107

103108
if (_pgo_target != "" && pgo_data_path == "") {

0 commit comments

Comments
 (0)