[snapshot] Rename embedded*.S files to .asm
We want to use llvm-ml to assemble files on Windows, but it only recognizes .asm files as input files. See https://chromium-review.googlesource.com/c/v8/v8/+/3668287. Change-Id: I34ff6d2693a34653c8e22a7c2d093853505cd455 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672420 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#80782}
This commit is contained in:
parent
78a5d6f5a8
commit
68a7736bdf
@ -3240,11 +3240,11 @@ filegroup(
|
|||||||
"src/init/setup-isolate-deserialize.cc",
|
"src/init/setup-isolate-deserialize.cc",
|
||||||
] + select({
|
] + select({
|
||||||
"@v8//bazel/config:v8_target_arm": [
|
"@v8//bazel/config:v8_target_arm": [
|
||||||
"google3/snapshots/arm/noicu/embedded.S",
|
"google3/snapshots/arm/noicu/embedded.asm",
|
||||||
"google3/snapshots/arm/noicu/snapshot.cc",
|
"google3/snapshots/arm/noicu/snapshot.cc",
|
||||||
],
|
],
|
||||||
"@v8//bazel/config:v8_target_ia32": [
|
"@v8//bazel/config:v8_target_ia32": [
|
||||||
"google3/snapshots/ia32/noicu/embedded.S",
|
"google3/snapshots/ia32/noicu/embedded.asm",
|
||||||
"google3/snapshots/ia32/noicu/snapshot.cc",
|
"google3/snapshots/ia32/noicu/snapshot.cc",
|
||||||
],
|
],
|
||||||
"//conditions:default": [":noicu/generated_snapshot_files"],
|
"//conditions:default": [":noicu/generated_snapshot_files"],
|
||||||
@ -3257,11 +3257,11 @@ filegroup(
|
|||||||
"src/init/setup-isolate-deserialize.cc",
|
"src/init/setup-isolate-deserialize.cc",
|
||||||
] + select({
|
] + select({
|
||||||
"@v8//bazel/config:v8_target_arm": [
|
"@v8//bazel/config:v8_target_arm": [
|
||||||
"google3/snapshots/arm/icu/embedded.S",
|
"google3/snapshots/arm/icu/embedded.asm",
|
||||||
"google3/snapshots/arm/icu/snapshot.cc",
|
"google3/snapshots/arm/icu/snapshot.cc",
|
||||||
],
|
],
|
||||||
"@v8//bazel/config:v8_target_ia32": [
|
"@v8//bazel/config:v8_target_ia32": [
|
||||||
"google3/snapshots/ia32/icu/embedded.S",
|
"google3/snapshots/ia32/icu/embedded.asm",
|
||||||
"google3/snapshots/ia32/icu/snapshot.cc",
|
"google3/snapshots/ia32/icu/snapshot.cc",
|
||||||
],
|
],
|
||||||
"//conditions:default": [":icu/generated_snapshot_files"],
|
"//conditions:default": [":icu/generated_snapshot_files"],
|
||||||
|
14
BUILD.gn
14
BUILD.gn
@ -1527,7 +1527,7 @@ config("v8_gcov_coverage_ldflags") {
|
|||||||
# Actions
|
# Actions
|
||||||
#
|
#
|
||||||
|
|
||||||
# Only for Windows clang builds. Converts the embedded.S file produced by
|
# Only for Windows clang builds. Converts the embedded.asm file produced by
|
||||||
# mksnapshot into an embedded.cc file with corresponding inline assembly.
|
# mksnapshot into an embedded.cc file with corresponding inline assembly.
|
||||||
template("asm_to_inline_asm") {
|
template("asm_to_inline_asm") {
|
||||||
name = target_name
|
name = target_name
|
||||||
@ -1544,11 +1544,11 @@ template("asm_to_inline_asm") {
|
|||||||
|
|
||||||
script = "tools/snapshot/asm_to_inline_asm.py"
|
script = "tools/snapshot/asm_to_inline_asm.py"
|
||||||
deps = [ ":run_mksnapshot_" + name ]
|
deps = [ ":run_mksnapshot_" + name ]
|
||||||
sources = [ "$target_gen_dir/embedded${suffix}.S" ]
|
sources = [ "$target_gen_dir/embedded${suffix}.asm" ]
|
||||||
outputs = [ "$target_gen_dir/embedded${suffix}.cc" ]
|
outputs = [ "$target_gen_dir/embedded${suffix}.cc" ]
|
||||||
args = invoker.args
|
args = invoker.args
|
||||||
args += [
|
args += [
|
||||||
rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
|
rebase_path("$target_gen_dir/embedded${suffix}.asm", root_build_dir),
|
||||||
rebase_path("$target_gen_dir/embedded${suffix}.cc", root_build_dir),
|
rebase_path("$target_gen_dir/embedded${suffix}.cc", root_build_dir),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -2086,7 +2086,7 @@ action("generate_bytecode_builtins_list") {
|
|||||||
# Template to generate different V8 snapshots based on different runtime flags.
|
# Template to generate different V8 snapshots based on different runtime flags.
|
||||||
# Can be invoked with run_mksnapshot(<name>). The target will resolve to
|
# Can be invoked with run_mksnapshot(<name>). The target will resolve to
|
||||||
# run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
|
# run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
|
||||||
# Otherwise files are suffixed, e.g. embedded_<name>.S and
|
# Otherwise files are suffixed, e.g. embedded_<name>.asm and
|
||||||
# snapshot_blob_<name>.bin.
|
# snapshot_blob_<name>.bin.
|
||||||
#
|
#
|
||||||
# The template exposes the variables:
|
# The template exposes the variables:
|
||||||
@ -2131,7 +2131,7 @@ template("run_mksnapshot") {
|
|||||||
"--target_arch=$current_cpu",
|
"--target_arch=$current_cpu",
|
||||||
|
|
||||||
"--embedded_src",
|
"--embedded_src",
|
||||||
rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
|
rebase_path("$target_gen_dir/embedded${suffix}.asm", root_build_dir),
|
||||||
]
|
]
|
||||||
|
|
||||||
if (v8_enable_builtins_profiling) {
|
if (v8_enable_builtins_profiling) {
|
||||||
@ -2157,7 +2157,7 @@ template("run_mksnapshot") {
|
|||||||
|
|
||||||
args += invoker.args
|
args += invoker.args
|
||||||
|
|
||||||
outputs += [ "$target_gen_dir/embedded${suffix}.S" ]
|
outputs += [ "$target_gen_dir/embedded${suffix}.asm" ]
|
||||||
if (invoker.embedded_variant != "") {
|
if (invoker.embedded_variant != "") {
|
||||||
args += [
|
args += [
|
||||||
"--embedded_variant",
|
"--embedded_variant",
|
||||||
@ -2320,7 +2320,7 @@ v8_source_set("v8_snapshot") {
|
|||||||
deps += [ ":asm_to_inline_asm_default" ]
|
deps += [ ":asm_to_inline_asm_default" ]
|
||||||
sources += [ "$target_gen_dir/embedded.cc" ]
|
sources += [ "$target_gen_dir/embedded.cc" ]
|
||||||
} else {
|
} else {
|
||||||
sources += [ "$target_gen_dir/embedded.S" ]
|
sources += [ "$target_gen_dir/embedded.asm" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
configs = [ ":internal_config" ]
|
configs = [ ":internal_config" ]
|
||||||
|
@ -409,7 +409,7 @@ v8_target_cpu_transition = transition(
|
|||||||
def _mksnapshot(ctx):
|
def _mksnapshot(ctx):
|
||||||
outs = [
|
outs = [
|
||||||
ctx.actions.declare_file(ctx.attr.prefix + "/snapshot.cc"),
|
ctx.actions.declare_file(ctx.attr.prefix + "/snapshot.cc"),
|
||||||
ctx.actions.declare_file(ctx.attr.prefix + "/embedded.S"),
|
ctx.actions.declare_file(ctx.attr.prefix + "/embedded.asm"),
|
||||||
]
|
]
|
||||||
ctx.actions.run(
|
ctx.actions.run(
|
||||||
outputs = outs,
|
outputs = outs,
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
// Generates the embedded.S file which is later compiled into the final v8
|
// Generates the embedded.asm file which is later compiled into the final v8
|
||||||
// binary. Its contents are exported through two symbols:
|
// binary. Its contents are exported through two symbols:
|
||||||
//
|
//
|
||||||
// v8_<variant>_embedded_blob_ (intptr_t):
|
// v8_<variant>_embedded_blob_ (intptr_t):
|
||||||
|
@ -45,7 +45,7 @@ enum class EmbeddedTargetArch {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// The platform-dependent logic for emitting assembly code for the generated
|
// The platform-dependent logic for emitting assembly code for the generated
|
||||||
// embedded.S file.
|
// embedded.asm file.
|
||||||
class PlatformEmbeddedFileWriterBase {
|
class PlatformEmbeddedFileWriterBase {
|
||||||
public:
|
public:
|
||||||
virtual ~PlatformEmbeddedFileWriterBase() = default;
|
virtual ~PlatformEmbeddedFileWriterBase() = default;
|
||||||
|
@ -694,7 +694,7 @@ DataDirective PlatformEmbeddedFileWriterWin::ByteChunkDataDirective() const {
|
|||||||
#if defined(V8_COMPILER_IS_MSVC)
|
#if defined(V8_COMPILER_IS_MSVC)
|
||||||
// Windows MASM doesn't have an .octa directive, use QWORDs instead.
|
// Windows MASM doesn't have an .octa directive, use QWORDs instead.
|
||||||
// Note: MASM *really* does not like large data streams. It takes over 5
|
// Note: MASM *really* does not like large data streams. It takes over 5
|
||||||
// minutes to assemble the ~350K lines of embedded.S produced when using
|
// minutes to assemble the ~350K lines of embedded.asm produced when using
|
||||||
// BYTE directives in a debug build. QWORD produces roughly 120KLOC and
|
// BYTE directives in a debug build. QWORD produces roughly 120KLOC and
|
||||||
// reduces assembly time to ~40 seconds. Still terrible, but much better
|
// reduces assembly time to ~40 seconds. Still terrible, but much better
|
||||||
// than before. See also: https://crbug.com/v8/8475.
|
// than before. See also: https://crbug.com/v8/8475.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
'''
|
'''
|
||||||
Converts a given file in clang assembly syntax to a corresponding
|
Converts a given file in clang assembly syntax to a corresponding
|
||||||
representation in inline assembly. Specifically, this is used to convert
|
representation in inline assembly. Specifically, this is used to convert
|
||||||
embedded.S to embedded.cc for Windows clang builds.
|
embedded.asm to embedded.cc for Windows clang builds.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
Loading…
Reference in New Issue
Block a user