From 5fb6274c6cd7d57421799bf7ac90991fbcbd7d22 Mon Sep 17 00:00:00 2001 From: brucedawson Date: Sat, 1 Nov 2014 01:46:38 -0700 Subject: [PATCH] Disable /analyze for the libexif and yasm projects to hack around internal compiler errors VC++ hits internal compiler errors on a source file in each of yasm and libexif. This halts the build and prevents full analysis. Therefore this change disables /analyze for those two projects, to increase total coverage. Also fix a typo in libexif's README.chromium BUG=427616 Review URL: https://codereview.chromium.org/657883003 Cr-Commit-Position: refs/heads/master@{#302381} --- third_party/libexif/README.chromium | 2 +- third_party/libexif/libexif.gyp | 10 ++++++++++ third_party/yasm/README.chromium | 5 ++++- third_party/yasm/yasm.gyp | 15 +++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/third_party/libexif/README.chromium b/third_party/libexif/README.chromium index 24043ffa79a7..628eb4e62614 100644 --- a/third_party/libexif/README.chromium +++ b/third_party/libexif/README.chromium @@ -21,5 +21,5 @@ Local Modifications: INSTALL, install-sh, Makefile-files, *.sym, *.am, *.in, *.pc.in, *.spec, *.sh and *.txt files. - Removed "doc", "po", "NEWS", "mkinstalldirs", "missing", "nls" folders. -- Removed inline from exif_tag_table_count function in exif_tag.c, to build +- Removed inline from exif_tag_table_count function in exif-tag.c, to build cleanly with MSVC's non-standard inline rules. diff --git a/third_party/libexif/libexif.gyp b/third_party/libexif/libexif.gyp index efb170269279..9a36098d234a 100644 --- a/third_party/libexif/libexif.gyp +++ b/third_party/libexif/libexif.gyp @@ -91,6 +91,16 @@ 4018, # size/unsigned mismatch 4267, # size_t -> ExifLong truncation on amd64 ], + # As of VS 2013 Update 3, building this project with /analyze hits + # an internal compiler error on exif-entry.c. This halts the build + # and prevents subsequent analysis. Therefore, /analyze is + # disabled for this project. See this bug for details: + # https://connect.microsoft.com/VisualStudio/feedback/details/1014689/internal-compiler-error + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions!': [ '/analyze' ] + }, + }, }], ], }, diff --git a/third_party/yasm/README.chromium b/third_party/yasm/README.chromium index 8226f8b9c1de..56513f7631c0 100644 --- a/third_party/yasm/README.chromium +++ b/third_party/yasm/README.chromium @@ -135,4 +135,7 @@ Instructions for recreating the yasm.gyp file. default. The yasm.gyp build patches this file before invoking it to allow specifying an output directory. - 10) If all that's is finished, attempt to build....and cross your fingers. + 10) Recreate the 'AdditionalOptions!': [ '/analyze' ] block so that VC++ + /analyze builds won't fail. + + 11) If all that's is finished, attempt to build....and cross your fingers. diff --git a/third_party/yasm/yasm.gyp b/third_party/yasm/yasm.gyp index 78f196676670..0c21b8380557 100644 --- a/third_party/yasm/yasm.gyp +++ b/third_party/yasm/yasm.gyp @@ -77,6 +77,21 @@ '-Wno-incompatible-pointer-types', ], }, + 'conditions': [ + ['OS=="win"', { + # As of VS 2013 Update 3, building this project with /analyze hits an + # internal compiler error on elf-x86-amd64.c in release builds with + # the amd64_x86 compiler. This halts the build and prevents subsequent + # analysis. Therefore, /analyze is disabled for this project. See this + # bug for details: + # https://connect.microsoft.com/VisualStudio/feedback/details/1014799/internal-compiler-error-when-using-analyze + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions!': [ '/analyze' ] + }, + }, + }], + ], 'sources': [ 'source/patched-yasm/frontends/yasm/yasm-options.c', 'source/patched-yasm/frontends/yasm/yasm.c', -- 2.11.4.GIT