Re: [v8-users] [10.0.139.9] Compile error "C2280" with MSVC
Minor correction: `gm.py` is a powerful tool, but GN args must be set using `gn args out/` (for your , of course). On Tue, May 3, 2022 at 6:21 AM Ben Noordhuis wrote: > On Sun, May 1, 2022 at 3:46 PM Kazuya Hiruma wrote: > > > > I'm guessing what is wrong is /WX flag. I'm not sure how to turn it off. > > Try passing `treat_warnings_as_errors=false > fatal_linker_warnings=false` to tools/dev/gm.py > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-users/CAHQurc8fA9B%2BDq%3DcrwsMxGcOeX2WJ_8zi%2BwMexmF8f2ibPHq%2Bw%40mail.gmail.com > . > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAKSzg3Rq%3Dkqtp-sNnLp38b%2BPQXx2ayf_6wcMdJJd-ENCWTXwNQ%40mail.gmail.com.
Re: [v8-users] [10.0.139.9] Compile error "C2280" with MSVC
On Sun, May 1, 2022 at 3:46 PM Kazuya Hiruma wrote: > > I'm guessing what is wrong is /WX flag. I'm not sure how to turn it off. Try passing `treat_warnings_as_errors=false fatal_linker_warnings=false` to tools/dev/gm.py -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAHQurc8fA9B%2BDq%3DcrwsMxGcOeX2WJ_8zi%2BwMexmF8f2ibPHq%2Bw%40mail.gmail.com.
Re: [v8-users] [10.0.139.9] Compile error "C2280" with MSVC
I've tried fixing compile error. I modified some codes from the nodejs commit. It looks good from previous one but I'm still getting other errors. [1946/2301] CC obj/third_party/zlib/zlib/cpu_features.obj FAILED: obj/third_party/zlib/zlib/cpu_features.obj ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/cl.exe" /c ../../third_party/zlib/cpu_features.c /nologo /showIncludes -DUSE_AURA=1 -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_VB -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DZLIB_IMPLEMENTATION -DADLER32_SIMD_SSSE3 -DX86_WINDOWS -DINFLATE_CHUNK_SIMD_SSE2 -DINFLATE_CHUNK_READ_64LE -DCRC32_SIMD_SSE42_PCLMUL -DDEFLATE_FILL_WINDOW_SSE2 -I../.. -Igen -I../../third_party/zlib /Gy /FS /bigobj /utf-8 /Zc:sizedDealloc- /wd4117 /D__DATE__= /D__TIME__= /D__TIMESTAMP__= /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi /Zi /MD /wd4800 /wd4267 /WX /wd4244 /wd4244 /wd4100 /wd4702 /wd4127 /O2 /Ob2 /Oy- /Zc:inline /Gw /std:c11 /TC /Foobj/third_party/zlib/zlib/cpu_features.obj /Fd"obj/third_party/zlib/zlib_c.pdb" cl : Command line warning D9025 : overriding '/O1' with '/O2' C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): error C2220: the following warning is treated as an error C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): warning C5105: macro expansion producing 'defined' has undefined behavior C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings I'm guessing what is wrong is */WX* flag. I'm not sure how to turn it off. Is it the problem or not? 2022年5月1日日曜日 16:42:01 UTC+9 Kazuya Hiruma: > Thank you for rapid reply! I'll check it out! > > 2022年5月1日日曜日 16:37:59 UTC+9 Ben Noordhuis: > >> On Sun, May 1, 2022 at 3:12 AM Kazuya Hiruma wrote: >> > >> > Hi, there. >> > >> > I'm struggling with building V8 as a DLL on Windows with MSVC. >> > >> > I got a lot of compiler errors. (I will show it below) >> > >> > I also found out a same discussion thread but it wasn't a way to fix >> the problem. >> > >> > - >> > >> > [My environment info] >> > >> > Windows 10 >> > Visual Studio 2019 >> > MSVC 14.29.30133 >> > ninja 1.8.2 >> > >> > >> > [GN arguments] >> > is_debug = false >> > is_clang = false >> > is_component_build = true >> > target_cpu = "x64" >> > >> > [Etc] >> > V8 version 10.0.139.9 >> > >> > - >> > >> > The error is below. >> > >> > [770/3045] CXX obj/torque_generated_definitions/factory.obj >> > FAILED: obj/torque_generated_definitions/factory.obj >> > ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft >> Visual >> Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/cl.exe" /c >> gen/torque-generated/factory.cc >> /Foobj/torque_generated_definitions/factory.obj /nologo /showIncludes >> -DUSE_AURA=1 -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS >> -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S >> -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL >> -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 >> -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP >> -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE >> -DNTDDI_VERSION=NTDDI_WIN10_VB -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 >> -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 >> -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT >> -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_ATOMIC_OBJECT_FIELD_WRITES >> -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_SHARED_RO_HEAP >> -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH >> -DV8_SHORT_BUILTIN_CALLS -DV8_EXTERNAL_CODE_SPACE >> -DV8_ENABLE_SYSTEM_INSTRUMENTATION -DV8_ENABLE_WEBASSEMBLY >> -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING >> -DV8_ADVANCED_BIGINT_ALGORITHMS -DV8_COMPRESS_POINTERS >> -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH >> -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS >> -DCPPGC_CAGED_HEAP -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS >> -DV8_TARGET_OS_WIN -DBUILDING_V8_SHARED -DU_USING_ICU_NAMESPACE=0 >> -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 >> -DU_ENABLE_RESOURCE_TRACING=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE >> -DUSING_V8_BASE_SHARED
Re: [v8-users] [10.0.139.9] Compile error "C2280" with MSVC
Thank you for rapid reply! I'll check it out! 2022年5月1日日曜日 16:37:59 UTC+9 Ben Noordhuis: > On Sun, May 1, 2022 at 3:12 AM Kazuya Hiruma wrote: > > > > Hi, there. > > > > I'm struggling with building V8 as a DLL on Windows with MSVC. > > > > I got a lot of compiler errors. (I will show it below) > > > > I also found out a same discussion thread but it wasn't a way to fix the > problem. > > > > - > > > > [My environment info] > > > > Windows 10 > > Visual Studio 2019 > > MSVC 14.29.30133 > > ninja 1.8.2 > > > > > > [GN arguments] > > is_debug = false > > is_clang = false > > is_component_build = true > > target_cpu = "x64" > > > > [Etc] > > V8 version 10.0.139.9 > > > > - > > > > The error is below. > > > > [770/3045] CXX obj/torque_generated_definitions/factory.obj > > FAILED: obj/torque_generated_definitions/factory.obj > > ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft > Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/cl.exe" /c > gen/torque-generated/factory.cc > /Foobj/torque_generated_definitions/factory.obj /nologo /showIncludes > -DUSE_AURA=1 -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS > -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S > -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL > -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 > -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP > -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE > -DNTDDI_VERSION=NTDDI_WIN10_VB -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 > -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 > -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT > -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_ATOMIC_OBJECT_FIELD_WRITES > -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_SHARED_RO_HEAP > -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH > -DV8_SHORT_BUILTIN_CALLS -DV8_EXTERNAL_CODE_SPACE > -DV8_ENABLE_SYSTEM_INSTRUMENTATION -DV8_ENABLE_WEBASSEMBLY > -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING > -DV8_ADVANCED_BIGINT_ALGORITHMS -DV8_COMPRESS_POINTERS > -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH > -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS > -DCPPGC_CAGED_HEAP -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS > -DV8_TARGET_OS_WIN -DBUILDING_V8_SHARED -DU_USING_ICU_NAMESPACE=0 > -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 > -DU_ENABLE_RESOURCE_TRACING=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE > -DUSING_V8_BASE_SHARED -I../.. -Igen -I../../include -Igen/include > -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n > /Gy /FS /bigobj /utf-8 /Zc:sizedDealloc- /wd4117 /D__DATE__= /D__TIME__= > /D__TIMESTAMP__= /WX /wd4244 /Zi /MD /wd4245 /wd4267 /wd4324 /wd4701 > /wd4702 /wd4703 /wd4709 /wd4714 /wd4715 /wd4718 /wd4723 /wd4724 /wd4800 > /wd4506 /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 > /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 > /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 > /wd4201 /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 > /wd4703 /wd4661 /wd4706 /wd4715 /O2 /Ob2 /Oy- /Zc:inline /Gw /std:c++17 > /Zc:alignedNew- /TP /GR- /Fd"obj/torque_generated_definitions_cc.pdb" > > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xutility(4198): > error C2280: > 'std::unique_ptr> > > ::unique_ptr>::operator > > =(const > std::unique_ptr> > > &)': attempting to reference a deleted function > > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\memory(3270): note: > see declaration of > 'std::unique_ptr>::operator > > =' > > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\memory(3270): note: > 'std::unique_ptr> > > ::unique_ptr>::operator > > =(const > std::unique_ptr> > > &)': function was explicitly deleted > > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(1175): note: > see reference to function template instantiation '_OutIt > *std::_Copy_unchecked<_Iter,std::unique_ptr>*>(_InIt,_InIt,_OutIt)' > > being compiled > > with > > [ > > > _OutIt=std::unique_ptr> > > *, > > > _Iter=std::unique_ptr> > > *, > > > _InIt=std::unique_ptr> > > * > > ] > > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(1189): note: > see reference to function template instantiation 'void > std::vector>,std::allocator>>>::_Assign_range<_Iter>(_Iter,_Iter,std::forward_iterator_tag)' > > being compiled > > with > > [ > > > _Iter=std::unique_ptr> > > * > > ] > > C:\Program Files (x86)\Microsoft Visual >
Re: [v8-users] [10.0.139.9] Compile error "C2280" with MSVC
On Sun, May 1, 2022 at 3:12 AM Kazuya Hiruma wrote: > > Hi, there. > > I'm struggling with building V8 as a DLL on Windows with MSVC. > > I got a lot of compiler errors. (I will show it below) > > I also found out a same discussion thread but it wasn't a way to fix the > problem. > > - > > [My environment info] > > Windows 10 > Visual Studio 2019 > MSVC 14.29.30133 > ninja 1.8.2 > > > [GN arguments] > is_debug = false > is_clang = false > is_component_build = true > target_cpu = "x64" > > [Etc] > V8 version 10.0.139.9 > > - > > The error is below. > > [770/3045] CXX obj/torque_generated_definitions/factory.obj > FAILED: obj/torque_generated_definitions/factory.obj > ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64/cl.exe" /c > gen/torque-generated/factory.cc > /Foobj/torque_generated_definitions/factory.obj /nologo /showIncludes > -DUSE_AURA=1 -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS > -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S > -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL > -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 > -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN > -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_VB > -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND > -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 > -DV8_INTL_SUPPORT -DV8_USE_EXTERNAL_STARTUP_DATA > -DV8_ATOMIC_OBJECT_FIELD_WRITES -DV8_ENABLE_LAZY_SOURCE_POSITIONS > -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO > -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SHORT_BUILTIN_CALLS > -DV8_EXTERNAL_CODE_SPACE -DV8_ENABLE_SYSTEM_INSTRUMENTATION > -DV8_ENABLE_WEBASSEMBLY -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING > -DV8_ADVANCED_BIGINT_ALGORITHMS -DV8_COMPRESS_POINTERS > -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH > -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS > -DCPPGC_CAGED_HEAP -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS > -DV8_TARGET_OS_WIN -DBUILDING_V8_SHARED -DU_USING_ICU_NAMESPACE=0 > -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 > -DU_ENABLE_RESOURCE_TRACING=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE > -DUSING_V8_BASE_SHARED -I../.. -Igen -I../../include -Igen/include > -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n /Gy > /FS /bigobj /utf-8 /Zc:sizedDealloc- /wd4117 /D__DATE__= /D__TIME__= > /D__TIMESTAMP__= /WX /wd4244 /Zi /MD /wd4245 /wd4267 /wd4324 /wd4701 /wd4702 > /wd4703 /wd4709 /wd4714 /wd4715 /wd4718 /wd4723 /wd4724 /wd4800 /wd4506 > /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 > /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 > /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 > /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 > /wd4661 /wd4706 /wd4715 /O2 /Ob2 /Oy- /Zc:inline /Gw /std:c++17 > /Zc:alignedNew- /TP /GR- /Fd"obj/torque_generated_definitions_cc.pdb" > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xutility(4198): error > C2280: > 'std::unique_ptr> > > ::unique_ptr>::operator > =(const > std::unique_ptr> > &)': attempting to reference a deleted function > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\memory(3270): note: > see declaration of > 'std::unique_ptr>::operator > =' > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\memory(3270): note: > 'std::unique_ptr> > > ::unique_ptr>::operator > =(const > std::unique_ptr> > &)': function was explicitly deleted > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(1175): note: > see reference to function template instantiation '_OutIt > *std::_Copy_unchecked<_Iter,std::unique_ptr>*>(_InIt,_InIt,_OutIt)' > being compiled > with > [ > _OutIt=std::unique_ptr> > *, > _Iter=std::unique_ptr> > *, > _InIt=std::unique_ptr> > * > ] > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(1189): note: > see reference to function template instantiation 'void > std::vector>,std::allocator>>>::_Assign_range<_Iter>(_Iter,_Iter,std::forward_iterator_tag)' > being compiled > with > [ > _Iter=std::unique_ptr> > * > ] > C:\Program Files (x86)\Microsoft Visual > Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(1189): note: > see reference to function template instantiation 'void > std::vector>,std::allocator>>>::_Assign_range<_Iter>(_Iter,_Iter,std::forward_iterator_tag)' > being compiled > with > [ > _Iter=std::unique_ptr> > * > ]