[mksnapshot] Rename --ebt-os to --target-os

Rename the (mksnapshot-specific) --ebt-os flag to --target-os. This
flag specifies the target os for mksnapshot-generated files,
specifically for embedded.S.

In the future we should base all of embedded-file-writer.cc on this
(and an upcoming --target-arch) flag and remove other current
cross-compilation workarounds (e.g.: V8_TARGET_OS_WIN,
V8_TARGET_OS_FUCHSIA).

Bug: chromium:945659,v8:9103
Change-Id: I814fa8c5d4ee9ca0542f63dcae790086d887bbe2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559748
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60711}
This commit is contained in:
Jakob Gruber 2019-04-09 13:52:13 +02:00 committed by Commit Bot
parent 2c1ba68c55
commit ac8ff59f32
3 changed files with 4 additions and 4 deletions

View File

@ -1149,7 +1149,7 @@ template("run_mksnapshot") {
# target toolchains. The same host binary is used to generate both, so
# mksnapshot needs to know which target OS to use at runtime. It's weird,
# but the target OS is really |current_os|.
"--ebt_os=$current_os",
"--target_os=$current_os",
]
args += invoker.args

View File

@ -1169,7 +1169,7 @@ DEFINE_STRING(startup_src, nullptr,
"Write V8 startup as C++ src. (mksnapshot only)")
DEFINE_STRING(startup_blob, nullptr,
"Write V8 startup blob file. (mksnapshot only)")
DEFINE_STRING(ebt_os, nullptr, "EBT target OS. (mksnapshot only)")
DEFINE_STRING(target_os, nullptr, "The mksnapshot target os. (mksnapshot only)")
//
// Minor mark compact collector flags.

View File

@ -692,7 +692,7 @@ void PlatformDependentEmbeddedFileWriter::SectionData() {
}
void PlatformDependentEmbeddedFileWriter::SectionRoData() {
if (i::FLAG_ebt_os == std::string("win"))
if (i::FLAG_target_os == std::string("win"))
fprintf(fp_, ".section .rdata\n");
else
fprintf(fp_, ".section .rodata\n");
@ -778,7 +778,7 @@ void PlatformDependentEmbeddedFileWriter::DeclareFunctionBegin(
const char* name) {
DeclareLabel(name);
if (i::FLAG_ebt_os == std::string("win")) {
if (i::FLAG_target_os == std::string("win")) {
#if defined(V8_TARGET_ARCH_ARM64)
// Windows ARM64 assembly is in GAS syntax, but ".type" is invalid directive
// in PE/COFF for Windows.