New issue
Advanced search Search tips

Issue 706627 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Double compiles of libjpeg in Win64 builds

Project Member Reported by brucedaw...@chromium.org, Mar 29 2017

Issue description

https://chromium-review.googlesource.com/c/446667/ change Win64 versions of libyuv to be compiled with clang so that we can use inline assembly. Unfortunately since libjpeg is in the deps list that causes *it* to be compiled with clang-cl as well, so we end up with two copies.

In some configurations this seems to lead to duplicate symbol warnings (not seen recently) but it is also just wasteful and best avoided.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ae920018eb44986c5c9cdf16285361720dd0df59

commit ae920018eb44986c5c9cdf16285361720dd0df59
Author: brucedawson <brucedawson@chromium.org>
Date: Thu Mar 30 21:38:32 2017

Add an include-paths only jpeg group

Because libyuv switched to compiling with clang for win64 builds:
https://chromium-review.googlesource.com/c/446667/
we ended up with libjpeg being compiled an additional time, also with
clang. Having two copies is undesirable, so we need a way for libyuv to
request the include paths for the appropriate version of libjpeg. This
sets up a group that libyuv can use for that purpose.

Getting libyuv to use this group is a separate change, in the libyuv
repo.

R=brettw@chromium.org
BUG= 706627 

Review-Url: https://codereview.chromium.org/2779393002
Cr-Commit-Position: refs/heads/master@{#460889}

[modify] https://crrev.com/ae920018eb44986c5c9cdf16285361720dd0df59/third_party/BUILD.gn

I noticed the duplicate symbol warnings again - there are 231 of them when building cast_receiver.lib, looking like this:
jquanti-sse2-64.o : warning LNK4006: jsimd_convsamp_sse2 already defined in jquanti-sse2-64.o; second definition ignored

They happen because we link with obj/third_party/libjpeg_turbo/simd_asm/jquanti-sse2-64.o and with clang_x64/obj/third_party/libjpeg_turbo/simd_asm/jquanti-sse2-64.o. Once we roll deps (working on it) this duplication will be impossible.

The configuration where I saw these, in case these are configuration dependent, was:

is_component_build = false
is_debug = false
target_cpu = "x64"
enable_nacl = false
use_goma = true
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f976fc19b53288cc6dca4dc80a467c319701e1b2

commit f976fc19b53288cc6dca4dc80a467c319701e1b2
Author: brucedawson <brucedawson@chromium.org>
Date: Fri Apr 28 20:40:37 2017

Roll src\third_party\libyuv fc02cc380..3b583396b (4 commits)

https://chromium.googlesource.com/libyuv/libyuv.git/+log/fc02cc3806a3..3b583396bf13

$ git log fc02cc380..3b583396b --date=short --no-merges --format='%ad %ae %s'
2017-04-24 fbarchard Disable CopyRow_MIPS
2017-04-18 brucedawson Avoid double compiles of libjpeg
2017-04-18 fbarchard Roll chromium_revision da7cc8ca4c..ce95e5d83f (465147:465389)
2017-04-18 kjellander Roll chromium_revision 7950721f08..da7cc8ca4c (454907:465147)

Created with:
  roll-dep src\third_party\libyuv

The "Avoid double compiles of libjpeg" change will slightly reduce the number of
build steps and will also avoid hundreds of duplicate symbol warnings when
linking. Details in the bug.

BUG= 706627 

Review-Url: https://codereview.chromium.org/2841273003
Cr-Commit-Position: refs/heads/master@{#468117}

[modify] https://crrev.com/f976fc19b53288cc6dca4dc80a467c319701e1b2/DEPS

Status: Fixed (was: Started)
I confirmed that build all using the gn args listed in comment#2 now builds without warnings.

Sign in to add a comment