I was able to get the msvc debug config to build using static libs last week (in UnrealJS). Maybe this will help you.
When you set "is_debug=true", v8 will define _DEBUG and change which args are passed to cl.exe. It sounds like the other libs you're trying to link with are maybe using the release CRT even in debug builds (UE4 does this, for example). If that's the case, you'll need to change a couple of things in v8's configuration to make it match the host environment: - in build\config\win\BUILD.gn on the next line after "# Desktop Windows: static CRT.", change config from :static_crt to :release_crt - in build\config\BUILD.gn file, remove the _DEBUG define from the "debug" configuration section - Not sure if this will apply to your version of v8, but I had to fix some compile errors with CSA_ASSERT_ARGS macro. If that happens, see https://github.com/v8/v8/commit/695c40f08ea I used the following args when running gn: v8_use_external_startup_data=false v8_use_snapshot=false v8_enable_i18n_support=false is_debug=true v8_static_library=true is_clang=false is_component_build=false Hope this helps! On Wednesday, March 11, 2020 at 1:40:45 PM UTC-7, Calvin L wrote: > > Hi, > > I was wondering if anyone had any luck with the MSVC debug build so far? I > successfully built v8 as a static library for release builds with these > commands > > * gn gen out.gn/x64_release <http://out.gn/x64_release> > --args="is_component_build=false is_debug=false target_cpu=\"x64\" > v8_enable_pointer_compression=false is_clang=false"* > > * call ninja -C out.gn/x64_release <http://out.gn/x64_release>* > > > * gn gen out.gn/x86_release <http://out.gn/x86_release> > --args="is_component_build=false is_debug=false target_cpu=\"x86\" > v8_enable_pointer_compression=false is_clang=false"* > * call ninja -C out.gn/x86_release <http://out.gn/x86_release>* > > These compile fine with my project. I haven't been able to get the debug > build to work on the other hand. Here's some of the args i tried to build > with > > args: is_component_build=false > is_debug=true > target_cpu="x64" > v8_enable_pointer_compression=false > is_clang=false > > result: successful build failed linking > > > args: is_component_build=false > is_debug=true > symbol_level=2 > target_cpu="x64" > v8_enable_backtrace=true > v8_enable_slow_dchecks=true > v8_enable_pointer_compression=false > is_clang=false" > > result: successful build failed linking > > > args: is_component_build=false > is_debug=true symbol_level=2 > target_cpu="x64" > v8_enable_backtrace=true > v8_enable_slow_dchecks=true > v8_optimized_debug=false > v8_enable_pointer_compression=false > is_clang=false > > result: failed build (attached errors in text file) > > > args: is_component_build=false > is_debug=true > symbol_level=2 > target_cpu="x64" > v8_enable_backtrace=true > v8_enable_slow_dchecks=true > v8_optimized_debug=false > v8_enable_pointer_compression=false > is_clang=false > enable_iterator_debugging=true > > result: successful build failed link > > > In the cases where the build was successful, I received errors while > trying to compile with my project > *"mismatch detected for '_ITERATOR_DEBUG_LEVEL':value '0' doesn't > match value '2' in {some other .lib in my project}"* > * "mismatch detected for "RuntimeLibrary": value 'MT_StaticRelease' > doesn't match value 'MTd_StaticDebug in {**some other .lib in my project* > *}'* > does anyone know why this is? Thanks in advanced! > > -CL > > -- -- 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/e52facf4-7575-4bd7-8bf5-36a1c8624c26o%40googlegroups.com.