Commit f90456ba authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

mksnapshot: introduce a V8_TARGET_OS_CHROMEOS define

We had one use of OS_CHROMEOS in mksnapshot. OS_CHROMEOS is defined if
gn's `is_chromeos` is true, which checks `current_os`. `current_os !=
target_os` can happen if we're building with a non-default toolchain,
which happens often on CrOS, since `mksnapshot` is a host binary.

Tested by manually verifying that .text.hot.embedded now shows up on
arm32/aarch64 builds of embedded.S.

Bug: v8:9103
Change-Id: I038b56f4c18c7dd9a651ce676a977697dad14ae6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1573041
Commit-Queue: George Burgess <gbiv@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60925}
parent b00074ca
......@@ -2977,6 +2977,7 @@ v8_source_set("v8_base_without_compiler") {
"src/x64/register-x64.h",
"src/x64/sse-instr.h",
]
# iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
# based on Darwin and thus POSIX-compliant to a similar degree.
if (is_linux || is_mac || is_ios) {
......@@ -3738,6 +3739,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
defines = [ "V8_TARGET_OS_FUCHSIA" ]
} else if (target_os == "win") {
defines = [ "V8_TARGET_OS_WIN" ]
} else if (target_os == "chromeos") {
defines = [ "V8_TARGET_OS_CHROMEOS" ]
}
}
}
......
......@@ -680,7 +680,7 @@ int PlatformDependentEmbeddedFileWriter::IndentedDataDirective(
#else
void PlatformDependentEmbeddedFileWriter::SectionText() {
#ifdef OS_CHROMEOS
#if defined(V8_TARGET_OS_CHROMEOS)
fprintf(fp_, ".section .text.hot.embedded\n");
#else
fprintf(fp_, ".section .text\n");
......
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