Compiling V8 8.4 on Windows using using_custom_libcxx=false

73 views
Skip to first unread message

Hans Maier

unread,
Jul 27, 2020, 5:45:28 AM7/27/20
to v8-users
Hi,

I'm trying to compile the branch head of 8.4 under windows using msvc.
Unfortunatly I get compile errors:

../../src/compiler/backend/register-allocator-verifier.cc(355,19): error: loop variable 'pair' creates a copy from type 'const std::pair<const v8::internal::compiler::InstructionOperand, v8::internal::compiler::Assessment *>' [-Werror,-Wrange-loop-construct]
  for (const auto pair : map()) {
                  ^
../../src/compiler/backend/register-allocator-verifier.cc(355,8): note: use reference type 'const std::pair<const v8::internal::compiler::InstructionOperand, v8::internal::compiler::Assessment *> &' to prevent copying
  for (const auto pair : map()) {
       ^~~~~~~~~~~~~~~~~
                  &
1 error generated.

For complete log see attach

Any ideas where the error comes from are appreciated,
thanks.

>cl
Microsoft (R) C/C++-Optimierungscompiler Version 19.16.27042 für x86

>git log -n 1
commit 483421e9549adbf4a65d54d43fbffb250a577e5c (HEAD, tag: 8.4.371.22, origin/8.4-lkgr, branch-heads/8.4)


>gn gen out/x64-win.release --args="is_debug=false target_cpu=\"x64\" v8_target_cpu=\"x64\" use_goma=false is_clang=true v8_static_library=false is_component_build=true use_custom_libcxx=false v8_untrusted_code_mitigations=true"

>>ninja -C out/x64-win.release
out.txt

Rodrigo Hernandez

unread,
Jul 27, 2020, 11:10:50 AM7/27/20
to v8-users
See the patches I posted on this thread, you need to add "-Wno-range-loop-construct" and maybe "-Wno-invalid-offsetof" to your compilation flags if you're using clang.
The patches are for the 8.3 branch head, but the changes needed are about the same.

Hans Maier

unread,
Jul 28, 2020, 3:29:52 AM7/28/20
to v8-users
With your patches and a patch for ICU (see attach.) I was able to build the version 8.4.

Thanks!
icu_msvc_libc.patch

Rodrigo Hernandez

unread,
Jul 28, 2020, 12:21:00 PM7/28/20
to v8-users
No problem, I am glad it worked out for you.
Reply all
Reply to author
Forward
0 new messages