diff --git a/BUILD.gn b/BUILD.gn index f9bd61998818..71cbff7e12cf 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -3049,6 +3049,9 @@ v8_source_set("torque_base") { ] configs = [ ":internal_config" ] + if (is_win && is_asan) { + remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + } } v8_component("v8_libbase") { @@ -3412,6 +3415,9 @@ if (current_toolchain == v8_snapshot_toolchain) { ] configs = [ ":internal_config" ] + if (is_win && is_asan) { + remove_configs = [ "//build/config/sanitizers:default_sanitizer_flags" ] + } } } diff --git a/src/torque/instructions.h b/src/torque/instructions.h index 3f08eb76d6cd..1bf38aaa940a 100644 --- a/src/torque/instructions.h +++ b/src/torque/instructions.h @@ -207,7 +207,10 @@ struct LoadObjectFieldInstruction : InstructionBase { TORQUE_INSTRUCTION_BOILERPLATE() LoadObjectFieldInstruction(const ClassType* class_type, std::string field_name) - : class_type(class_type), field_name(std::move(field_name)) {} + : class_type(class_type) { + // The normal way to write this triggers a bug in Clang on Windows. + this->field_name = std::move(field_name); + } const ClassType* class_type; std::string field_name; }; @@ -216,7 +219,10 @@ struct StoreObjectFieldInstruction : InstructionBase { TORQUE_INSTRUCTION_BOILERPLATE() StoreObjectFieldInstruction(const ClassType* class_type, std::string field_name) - : class_type(class_type), field_name(std::move(field_name)) {} + : class_type(class_type) { + // The normal way to write this triggers a bug in Clang on Windows. + this->field_name = std::move(field_name); + } const ClassType* class_type; std::string field_name; }; @@ -389,8 +395,10 @@ struct ReturnInstruction : InstructionBase { struct PrintConstantStringInstruction : InstructionBase { TORQUE_INSTRUCTION_BOILERPLATE() - explicit PrintConstantStringInstruction(std::string message) - : message(std::move(message)) {} + explicit PrintConstantStringInstruction(std::string message) { + // The normal way to write this triggers a bug in Clang on Windows. + this->message = std::move(message); + } std::string message; }; @@ -399,8 +407,10 @@ struct AbortInstruction : InstructionBase { TORQUE_INSTRUCTION_BOILERPLATE() enum class Kind { kDebugBreak, kUnreachable, kAssertionFailure }; bool IsBlockTerminator() const override { return kind != Kind::kDebugBreak; } - explicit AbortInstruction(Kind kind, std::string message = "") - : kind(kind), message(std::move(message)) {} + explicit AbortInstruction(Kind kind, std::string message = "") : kind(kind) { + // The normal way to write this triggers a bug in Clang on Windows. + this->message = std::move(message); + } Kind kind; std::string message;