[v8] Update to stable version 9.0.257.17

This patch includes a change to fetch the v8 source tar
from the github mirror in order to bring build time down.
This commit is contained in:
Rodrigo Hernandez
2021-04-22 19:23:50 -06:00
parent ca493e2d8f
commit 470b0fcd24
3 changed files with 218 additions and 194 deletions

View File

@@ -1,8 +1,8 @@
diff --git a/BUILD.gn b/BUILD.gn
index 1dc6c7d5ac..fb8be3f42f 100644
index a9ab6783fa..5e144b24e0 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -427,6 +427,11 @@ config("internal_config") {
@@ -444,6 +444,11 @@ config("internal_config") {
if (is_component_build) {
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -14,7 +14,7 @@ index 1dc6c7d5ac..fb8be3f42f 100644
}
# Should be applied to all targets that write trace events.
@@ -832,17 +837,25 @@ config("toolchain") {
@@ -942,17 +947,25 @@ config("toolchain") {
if (v8_current_cpu == "x86") {
defines += [ "V8_TARGET_ARCH_IA32" ]
if (is_win) {
@@ -46,7 +46,7 @@ index 1dc6c7d5ac..fb8be3f42f 100644
}
}
if (is_android && v8_android_log_stdout) {
@@ -898,7 +911,7 @@ config("toolchain") {
@@ -1008,7 +1021,7 @@ config("toolchain") {
}
if (v8_no_inline) {
@@ -55,7 +55,7 @@ index 1dc6c7d5ac..fb8be3f42f 100644
cflags += [ "/Ob0" ]
} else {
cflags += [
@@ -922,7 +935,7 @@ config("toolchain") {
@@ -1032,7 +1045,7 @@ config("toolchain") {
}
}
@@ -64,7 +64,7 @@ index 1dc6c7d5ac..fb8be3f42f 100644
cflags += [
"/wd4245", # Conversion with signed/unsigned mismatch.
"/wd4267", # Conversion with possible loss of data.
@@ -944,11 +957,11 @@ config("toolchain") {
@@ -1054,11 +1067,11 @@ config("toolchain") {
]
}
@@ -78,7 +78,7 @@ index 1dc6c7d5ac..fb8be3f42f 100644
cflags += [
# Disable gcc warnings for optimizations based on the assumption that
# signed overflow does not occur. Generates false positives (see
@@ -4220,13 +4233,21 @@ v8_component("v8_libbase") {
@@ -4499,17 +4512,25 @@ v8_component("v8_libbase") {
defines += [ "_CRT_RAND_S" ] # for rand_s()
@@ -94,6 +94,13 @@ index 1dc6c7d5ac..fb8be3f42f 100644
+ "ws2_32.lib",
+ ]
- if (v8_enable_system_instrumentation) {
- libs += [ "advapi32.lib" ] # Needed for TraceLoggingProvider.h
- }
+ if (v8_enable_system_instrumentation) {
+ libs += [ "advapi32.lib" ] # Needed for TraceLoggingProvider.h
+ }
- data_deps += [ "//build/win:runtime_libs" ]
+ data_deps += [ "//build/win:runtime_libs" ]
+ } else {
@@ -106,8 +113,17 @@ index 1dc6c7d5ac..fb8be3f42f 100644
}
if (v8_current_cpu == "mips" || v8_current_cpu == "mips64") {
@@ -4352,7 +4373,7 @@ v8_source_set("v8_cppgc_shared") {
"src/heap/base/worklist.h",
@@ -4606,7 +4627,7 @@ v8_component("v8_libplatform") {
# TODO(skyostil): Switch TraceEventListener to protozero.
"//third_party/perfetto/protos/perfetto/trace:lite",
]
- } else if (is_win) {
+ } else if (is_win && !is_mingw) {
sources -= [ "src/libplatform/tracing/recorder-default.cc" ]
sources += [ "src/libplatform/tracing/recorder-win.cc" ]
}
@@ -4652,7 +4673,7 @@ v8_source_set("v8_cppgc_shared") {
"src/heap/cppgc/sanitizers.h",
]
- if (is_clang || !is_win) {
@@ -115,16 +131,16 @@ index 1dc6c7d5ac..fb8be3f42f 100644
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ]
} else if (current_cpu == "x86") {
@@ -4370,7 +4391,7 @@ v8_source_set("v8_cppgc_shared") {
} else if (current_cpu == "mips64el") {
sources += [ "src/heap/base/asm/mips64/push_registers_asm.cc" ]
@@ -4672,7 +4693,7 @@ v8_source_set("v8_cppgc_shared") {
} else if (current_cpu == "riscv64") {
sources += [ "src/heap/base/asm/riscv64/push_registers_asm.cc" ]
}
- } else if (is_win) {
+ } else if (is_win && !is_mingw) {
if (current_cpu == "x64") {
sources += [ "src/heap/base/asm/x64/push_registers_masm.S" ]
} else if (current_cpu == "x86") {
@@ -4613,6 +4634,12 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -4976,6 +4997,12 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]
@@ -137,7 +153,7 @@ index 1dc6c7d5ac..fb8be3f42f 100644
deps = [
":v8_base_without_compiler",
":v8_compiler_for_mksnapshot",
@@ -4829,10 +4856,18 @@ if (is_component_build) {
@@ -5202,10 +5229,18 @@ if (is_component_build) {
public_deps = [
":v8_base",
@@ -157,7 +173,7 @@ index 1dc6c7d5ac..fb8be3f42f 100644
public_configs = [ ":external_config" ]
}
@@ -4851,7 +4886,16 @@ if (is_component_build) {
@@ -5225,7 +5260,16 @@ if (is_component_build) {
":v8_snapshot",
]
@@ -175,21 +191,8 @@ index 1dc6c7d5ac..fb8be3f42f 100644
public_configs = [ ":external_config" ]
}
diff --git a/include/cppgc/default-platform.h b/include/cppgc/default-platform.h
index 28990da92e..35020a6c83 100644
--- a/include/cppgc/default-platform.h
+++ b/include/cppgc/default-platform.h
@@ -18,7 +18,7 @@ namespace cppgc {
* Platform provided by cppgc. Uses V8's DefaultPlatform provided by
* libplatform internally. Exception: `GetForegroundTaskRunner()`, see below.
*/
-class V8_EXPORT DefaultPlatform : public Platform {
+class DefaultPlatform : public Platform {
public:
using IdleTaskSupport = v8::platform::IdleTaskSupport;
explicit DefaultPlatform(
diff --git a/include/v8.h b/include/v8.h
index 835178204a..da62e3325e 100644
index 7cb19bbede..b7b16d004c 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -31,6 +31,11 @@
@@ -205,10 +208,10 @@ index 835178204a..da62e3325e 100644
// assume there are no name conflicts with the embedder's code.
diff --git a/include/v8config.h b/include/v8config.h
index ae89edb2c9..562d034def 100644
index acd34d7a1f..50b2213029 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -121,7 +121,7 @@
@@ -129,7 +129,7 @@ path. Add it with -I<path> to the command line
#elif defined(__QNXNTO__)
# define V8_OS_POSIX 1
# define V8_OS_QNX 1
@@ -217,8 +220,21 @@ index ae89edb2c9..562d034def 100644
# define V8_OS_WIN 1
#endif
@@ -463,7 +463,12 @@ path. Add it with -I<path> to the command line
// V8_NODISCARD Foo() { ... };
// [[nodiscard]] comes in C++17 but supported in clang with -std >= c++11.
#if V8_HAS_CPP_ATTRIBUTE_NODISCARD
+#if defined(__MINGW32__) || defined(__MINGW64__)
+// Work around MinGW not supporting the __declspec(dllexport) [[nodiscard]] combination
+#define V8_NODISCARD __attribute__((warn_unused_result))
+#else
#define V8_NODISCARD [[nodiscard]]
+#endif
#else
#define V8_NODISCARD /* NOT SUPPORTED */
#endif
diff --git a/src/base/bits.h b/src/base/bits.h
index cf4b77fa18..414b8073fe 100644
index b137f73936..3bb4ceb7b6 100644
--- a/src/base/bits.h
+++ b/src/base/bits.h
@@ -12,8 +12,10 @@
@@ -251,7 +267,7 @@ index 861cfe4027..90c41f7097 100644
#undef EXPORT_TEMPLATE_TEST
diff --git a/src/base/platform/platform-win32.cc b/src/base/platform/platform-win32.cc
index cee24e9876..e7f1177c49 100644
index 7f6c0e97d2..a0eedf5511 100644
--- a/src/base/platform/platform-win32.cc
+++ b/src/base/platform/platform-win32.cc
@@ -4,21 +4,14 @@
@@ -353,10 +369,10 @@ index cee24e9876..e7f1177c49 100644
namespace base {
diff --git a/src/base/platform/time.cc b/src/base/platform/time.cc
index 78574b776d..8b45c71e24 100644
index c399c52cb2..c0f80761eb 100644
--- a/src/base/platform/time.cc
+++ b/src/base/platform/time.cc
@@ -784,13 +784,13 @@ ThreadTicks ThreadTicks::Now() {
@@ -787,13 +787,13 @@ ThreadTicks ThreadTicks::Now() {
#endif
#elif V8_OS_MACOSX
return ThreadTicks(ComputeThreadTicks());
@@ -413,10 +429,10 @@ index 82555463c0..08c67bc13a 100644
+#undef __deref
#endif // V8_BASE_WIN32_HEADERS_H_
diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h
index 89e9556b9e..df0939d598 100644
index 03af2cc5e2..bb19092c54 100644
--- a/src/codegen/code-stub-assembler.h
+++ b/src/codegen/code-stub-assembler.h
@@ -304,7 +304,7 @@ constexpr bool kNoArgumentsAdaptor = false;
@@ -301,7 +301,7 @@ enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
// it's possible to add JavaScript-specific useful CodeAssembler "macros"
// without modifying files in the compiler directory (and requiring a review
// from a compiler directory OWNER).
@@ -442,11 +458,40 @@ index 8aec047d13..12e25a2631 100644
HandlerTable* table;
int index;
};
diff --git a/src/common/assert-scope.h b/src/common/assert-scope.h
index 114b4782c9..92acf77aa4 100644
--- a/src/common/assert-scope.h
+++ b/src/common/assert-scope.h
@@ -84,7 +84,7 @@ class CombinationAssertScope;
template <typename Scope>
class V8_NODISCARD CombinationAssertScope<Scope> : public Scope {
public:
- V8_EXPORT_PRIVATE static bool IsAllowed() {
+ static bool IsAllowed() {
// Define IsAllowed() explicitly rather than with using Scope::IsAllowed, to
// allow SFINAE removal of IsAllowed() when it's not defined (under debug).
return Scope::IsAllowed();
@@ -101,12 +101,12 @@ class CombinationAssertScope<Scope, Scopes...>
public:
// Constructor for per-thread scopes.
- V8_EXPORT_PRIVATE CombinationAssertScope() : Scope(), NextScopes() {}
+ CombinationAssertScope() : Scope(), NextScopes() {}
// Constructor for per-isolate scopes.
- V8_EXPORT_PRIVATE explicit CombinationAssertScope(Isolate* isolate)
+ explicit CombinationAssertScope(Isolate* isolate)
: Scope(isolate), NextScopes(isolate) {}
- V8_EXPORT_PRIVATE static bool IsAllowed() {
+ static bool IsAllowed() {
return Scope::IsAllowed() && NextScopes::IsAllowed();
}
diff --git a/src/common/globals.h b/src/common/globals.h
index 988ab10c15..8d30ecc0d7 100644
index d9d502aa51..ea7e54e21d 100644
--- a/src/common/globals.h
+++ b/src/common/globals.h
@@ -1335,7 +1335,7 @@ class BinaryOperationFeedback {
@@ -1348,7 +1348,7 @@ class BinaryOperationFeedback {
// This is distinct from BinaryOperationFeedback on purpose, because the
// feedback that matters differs greatly as well as the way it is consumed.
class CompareOperationFeedback {
@@ -455,7 +500,7 @@ index 988ab10c15..8d30ecc0d7 100644
kSignedSmallFlag = 1 << 0,
kOtherNumberFlag = 1 << 1,
kBooleanFlag = 1 << 2,
@@ -1349,7 +1349,7 @@ class CompareOperationFeedback {
@@ -1362,7 +1362,7 @@ class CompareOperationFeedback {
};
public:
@@ -464,7 +509,7 @@ index 988ab10c15..8d30ecc0d7 100644
kNone = 0,
kBoolean = kBooleanFlag,
@@ -1362,7 +1362,7 @@ class CompareOperationFeedback {
@@ -1375,7 +1375,7 @@ class CompareOperationFeedback {
kNumberOrOddball = kNumber | kOddball,
kInternalizedString = kInternalizedStringFlag,
@@ -486,46 +531,6 @@ index 8e1d3d4eae..c55d8329de 100644
public:
explicit NodeCache(Zone* zone) : map_(zone) {}
~NodeCache() = default;
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 18064ac731..70e2e14993 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -2610,10 +2610,7 @@ class StrongRootBlockAllocator {
using size_type = size_t;
using difference_type = ptrdiff_t;
template <class U>
- struct rebind {
- STATIC_ASSERT((std::is_same<Address, U>::value));
- using other = StrongRootBlockAllocator;
- };
+ struct rebind;
explicit StrongRootBlockAllocator(Heap* heap) : heap_(heap) {}
@@ -2624,6 +2621,23 @@ class StrongRootBlockAllocator {
Heap* heap_;
};
+// Rebinding to Address gives another StrongRootBlockAllocator.
+template <>
+struct StrongRootBlockAllocator::rebind<Address> {
+ using other = StrongRootBlockAllocator;
+};
+
+// Rebinding to something other than Address gives a std::allocator that
+// is copy-constructable from StrongRootBlockAllocator.
+template <class U>
+struct StrongRootBlockAllocator::rebind {
+ class other : public std::allocator<U> {
+ public:
+ // NOLINTNEXTLINE
+ other(const StrongRootBlockAllocator&) {}
+ };
+};
+
} // namespace internal
} // namespace v8
diff --git a/src/heap/paged-spaces-inl.h b/src/heap/paged-spaces-inl.h
index e135e30efc..0c055247bc 100644
--- a/src/heap/paged-spaces-inl.h
@@ -540,7 +545,7 @@ index e135e30efc..0c055247bc 100644
HeapObject next_obj = FromCurrentPage();
if (!next_obj.is_null()) return next_obj;
diff --git a/src/heap/paged-spaces.h b/src/heap/paged-spaces.h
index 97670517cd..746dd69fea 100644
index 5168f0f053..ae5c22d1f3 100644
--- a/src/heap/paged-spaces.h
+++ b/src/heap/paged-spaces.h
@@ -45,7 +45,7 @@ class V8_EXPORT_PRIVATE PagedSpaceObjectIterator : public ObjectIterator {
@@ -553,7 +558,7 @@ index 97670517cd..746dd69fea 100644
private:
// Fast (inlined) path of next().
diff --git a/src/objects/feedback-vector.cc b/src/objects/feedback-vector.cc
index 7c30e1a045..787101d9ac 100644
index a77ea5d265..0cddb92a02 100644
--- a/src/objects/feedback-vector.cc
+++ b/src/objects/feedback-vector.cc
@@ -114,9 +114,9 @@ Handle<FeedbackMetadata> FeedbackMetadata::New(LocalIsolate* isolate,
@@ -569,7 +574,7 @@ index 7c30e1a045..787101d9ac 100644
bool FeedbackMetadata::SpecDiffersFrom(
diff --git a/src/objects/fixed-array-inl.h b/src/objects/fixed-array-inl.h
index 547e4dc817..22aa82fe0c 100644
index a91f89784f..5ecf7e3372 100644
--- a/src/objects/fixed-array-inl.h
+++ b/src/objects/fixed-array-inl.h
@@ -88,7 +88,7 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
@@ -582,10 +587,10 @@ index 547e4dc817..22aa82fe0c 100644
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
diff --git a/src/objects/fixed-array.h b/src/objects/fixed-array.h
index 97f9297ef7..9d6bfee2c4 100644
index 53b4cbb22b..8dd24df399 100644
--- a/src/objects/fixed-array.h
+++ b/src/objects/fixed-array.h
@@ -123,7 +123,7 @@ class FixedArray
@@ -130,7 +130,7 @@ class FixedArray
inline bool is_the_hole(Isolate* isolate, int index);
// Setter that doesn't need write barrier.
@@ -595,7 +600,7 @@ index 97f9297ef7..9d6bfee2c4 100644
inline void set(int index, Object value, WriteBarrierMode mode);
diff --git a/src/objects/ordered-hash-table.h b/src/objects/ordered-hash-table.h
index 0172986d1f..2a1777bf77 100644
index ca1d29d2fd..7758da72d3 100644
--- a/src/objects/ordered-hash-table.h
+++ b/src/objects/ordered-hash-table.h
@@ -7,8 +7,12 @@
@@ -611,24 +616,11 @@ index 0172986d1f..2a1777bf77 100644
#include "src/objects/js-objects.h"
#include "src/objects/smi.h"
#include "src/roots/roots.h"
diff --git a/src/objects/string.h b/src/objects/string.h
index dc4381b39d..3c7af8761e 100644
--- a/src/objects/string.h
+++ b/src/objects/string.h
@@ -320,7 +320,7 @@ class String : public TorqueGeneratedString<String, Name> {
V8_EXPORT_PRIVATE bool HasOneBytePrefix(Vector<const char> str);
V8_EXPORT_PRIVATE bool IsOneByteEqualTo(Vector<const uint8_t> str);
- V8_EXPORT_PRIVATE bool IsOneByteEqualTo(Vector<const char> str) {
+ inline bool IsOneByteEqualTo(Vector<const char> str) {
return IsOneByteEqualTo(Vector<const uint8_t>::cast(str));
}
bool IsTwoByteEqualTo(Vector<const uc16> str);
diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
index 2907a215c6..1cf8f1b1ba 100644
index 436dbe7797..6db3de346d 100644
--- a/src/profiler/heap-snapshot-generator.cc
+++ b/src/profiler/heap-snapshot-generator.cc
@@ -192,7 +192,7 @@ HeapSnapshot::HeapSnapshot(HeapProfiler* profiler, bool global_objects_as_roots)
@@ -191,7 +191,7 @@ HeapSnapshot::HeapSnapshot(HeapProfiler* profiler, bool global_objects_as_roots)
STATIC_ASSERT(kSystemPointerSize != 4 || sizeof(HeapGraphEdge) == 12);
STATIC_ASSERT(kSystemPointerSize != 8 || sizeof(HeapGraphEdge) == 24);
STATIC_ASSERT(kSystemPointerSize != 4 || sizeof(HeapEntry) == 32);
@@ -637,6 +629,19 @@ index 2907a215c6..1cf8f1b1ba 100644
STATIC_ASSERT(kSystemPointerSize != 8 || sizeof(HeapEntry) == 48);
#else // !V8_CC_MSVC
STATIC_ASSERT(kSystemPointerSize != 8 || sizeof(HeapEntry) == 40);
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc
index 9ba26c23ad..5857bf4c39 100644
--- a/src/runtime/runtime-wasm.cc
+++ b/src/runtime/runtime-wasm.cc
@@ -570,7 +570,7 @@ RUNTIME_FUNCTION(Runtime_WasmDebugBreak) {
DebugScope debug_scope(isolate->debug());
// Check for instrumentation breakpoint.
- DCHECK_EQ(script->break_on_entry(), instance->break_on_entry());
+ DCHECK_EQ(script->break_on_entry(), static_cast<bool>(instance->break_on_entry()));
if (script->break_on_entry()) {
MaybeHandle<FixedArray> maybe_on_entry_breakpoints =
WasmScript::CheckBreakPoints(
diff --git a/src/snapshot/snapshot-utils.cc b/src/snapshot/snapshot-utils.cc
index eb2372372c..7defadb4b1 100644
--- a/src/snapshot/snapshot-utils.cc
@@ -690,10 +695,10 @@ index 09673c8ccc..2d221a802d 100644
#include "src/trap-handler/handler-inside-win.h"
#include "src/trap-handler/trap-handler.h"
diff --git a/src/wasm/function-body-decoder-impl.h b/src/wasm/function-body-decoder-impl.h
index 3e07806d89..9649c6db36 100644
index 6c9700b100..e3be3c31f5 100644
--- a/src/wasm/function-body-decoder-impl.h
+++ b/src/wasm/function-body-decoder-impl.h
@@ -1860,7 +1860,7 @@ class WasmDecoder : public Decoder {
@@ -2006,7 +2006,7 @@ class WasmDecoder : public Decoder {
}
// TODO(clemensb): This is only used by the interpreter; move there.
@@ -703,10 +708,10 @@ index 3e07806d89..9649c6db36 100644
// Handle "simple" opcodes with a fixed signature first.
const FunctionSig* sig = WasmOpcodes::Signature(opcode);
diff --git a/test/cctest/BUILD.gn b/test/cctest/BUILD.gn
index 30fa6c533a..ebed5168cb 100644
index e63fe5ed35..2f39d3efb0 100644
--- a/test/cctest/BUILD.gn
+++ b/test/cctest/BUILD.gn
@@ -32,6 +32,12 @@ v8_executable("cctest") {
@@ -35,6 +35,12 @@ v8_executable("cctest") {
"../..:v8_tracing_config",
":cctest_config",
]
@@ -719,7 +724,7 @@ index 30fa6c533a..ebed5168cb 100644
ldflags = []
@@ -452,17 +458,28 @@ v8_source_set("cctest_sources") {
@@ -475,17 +481,28 @@ v8_source_set("cctest_sources") {
}
if (is_win) {
@@ -760,10 +765,10 @@ index 30fa6c533a..ebed5168cb 100644
}
diff --git a/test/unittests/BUILD.gn b/test/unittests/BUILD.gn
index 290661ce5b..58e764a911 100644
index 1940dfa77e..b7869e1dbd 100644
--- a/test/unittests/BUILD.gn
+++ b/test/unittests/BUILD.gn
@@ -163,6 +163,12 @@ v8_executable("unittests") {
@@ -186,6 +186,12 @@ v8_executable("unittests") {
"../..:external_config",
"../..:internal_config_base",
]
@@ -776,7 +781,7 @@ index 290661ce5b..58e764a911 100644
}
v8_source_set("unittests_sources") {
@@ -456,10 +462,12 @@ v8_source_set("unittests_sources") {
@@ -492,10 +498,12 @@ v8_source_set("unittests_sources") {
"//testing/gtest",
]
@@ -791,7 +796,7 @@ index 290661ce5b..58e764a911 100644
}
}
diff --git a/test/unittests/wasm/trap-handler-win-unittest.cc b/test/unittests/wasm/trap-handler-win-unittest.cc
index 006f1344ba..7b10cc5c5f 100644
index 8ad753469e..193119b4f6 100644
--- a/test/unittests/wasm/trap-handler-win-unittest.cc
+++ b/test/unittests/wasm/trap-handler-win-unittest.cc
@@ -2,7 +2,7 @@
@@ -804,7 +809,7 @@ index 006f1344ba..7b10cc5c5f 100644
#include "include/v8.h"
#include "src/base/page-allocator.h"
diff --git a/test/unittests/wasm/trap-handler-x64-unittest.cc b/test/unittests/wasm/trap-handler-x64-unittest.cc
index 478ee45aee..3d85fd6b38 100644
index 1d8efdae75..214ea11ee6 100644
--- a/test/unittests/wasm/trap-handler-x64-unittest.cc
+++ b/test/unittests/wasm/trap-handler-x64-unittest.cc
@@ -11,7 +11,7 @@
@@ -816,6 +821,15 @@ index 478ee45aee..3d85fd6b38 100644
#endif
#include "testing/gtest/include/gtest/gtest.h"
@@ -246,7 +246,7 @@ class TrapHandlerTest : public TestWithIsolate,
.Call();
EXPECT_TRUE(g_test_handler_executed);
g_test_handler_executed = false;
- if (check_wasm_flag) EXPECT_FALSE(GetThreadInWasmFlag());
+ if (check_wasm_flag) {EXPECT_FALSE(GetThreadInWasmFlag());}
}
bool test_handler_executed() { return g_test_handler_executed; }
diff --git a/third_party/googletest/BUILD.gn b/third_party/googletest/BUILD.gn
index cfa9205547..f3b0051f61 100644
--- a/third_party/googletest/BUILD.gn
@@ -844,13 +858,13 @@ index 2f8197dd36..9b1e4fabb9 100644
}
}
diff --git a/tools/debug_helper/BUILD.gn b/tools/debug_helper/BUILD.gn
index 064bc32260..06116d7841 100644
index 54cd3b7a4c..9c6666871d 100644
--- a/tools/debug_helper/BUILD.gn
+++ b/tools/debug_helper/BUILD.gn
@@ -95,10 +95,12 @@ v8_component("v8_debug_helper") {
"../..:run_torque",
"../..:v8_headers",
@@ -99,10 +99,12 @@ v8_component("v8_debug_helper") {
"../..:v8_libbase",
"../..:v8_shared_internal_headers",
"../..:v8_tracing",
+ "../..:v8",
]

View File

@@ -1,8 +1,8 @@
diff --git a/config/BUILD.gn b/config/BUILD.gn
index c0a686022..8e73a31ce 100644
index ed94a16a0..3e4a62d24 100644
--- a/config/BUILD.gn
+++ b/config/BUILD.gn
@@ -127,13 +127,13 @@ config("debug") {
@@ -122,13 +122,13 @@ config("debug") {
defines += [ "DYNAMIC_ANNOTATIONS_PREFIX=NACL_" ]
}
@@ -18,7 +18,7 @@ index c0a686022..8e73a31ce 100644
enable_iterator_debugging) {
# Enable libstdc++ debugging facilities to help catch problems early, see
# http://crbug.com/65151 .
@@ -168,7 +168,7 @@ config("release") {
@@ -163,7 +163,7 @@ config("release") {
# This config defines the default libraries applied to all targets.
config("default_libs") {
@@ -27,7 +27,7 @@ index c0a686022..8e73a31ce 100644
# TODO(brettw) this list of defaults should probably be smaller, and
# instead the targets that use the less common ones (e.g. wininet or
# winspool) should include those explicitly.
@@ -294,8 +294,13 @@ group("shared_library_deps") {
@@ -289,8 +289,13 @@ group("shared_library_deps") {
# Windows linker setup for EXEs and DLLs.
if (is_win) {
@@ -44,7 +44,7 @@ index c0a686022..8e73a31ce 100644
]
}
diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn
index 407ca1a23..6718126ce 100644
index 0ef73ab2b..527203c6d 100644
--- a/config/BUILDCONFIG.gn
+++ b/config/BUILDCONFIG.gn
@@ -130,8 +130,12 @@ declare_args() {
@@ -52,15 +52,15 @@ index 407ca1a23..6718126ce 100644
is_official_build = false
+ # Set to true when compiling with the MinGW GCC compiler on the MSYS2 environment.
+ is_mingw = getenv("MSYSTEM") == "MINGW64" || getenv("MSYSTEM") == "MINGW32"
+ is_mingw = getenv("MSYSTEM") != "" && getenv("MSYSTEM") != "MSYS"
+
# Set to true when compiling with the Clang compiler.
is_clang = current_os != "linux" ||
+ !(getenv("MSYSTEM") == "MINGW64" || getenv("MSYSTEM") == "MINGW32") ||
+ !(getenv("MSYSTEM") != "" && getenv("MSYSTEM") != "MSYS") ||
(current_cpu != "s390x" && current_cpu != "s390" &&
current_cpu != "ppc64" && current_cpu != "ppc" &&
current_cpu != "mips" && current_cpu != "mips64")
@@ -211,11 +215,15 @@ if (host_toolchain == "") {
current_cpu != "mips" && current_cpu != "mips64" &&
@@ -201,11 +205,15 @@ if (host_toolchain == "") {
if (target_cpu == "x86" || target_cpu == "x64") {
if (is_clang) {
host_toolchain = "//build/toolchain/win:win_clang_$target_cpu"
@@ -76,7 +76,7 @@ index 407ca1a23..6718126ce 100644
} else {
host_toolchain = "//build/toolchain/win:$host_cpu"
}
@@ -251,6 +259,8 @@ if (target_os == "android") {
@@ -242,6 +250,8 @@ if (target_os == "android") {
# Beware, win cross builds have some caveats, see docs/win_cross.md
if (is_clang) {
_default_toolchain = "//build/toolchain/win:win_clang_$target_cpu"
@@ -86,10 +86,10 @@ index 407ca1a23..6718126ce 100644
_default_toolchain = "//build/toolchain/win:$target_cpu"
}
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
index de2292212..e26d309de 100644
index 0c8743726..c60704e6d 100644
--- a/config/compiler/BUILD.gn
+++ b/config/compiler/BUILD.gn
@@ -286,8 +286,8 @@ config("compiler") {
@@ -299,8 +299,8 @@ config("compiler") {
}
# In general, Windows is totally different, but all the other builds share
@@ -100,7 +100,7 @@ index de2292212..e26d309de 100644
# Common POSIX compiler flags setup.
# --------------------------------
cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204
@@ -301,7 +301,7 @@ config("compiler") {
@@ -314,7 +314,7 @@ config("compiler") {
} else {
cflags += [ "-fstack-protector" ]
}
@@ -109,7 +109,7 @@ index de2292212..e26d309de 100644
# TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
# See also https://crbug.com/533294
cflags += [ "--param=ssp-buffer-size=4" ]
@@ -312,6 +312,12 @@ config("compiler") {
@@ -325,6 +325,12 @@ config("compiler") {
} else if (current_os != "aix") {
# Not available on aix.
cflags += [ "-fstack-protector" ]
@@ -122,7 +122,7 @@ index de2292212..e26d309de 100644
}
}
@@ -345,7 +351,7 @@ config("compiler") {
@@ -354,7 +360,7 @@ config("compiler") {
# Non-Mac Posix and Fuchsia compiler flags setup.
# -----------------------------------
@@ -131,7 +131,7 @@ index de2292212..e26d309de 100644
if (enable_profiling) {
if (!is_debug) {
cflags += [ "-g" ]
@@ -494,7 +500,7 @@ config("compiler") {
@@ -503,7 +509,7 @@ config("compiler") {
# TODO(thakis): Make the driver pass --color-diagnostics to the linker
# if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
# in ldflags instead.
@@ -140,7 +140,7 @@ index de2292212..e26d309de 100644
# On Windows, we call the linker directly, instead of calling it through
# the driver.
ldflags += [ "--color-diagnostics" ]
@@ -522,7 +528,7 @@ config("compiler") {
@@ -538,7 +544,7 @@ config("compiler") {
# C11/C++11 compiler flags setup.
# ---------------------------
@@ -149,16 +149,16 @@ index de2292212..e26d309de 100644
current_os == "aix") {
if (target_os == "android") {
cxx11_override = use_cxx11_on_android
@@ -622,7 +628,7 @@ config("compiler") {
# available disk space, 10GB and 100000 files.
cache_policy = "cache_size=10%:cache_size_bytes=10g:cache_size_files=100000"
@@ -642,7 +648,7 @@ config("compiler") {
# should be able to better manage binary size increases on its own.
import_instr_limit = 5
- if (is_win) {
+ if (is_win && !is_mingw) {
ldflags += [
"/opt:lldltojobs=all",
@@ -686,7 +692,7 @@ config("compiler") {
"-mllvm:-import-instr-limit=$import_instr_limit",
@@ -689,7 +695,7 @@ config("compiler") {
# Tracked by llvm bug: https://bugs.llvm.org/show_bug.cgi?id=48245
if (!is_android || current_cpu == "arm64") {
cflags += [ "-fwhole-program-vtables" ]
@@ -167,7 +167,7 @@ index de2292212..e26d309de 100644
ldflags += [ "-fwhole-program-vtables" ]
}
}
@@ -704,7 +710,7 @@ config("compiler") {
@@ -707,7 +713,7 @@ config("compiler") {
if (compiler_timing) {
if (is_clang && !is_nacl) {
cflags += [ "-ftime-trace" ]
@@ -176,7 +176,7 @@ index de2292212..e26d309de 100644
cflags += [
# "Documented" here:
# http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
@@ -750,7 +756,7 @@ config("compiler") {
@@ -758,7 +764,7 @@ config("compiler") {
# Assign any flags set for the C compiler to asmflags so that they are sent
# to the assembler. The Windows assembler takes different types of flags
# so only do so for posix platforms.
@@ -185,7 +185,7 @@ index de2292212..e26d309de 100644
asmflags += cflags
asmflags += cflags_c
}
@@ -804,7 +810,7 @@ config("compiler_cpu_abi") {
@@ -812,7 +818,7 @@ config("compiler_cpu_abi") {
ldflags = []
defines = []
@@ -194,7 +194,7 @@ index de2292212..e26d309de 100644
# CPU architecture. We may or may not be doing a cross compile now, so for
# simplicity we always explicitly set the architecture.
if (current_cpu == "x64") {
@@ -1158,7 +1164,7 @@ config("compiler_deterministic") {
@@ -1166,7 +1172,7 @@ config("compiler_deterministic") {
# Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
# deterministic build. See https://crbug.com/314403
if (!is_official_build) {
@@ -203,7 +203,7 @@ index de2292212..e26d309de 100644
cflags += [
"/wd4117", # Trying to define or undefine a predefined macro.
"/D__DATE__=",
@@ -1319,7 +1325,7 @@ config("default_warnings") {
@@ -1327,7 +1333,7 @@ config("default_warnings") {
cflags_cc = []
ldflags = []
@@ -212,7 +212,7 @@ index de2292212..e26d309de 100644
if (treat_warnings_as_errors) {
cflags += [ "/WX" ]
}
@@ -1529,15 +1535,32 @@ config("default_warnings") {
@@ -1537,15 +1543,32 @@ config("default_warnings") {
# files.
cflags += [ "-Wno-packed-not-aligned" ]
}
@@ -246,7 +246,7 @@ index de2292212..e26d309de 100644
}
if (is_clang) {
@@ -1622,7 +1645,7 @@ config("default_warnings") {
@@ -1630,7 +1653,7 @@ config("default_warnings") {
# part of Chromium.
config("chromium_code") {
@@ -255,7 +255,7 @@ index de2292212..e26d309de 100644
cflags = [ "/W4" ] # Warning level 4.
if (is_clang) {
@@ -1710,7 +1733,7 @@ config("no_chromium_code") {
@@ -1723,7 +1746,7 @@ config("no_chromium_code") {
cflags_cc = []
defines = []
@@ -264,7 +264,7 @@ index de2292212..e26d309de 100644
cflags += [
"/W3", # Warning level 3.
"/wd4800", # Disable warning when forcing value to bool.
@@ -1769,7 +1792,7 @@ config("noshadowing") {
@@ -1782,7 +1805,7 @@ config("noshadowing") {
# Allows turning Run-Time Type Identification on or off.
config("rtti") {
@@ -273,7 +273,7 @@ index de2292212..e26d309de 100644
cflags_cc = [ "/GR" ]
} else {
cflags_cc = [ "-frtti" ]
@@ -1779,7 +1802,7 @@ config("rtti") {
@@ -1792,7 +1815,7 @@ config("rtti") {
config("no_rtti") {
# Some sanitizer configs may require RTTI to be left enabled globally
if (!use_rtti) {
@@ -282,7 +282,7 @@ index de2292212..e26d309de 100644
cflags_cc = [ "/GR-" ]
} else {
cflags_cc = [ "-fno-rtti" ]
@@ -1832,7 +1855,7 @@ config("thin_archive") {
@@ -1845,7 +1868,7 @@ config("thin_archive") {
# Note: exceptions are disallowed in Google code.
config("exceptions") {
@@ -291,7 +291,17 @@ index de2292212..e26d309de 100644
# Enables exceptions in the STL.
if (!use_custom_libcxx) {
defines = [ "_HAS_EXCEPTIONS=1" ]
@@ -1845,7 +1868,7 @@ config("exceptions") {
@@ -1854,11 +1877,17 @@ config("exceptions") {
} else {
cflags_cc = [ "-fexceptions" ]
cflags_objcc = cflags_cc
+ if (is_mingw && exclude_unwind_tables) {
+ # With exceptions explicitly allowed,
+ # override exclude_unwind_tables or
+ # linking will fail on MinGW
+ cflags_cc += [ "-funwind-tables", "-fasynchronous-unwind-tables" ]
+ }
}
}
config("no_exceptions") {
@@ -300,7 +310,7 @@ index de2292212..e26d309de 100644
# Disables exceptions in the STL.
# libc++ uses the __has_feature macro to control whether to use exceptions,
# so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
@@ -1915,7 +1938,7 @@ config("no_shorten_64_warnings") {
@@ -1928,7 +1957,7 @@ config("no_shorten_64_warnings") {
if (is_clang) {
cflags = [ "-Wno-shorten-64-to-32" ]
} else {
@@ -309,7 +319,7 @@ index de2292212..e26d309de 100644
# MSVC does not have an explicit warning equivalent to
# -Wshorten-64-to-32 but 4267 warns for size_t -> int
# on 64-bit builds, so is the closest.
@@ -1955,12 +1978,22 @@ config("no_incompatible_pointer_warnings") {
@@ -1968,12 +1997,22 @@ config("no_incompatible_pointer_warnings") {
# Shared settings for both "optimize" and "optimize_max" configs.
# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
@@ -334,7 +344,7 @@ index de2292212..e26d309de 100644
if (!is_asan) {
common_optimize_on_cflags += [
# Put data in separate COMDATs. This allows the linker
@@ -2060,7 +2093,7 @@ config("default_stack_frames") {
@@ -2069,7 +2108,7 @@ config("default_stack_frames") {
# Default "optimization on" config.
config("optimize") {
@@ -343,7 +353,7 @@ index de2292212..e26d309de 100644
if (chrome_pgo_phase != 2) {
# Favor size over speed, /O1 must be before the common flags.
# /O1 implies /Os and /GF.
@@ -2095,7 +2128,7 @@ config("optimize") {
@@ -2104,7 +2143,7 @@ config("optimize") {
# Turn off optimizations.
config("no_optimize") {
@@ -352,7 +362,7 @@ index de2292212..e26d309de 100644
cflags = [
"/Od", # Disable optimization.
"/Ob0", # Disable all inlining (on by default).
@@ -2147,7 +2180,7 @@ config("optimize_max") {
@@ -2156,7 +2195,7 @@ config("optimize_max") {
configs = [ "//build/config/nacl:irt_optimize" ]
} else {
ldflags = common_optimize_on_ldflags
@@ -361,7 +371,7 @@ index de2292212..e26d309de 100644
# Favor speed over size, /O2 must be before the common flags.
# /O2 implies /Ot, /Oi, and /GF.
cflags = [ "/O2" ] + common_optimize_on_cflags
@@ -2179,7 +2212,7 @@ config("optimize_speed") {
@@ -2188,7 +2227,7 @@ config("optimize_speed") {
configs = [ "//build/config/nacl:irt_optimize" ]
} else {
ldflags = common_optimize_on_ldflags
@@ -370,7 +380,7 @@ index de2292212..e26d309de 100644
# Favor speed over size, /O2 must be before the common flags.
# /O2 implies /Ot, /Oi, and /GF.
cflags = [ "/O2" ] + common_optimize_on_cflags
@@ -2311,7 +2344,7 @@ config("win_pdbaltpath") {
@@ -2320,7 +2359,7 @@ config("win_pdbaltpath") {
# Full symbols.
config("symbols") {
@@ -379,7 +389,7 @@ index de2292212..e26d309de 100644
if (is_clang) {
cflags = [ "/Z7" ] # Debug information in the .obj files.
} else {
@@ -2363,7 +2396,8 @@ config("symbols") {
@@ -2372,7 +2411,8 @@ config("symbols") {
# build-directory-independent output. pnacl and nacl-clang do support that
# flag, so we can use use -g1 for pnacl and nacl-clang compiles.
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
@@ -389,7 +399,7 @@ index de2292212..e26d309de 100644
cflags += [ "-g2" ]
}
@@ -2414,7 +2448,7 @@ config("symbols") {
@@ -2423,7 +2463,7 @@ config("symbols") {
# This config guarantees to hold symbol for stack trace which are shown to user
# when crash happens in unittests running on buildbot.
config("minimal_symbols") {
@@ -398,7 +408,7 @@ index de2292212..e26d309de 100644
# Functions, files, and line tables only.
cflags = []
ldflags = [ "/DEBUG" ]
@@ -2473,7 +2507,7 @@ config("minimal_symbols") {
@@ -2482,7 +2522,7 @@ config("minimal_symbols") {
# told to not generate debug information and the linker then just puts function
# names in the final debug information.
config("no_symbols") {
@@ -407,7 +417,7 @@ index de2292212..e26d309de 100644
ldflags = [ "/DEBUG" ]
# All configs using /DEBUG should include this:
@@ -2566,6 +2600,11 @@ buildflag_header("compiler_buildflags") {
@@ -2575,6 +2615,11 @@ buildflag_header("compiler_buildflags") {
config("cet_shadow_stack") {
if (enable_cet_shadow_stack && is_win) {
assert(target_cpu == "x64")
@@ -564,7 +574,7 @@ index 428e44ac0..a0d2175ee 100644
assert(defined(invoker.packages),
"Variable |packages| must be defined to be a list in pkg_config.")
diff --git a/config/win/BUILD.gn b/config/win/BUILD.gn
index 51437c66c..cc126fcd4 100644
index 813c72c05..b3a2051c1 100644
--- a/config/win/BUILD.gn
+++ b/config/win/BUILD.gn
@@ -46,7 +46,7 @@ declare_args() {
@@ -627,8 +637,8 @@ index 51437c66c..cc126fcd4 100644
+ }
if (is_clang) {
# Don't look for includes in %INCLUDE%.
@@ -153,7 +162,7 @@ config("compiler") {
# Required to make the 19041 SDK compatible with clang-cl.
@@ -150,7 +159,7 @@ config("compiler") {
ldflags += [ "/lldignoreenv" ]
}
@@ -637,7 +647,7 @@ index 51437c66c..cc126fcd4 100644
# Enable standard linker optimizations like GC (/OPT:REF) and ICF in static
# release builds.
# Release builds always want these optimizations, so enable them explicitly.
@@ -178,17 +187,19 @@ config("compiler") {
@@ -175,17 +184,19 @@ config("compiler") {
ldflags += [ "/PROFILE" ]
}
@@ -668,7 +678,7 @@ index 51437c66c..cc126fcd4 100644
}
# This is included by reference in the //build/config/compiler:runtime_library
@@ -297,29 +308,31 @@ config("sdk_link") {
@@ -294,29 +305,31 @@ config("sdk_link") {
ldflags = [ "/MACHINE:ARM64" ]
}
@@ -722,7 +732,7 @@ index 51437c66c..cc126fcd4 100644
}
}
@@ -327,19 +340,27 @@ config("sdk_link") {
@@ -324,19 +337,27 @@ config("sdk_link") {
# targets who want different library configurations can remove this and specify
# their own.
config("common_linker_setup") {
@@ -762,16 +772,16 @@ index 51437c66c..cc126fcd4 100644
}
}
@@ -376,7 +397,7 @@ config("cfi_linker") {
@@ -373,7 +394,7 @@ config("cfi_linker") {
# ASan and CFG leads to slow process startup. Chromium's test runner uses
# lots of child processes, so this means things are really slow. Disable CFG
# for now. https://crbug.com/846966
- if (!is_debug && !is_asan) {
+ if (!is_debug && !is_asan && !is_mingw) {
# Turn on CFG bitmap generation and CFG load config.
if (target_cpu == "arm64") {
# longjmp protection is temporarily disabled on Windows on Arm64 due to
@@ -473,20 +494,22 @@ config("delayloads_not_for_child_dll") {
ldflags = [ "/guard:cf" ]
}
@@ -464,20 +485,22 @@ config("delayloads_not_for_child_dll") {
# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
# what each value does.
config("default_crt") {
@@ -806,7 +816,7 @@ index 51437c66c..cc126fcd4 100644
}
}
}
@@ -527,42 +550,54 @@ config("static_crt") {
@@ -518,42 +541,54 @@ config("static_crt") {
if (current_cpu == "x64") {
# The number after the comma is the minimum required OS version.
# 5.02 = Windows Server 2003.
@@ -881,7 +891,7 @@ index 51437c66c..cc126fcd4 100644
}
}
@@ -574,6 +609,9 @@ config("unicode") {
@@ -565,6 +600,9 @@ config("unicode") {
"_UNICODE",
"UNICODE",
]
@@ -891,7 +901,7 @@ index 51437c66c..cc126fcd4 100644
}
# Lean and mean ----------------------------------------------------------------
@@ -594,3 +632,21 @@ config("lean_and_mean") {
@@ -585,3 +623,21 @@ config("lean_and_mean") {
config("nominmax") {
defines = [ "NOMINMAX" ]
}
@@ -951,7 +961,7 @@ index 9e86979cb..ca8f47501 100644
x64_arch = "x86-64"
}
diff --git a/toolchain/gcc_solink_wrapper.py b/toolchain/gcc_solink_wrapper.py
index 32f38670a..c4b11a9ae 100644
index 39aef4d1e..7e83b058a 100644
--- a/toolchain/gcc_solink_wrapper.py
+++ b/toolchain/gcc_solink_wrapper.py
@@ -18,10 +18,11 @@ import sys
@@ -1015,7 +1025,7 @@ index 32f38670a..c4b11a9ae 100644
if __name__ == "__main__":
sys.exit(main())
diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni
index 2a4c701fa..d92c53a91 100644
index 9418f5cea..4484c2e76 100644
--- a/toolchain/gcc_toolchain.gni
+++ b/toolchain/gcc_toolchain.gni
@@ -59,6 +59,7 @@ if (enable_resource_allowlist_generation) {
@@ -1037,7 +1047,7 @@ index 2a4c701fa..d92c53a91 100644
# This define changes when the toolchain changes, forcing a rebuild.
# Nothing should ever use this define.
if (defined(invoker.rebuild_define)) {
@@ -254,15 +257,19 @@ template("gcc_toolchain") {
@@ -269,15 +272,19 @@ template("gcc_toolchain") {
asm = asm_prefix + invoker.cc
ar = invoker.ar
ld = "$goma_ld${invoker.ld}"
@@ -1065,7 +1075,7 @@ index 2a4c701fa..d92c53a91 100644
}
if (defined(invoker.dwp)) {
dwp_switch = " --dwp=\"${invoker.dwp}\""
@@ -270,6 +277,7 @@ template("gcc_toolchain") {
@@ -285,6 +292,7 @@ template("gcc_toolchain") {
dwp_switch = ""
}
@@ -1073,7 +1083,7 @@ index 2a4c701fa..d92c53a91 100644
if (defined(invoker.shlib_extension)) {
default_shlib_extension = invoker.shlib_extension
} else {
@@ -347,6 +355,16 @@ template("gcc_toolchain") {
@@ -362,6 +370,16 @@ template("gcc_toolchain") {
outputs = [ "$object_subdir/{{source_name_part}}.o" ]
}
@@ -1090,7 +1100,7 @@ index 2a4c701fa..d92c53a91 100644
tool("asm") {
# For GCC we can just use the C compiler to compile assembly.
depfile = "{{output}}.d"
@@ -407,8 +425,6 @@ template("gcc_toolchain") {
@@ -422,8 +440,6 @@ template("gcc_toolchain") {
# .TOC file, overwrite it, otherwise, don't change it.
tocfile = sofile + ".TOC"
@@ -1099,7 +1109,7 @@ index 2a4c701fa..d92c53a91 100644
# Generate a map file to be used for binary size analysis.
# Map file adds ~10% to the link time on a z620.
# With target_os="android", libchrome.so.map.gz is ~20MB.
@@ -418,13 +434,30 @@ template("gcc_toolchain") {
@@ -433,13 +449,30 @@ template("gcc_toolchain") {
map_switch = " --map-file \"$map_file\""
}
@@ -1133,18 +1143,18 @@ index 2a4c701fa..d92c53a91 100644
# requiring sh control structures, pipelines, and POSIX utilities.
# The host might not have a POSIX shell and utilities (e.g. Windows).
diff --git a/toolchain/win/BUILD.gn b/toolchain/win/BUILD.gn
index be0893059..d05ec20f8 100644
index a8137526d..d512605e2 100644
--- a/toolchain/win/BUILD.gn
+++ b/toolchain/win/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/win/visual_studio_version.gni")
import("//build/toolchain/cc_wrapper.gni")
@@ -10,6 +10,7 @@ import("//build/toolchain/cc_wrapper.gni")
import("//build/toolchain/goma.gni")
import("//build/toolchain/rbe.gni")
import("//build/toolchain/toolchain.gni")
+import("//build/toolchain/gcc_toolchain.gni")
# Should only be running on Windows.
assert(is_win)
@@ -46,13 +47,15 @@ if (current_toolchain == default_toolchain) {
@@ -51,13 +52,15 @@ if (current_toolchain == default_toolchain) {
} else {
configuration_name = "Release"
}
@@ -1167,7 +1177,7 @@ index be0893059..d05ec20f8 100644
}
if (host_os == "win") {
@@ -528,3 +531,29 @@ if (target_os == "winuwp") {
@@ -532,3 +535,29 @@ if (target_os == "winuwp") {
}
}
}

View File

@@ -5,19 +5,19 @@ SRCEXT='.src.tar.zst'
_realname=v8
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=8.8.278.14
pkgver=9.0.257.17
pkgrel=1
pkgdesc="Fast and modern Javascript engine (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
url="https://v8.dev"
license=("BSD")
makedepends=("git" "${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-ninja")
makedepends=("${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-ninja")
depends=("${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-icu")
source=("bare-clones/gn::git+https://gn.googlesource.com/gn#tag=5da62d5e9d0f10cb8ece7c30563a6a214c78b68d"
"bare-clones/v8-${pkgver}::git+https://chromium.googlesource.com/v8/v8.git#tag=${pkgver}"
"bare-clones/build::git+https://chromium.googlesource.com/chromium/src/build.git#commit=775492b7a5bd50d29ad357f6216e376b37955f5c"
"https://github.com/v8/v8/archive/refs/tags/${pkgver}.zip"
"bare-clones/build::git+https://chromium.googlesource.com/chromium/src/build.git#commit=acacc4cc0668cb4dc7f44a3f4430635f438d7478"
"bare-clones/zlib::git+https://chromium.googlesource.com/chromium/src/third_party/zlib.git#commit=156be8c52f80cde343088b4a69a80579101b6e67"
"bare-clones/common::git+https://chromium.googlesource.com/chromium/src/base/trace_event/common.git#commit=dab187b372fc17e51f5b9fad8201813d0aed5129"
"bare-clones/googletest::git+https://chromium.googlesource.com/external/github.com/google/googletest.git#commit=10b1902d893ea8cc43c69541d70868f91af3646b"
@@ -32,15 +32,15 @@ source=("bare-clones/gn::git+https://gn.googlesource.com/gn#tag=5da62d5e9d0f10cb
"v8_libplatform.pc"
"v8.pc")
sha256sums=('SKIP'
'03dadee15a911aeb356c04e291e634ec7b99d5c206bdc733b3c560937f6af454'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'9de4957ab1dbd5ce1ed82e8c9bd50170fa7a6875965ac91e9e0afcc7be43729a'
'631bc6d0b43b2507cd0101dfdaeee1c0a2b0ed60713bf93889208b5761f7ec84'
'f07e9391edd5fd25b061d1bc34bf5c56c45076b186fcc3176d4c7e8166eeed09'
'63d759de8bad9b8ac8879f8e69c24e62bf71fe14396cbdd190d48cabf8335800'
'b831576af25b275fca72851ec275c9d21bee0be29b4eb973a3e2a2580deac003'
'c10169e7a34e212b1a2bf0eaf45131485719f32a7c34d9a666b692f05a2aa830'
'b99874ea904724911528a5530c14f3051c358805bd36df9d205df31458ebf8b9'
@@ -56,7 +56,7 @@ prepare() {
echo "Patching v8 source"
cd "${srcdir}"/v8-${pkgver}
git apply ${srcdir}/0000-add-mingw-main-code-changes.patch
patch -p1 < ${srcdir}/0000-add-mingw-main-code-changes.patch
echo "Patching build directory"
cd "${srcdir}"/build