Commit ab88f4c7 authored by Tiancong Wang's avatar Tiancong Wang Committed by Commit Bot

Only use cros orderfile on Chrome OS devices.

This is an effort to only allow using cros orderfiles and thus
hugepages on Chrome OS devices, by checking is_chromeos_device.
Try to eliminate possibly of errors on unsupported platforms like
linux-chromeos.

BUG=chromium:1056198
TEST=linux-chromeos is not using orderfile anymore
TEST=emerge chromeos-chrome still has orderfile with crrev.com/c/1995570

Change-Id: I0b394e6e0731e1236db80c77293c3c44afe19684
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076404Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Commit-Queue: Tiancong Wang <tcwang@google.com>
Cr-Commit-Position: refs/heads/master@{#746075}
parent b9f529d2
...@@ -183,7 +183,7 @@ if (use_debug_fission == "default") { ...@@ -183,7 +183,7 @@ if (use_debug_fission == "default") {
(use_gold || use_lld) && cc_wrapper == "" (use_gold || use_lld) && cc_wrapper == ""
} }
if (is_win || is_android || is_chromeos) { if (is_win || is_android || (is_chromeos && is_chromeos_device)) {
# Set the path to use orderfile for linking Chrome # Set the path to use orderfile for linking Chrome
# Note that this is for using only one orderfile for linking # Note that this is for using only one orderfile for linking
# the Chrome binary/library. # the Chrome binary/library.
...@@ -196,7 +196,7 @@ if (is_win || is_android || is_chromeos) { ...@@ -196,7 +196,7 @@ if (is_win || is_android || is_chromeos) {
chrome_orderfile_path = default_chrome_orderfile chrome_orderfile_path = default_chrome_orderfile
} else if (is_win && is_clang && is_official_build) { } else if (is_win && is_clang && is_official_build) {
chrome_orderfile_path = "//chrome/build/chrome.$target_cpu.orderfile" chrome_orderfile_path = "//chrome/build/chrome.$target_cpu.orderfile"
} else if (is_chromeos) { } else if (is_chromeos && is_chromeos_device) {
chrome_orderfile_path = "//chromeos/profiles/chromeos.orderfile.txt" chrome_orderfile_path = "//chromeos/profiles/chromeos.orderfile.txt"
} }
} }
...@@ -2415,7 +2415,7 @@ if (is_ios || is_mac) { ...@@ -2415,7 +2415,7 @@ if (is_ios || is_mac) {
} }
} }
if (is_chromeos) { if (is_chromeos && is_chromeos_device) {
# This config is intended to be a temporary to facilitate # This config is intended to be a temporary to facilitate
# the transition to use orderfile in Chrome OS. Once orderfile # the transition to use orderfile in Chrome OS. Once orderfile
# use becomes a default in Chrome OS, this config should not # use becomes a default in Chrome OS, this config should not
...@@ -2427,14 +2427,14 @@ if (is_chromeos) { ...@@ -2427,14 +2427,14 @@ if (is_chromeos) {
} }
} }
if (is_win || is_android || is_chromeos) { if (is_win || is_android || (is_chromeos && is_chromeos_device)) {
# Use orderfile for linking Chrome on win, android, and Chrome OS. # Use orderfile for linking Chrome on win, android, and Chrome OS.
# This config enables using an orderfile for linking in LLD. # This config enables using an orderfile for linking in LLD.
config("chrome_orderfile_config") { config("chrome_orderfile_config") {
if (chrome_orderfile_path != "") { if (chrome_orderfile_path != "") {
assert(use_lld) assert(use_lld)
_rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir) _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
if (is_android || is_chromeos) { if (is_android || (is_chromeos && is_chromeos_device)) {
ldflags = [ ldflags = [
"-Wl,--symbol-ordering-file", "-Wl,--symbol-ordering-file",
"-Wl,$_rebased_orderfile", "-Wl,$_rebased_orderfile",
......
...@@ -294,9 +294,11 @@ if (!is_android && !is_mac) { ...@@ -294,9 +294,11 @@ if (!is_android && !is_mac) {
if (is_chromeos) { if (is_chromeos) {
data_deps += [ "//mojo/core:shared_libraries_for_arc" ] data_deps += [ "//mojo/core:shared_libraries_for_arc" ]
if (is_chromeos_device) {
configs += [ "//build/config/chromeos:print_orderfile" ] configs += [ "//build/config/chromeos:print_orderfile" ]
configs += [ "//build/config/compiler:chrome_orderfile_config" ] configs += [ "//build/config/compiler:chrome_orderfile_config" ]
} }
}
# These files are used by the installer so we need a public dep. # These files are used by the installer so we need a public dep.
public_deps += [ ":packed_resources" ] public_deps += [ ":packed_resources" ]
......
...@@ -33,8 +33,10 @@ component("chromeos") { ...@@ -33,8 +33,10 @@ component("chromeos") {
configs += [ configs += [
":chromeos_implementation", ":chromeos_implementation",
"//build/config/linux/nss:system_nss_no_ssl_config", "//build/config/linux/nss:system_nss_no_ssl_config",
"//build/config/compiler:use_orderfile_for_hugepage",
] ]
if (is_chromeos_device) {
configs += [ "//build/config/compiler:use_orderfile_for_hugepage" ]
}
public_deps = [ "//chromeos/constants" ] public_deps = [ "//chromeos/constants" ]
deps = [ deps = [
":chromeos_export", ":chromeos_export",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment