Issue 8017 in v8: v8_monolith.lib cannot be linked with an app in Visual Studio

365 views
Skip to first unread message

serg… via monorail

unread,
Aug 3, 2018, 1:45:22 PM8/3/18
to v8-re...@googlegroups.com
Status: Untriaged
Owner: ----
Type: Bug

New issue 8017 by serg...@gmail.com: v8_monolith.lib cannot be linked with an app in Visual Studio
https://bugs.chromium.org/p/v8/issues/detail?id=8017

Version: 4a1a6a410f0b60c361aa1bf14dd911254c51e1b1 (6.9.427.11) and 3656b4656ed3b4c4f424f77e5b43fdebbd77b3c2 (current master)
OS: Windows
Architecture: x64
Configuration: Debug

What steps will reproduce the problem?
- build V8 in cmd
1. set DEPOT_TOOLS_WIN_TOOLCHAIN=0
2. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
3. set PATH=%PATH%;d:\projects\reproduce-issue\depot_tools
4. gclient

5. fetch v8
// or fetch revision 4a1a6a410f0b60c361aa1bf14dd911254c51e1b1 (6.9.427.11)

> cd v8

6. gn.bat gen d:\projects\v8-project\build\x64\debug --args="is_component_build=false v8_enable_i18n_support=false v8_enable_slow_dchecks=false v8_monolithic=true v8_static_library=true v8_use_external_startup_data=false v8_use_snapshot=true target_cpu=\"x64\" v8_target_cpu=\"x64\" is_debug=true v8_optimized_debug=true"

Done. Made 121 targets from 72 files in 2319ms

7. ninja -C out\x64.debug v8_monolith

- now create a command line application in Visual Studio 2017
8. create an empty project
9. configure corresponding library and library search path
10. build it

What is the expected output?
The linked application.

What do you see instead?
1>D:\projects\reproduce-issue\v8\out\x64.debug\obj\v8_monolith.lib : fatal error LNK1136: invalid or corrupt file

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

serg… via monorail

unread,
Aug 3, 2018, 5:12:41 PM8/3/18
to v8-re...@googlegroups.com

Comment #1 on issue 8017 by serg...@gmail.com: v8_monolith.lib cannot be linked with an app in Visual Studio
https://bugs.chromium.org/p/v8/issues/detail?id=8017#c1

RESOLVED, sorry for bothering.

I figured it out by adding `is_clang = false treat_warnings_as_errors = false`.

jgru… via monorail

unread,
Aug 6, 2018, 2:36:34 AM8/6/18
to v8-re...@googlegroups.com
Updates:
Components: Build
Owner: jgr...@chromium.org
Status: WontFix

Comment #2 on issue 8017 by jgr...@chromium.org: v8_monolith.lib cannot be linked with an app in Visual Studio
https://bugs.chromium.org/p/v8/issues/detail?id=8017#c2

I suspect the reason was that the missing 'is_clang = false' turned on embedded builtins, which are not supported by non-clang windows builds. Thanks!
Reply all
Reply to author
Forward
0 new messages