Commit d47a930d authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64] Fix cross build failed for riscv64.

  When buid with "is_component_build=true" will failed.
  Add lib atomic into lib in v8_libplatform.
  Move func body into cc file

Bug: v8:11975
Change-Id: Ifb844a82360310aba444504f7012fa0c543a49e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3046980
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarBrice Dobry <brice.dobry@futurewei.com>
Reviewed-by: 's avatarJi Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#75919}
parent 6f898234
......@@ -552,6 +552,10 @@ config("internal_config") {
if (is_component_build) {
defines += [ "BUILDING_V8_SHARED" ]
}
if (v8_current_cpu == "riscv64") {
libs = [ "atomic" ]
}
}
# Should be applied to all targets that write trace events.
......@@ -620,6 +624,10 @@ config("external_config") {
if (is_component_build) {
defines += [ "USING_V8_SHARED" ]
}
if(current_cpu == "riscv64") {
libs = [ "atomic"]
}
}
# This config should only be applied to code that needs to be explicitly
......@@ -4960,6 +4968,10 @@ v8_component("v8_libplatform") {
sources += [ "src/libplatform/tracing/recorder-win.cc" ]
}
}
if (v8_current_cpu == "riscv64") {
libs = [ "atomic" ]
}
}
v8_source_set("fuzzer_support") {
......
......@@ -227,6 +227,9 @@ Assembler::Assembler(const AssemblerOptions& options,
block_buffer_growth_ = false;
}
void Assembler::AbortedCodeGeneration() { constpool_.Clear(); }
Assembler::~Assembler() { CHECK(constpool_.IsEmpty()); }
void Assembler::GetCode(Isolate* isolate, CodeDesc* desc,
SafepointTableBuilder* safepoint_table_builder,
int handler_table_offset) {
......
......@@ -158,9 +158,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
explicit Assembler(const AssemblerOptions&,
std::unique_ptr<AssemblerBuffer> = {});
virtual ~Assembler() { CHECK(constpool_.IsEmpty()); }
void AbortedCodeGeneration() { constpool_.Clear(); }
virtual ~Assembler();
void AbortedCodeGeneration();
// GetCode emits any pending (non-emitted) code and fills the descriptor desc.
static constexpr int kNoHandlerTable = 0;
static constexpr SafepointTableBuilder* kNoSafepointTable = nullptr;
......
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