Skip to content

Commit

Permalink
Fix Linux debug build.
Browse files Browse the repository at this point in the history
GN reports the following error when trying to build NW.js on Linux with
is_debug=true:

  ERROR at //headless/BUILD.gn:747:1: Duplicate object file
  static_library("headless_shell_lib") {
  ^-------------------------------------
  The target //headless:headless_shell_lib
  generates two object files with the same name:
    obj/headless/headless_shell_lib/headless_shell_switches.o

  It could be you accidentally have a file listed twice in the
  sources. Or, depending on how your toolchain maps sources to
  object files, two source files with the same name in different
  directories could map to the same object file.

  In the latter case, either rename one of the files or move one of
  the sources to a separate source_set to avoid them both being in
  the same target.

The duplication error is caused by
https://github.com/nwjs/chromium.src/blob/dcf96012c9c2093e38d49af4dd17c5e680f0ed42/headless/BUILD.gn#L757-L762,
which seems to be unnecessary here.
  • Loading branch information
hujiajie committed Sep 3, 2017
1 parent dcf9601 commit 8ed2376
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions headless/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,6 @@ static_library("headless_shell_lib") {
"lib/browser/headless_content_browser_client.h",
"public/headless_shell.h",
]
if (is_debug && is_linux) {
sources += [
"app/headless_shell_switches.cc",
"app/headless_shell_switches.h",
]
}

deps = [
":headless_renderer",
Expand Down

0 comments on commit 8ed2376

Please sign in to comment.