Commit 6ef4bd8a authored by machenbach's avatar machenbach Committed by Commit bot

[build] Tweak configuration for win-clang

Unports parts of https://codereview.chromium.org/1828543003
as per suggestion in
https://codereview.chromium.org/1886293002/

Ports https://codereview.chromium.org/1532723003

Also restores -fmsc-version=1800 to support win-clang with
MSVS 2013.

BUG=chromium:603011
LOG=n
NOTRY=true

Review URL: https://codereview.chromium.org/1895453002

Cr-Commit-Position: refs/heads/master@{#35535}
parent b1411543
# Copyright 2016 the V8 project authors. All rights reserved.
# Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file is meant to be included to set clang-specific compiler flags.
# To use this the following variable can be defined:
# clang_warning_flags: list: Compiler flags to pass to clang.
# clang_warning_flags_unset: list: Compiler flags to not pass to clang.
#
# Only use this in third-party code. In chromium_code, fix your code to not
# warn instead!
#
# Note that the gypi file is included in target_defaults, so it does not need
# to be explicitly included.
#
# Warning flags set by this will be used on all platforms. If you want to set
# warning flags on only some platforms, you have to do so manually.
#
# To use this, create a gyp target with the following form:
# {
# 'target_name': 'my_target',
# 'variables': {
# 'clang_warning_flags': ['-Wno-awesome-warning'],
# 'clang_warning_flags_unset': ['-Wpreviously-set-flag'],
# }
# }
{
'variables': {
'clang_warning_flags_unset%': [], # Provide a default value.
},
'conditions': [
['clang==1', {
# This uses >@ instead of @< to also see clang_warning_flags set in
# targets directly, not just the clang_warning_flags in target_defaults.
'cflags': [ '>@(clang_warning_flags)' ],
'cflags!': [ '>@(clang_warning_flags_unset)' ],
'xcode_settings': {
'WARNING_CFLAGS': ['>@(clang_warning_flags)'],
'WARNING_CFLAGS!': ['>@(clang_warning_flags_unset)'],
},
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [ '>@(clang_warning_flags)' ],
'AdditionalOptions!': [ '>@(clang_warning_flags_unset)' ],
},
},
}],
['clang==0 and host_clang==1', {
'target_conditions': [
['_toolset=="host"', {
'cflags': [ '>@(clang_warning_flags)' ],
'cflags!': [ '>@(clang_warning_flags_unset)' ],
}],
],
}],
],
}
......@@ -389,12 +389,14 @@
'target_defaults': {
'variables': {
'v8_code%': '<(v8_code)',
'clang_warning_flags': [],
'conditions':[
['OS=="android"', {
'host_os%': '<(host_os)',
}],
],
},
'includes': [ 'set_clang_warning_flags.gypi', ],
'default_configuration': 'Debug',
'configurations': {
'DebugBaseCommon': {
......@@ -957,10 +959,23 @@
'/FIIntrin.h',
# TODO(hans): Make this list shorter eventually, http://crbug.com/504657
'-Qunused-arguments', # http://crbug.com/504658
'-Wno-microsoft-enum-value', # http://crbug.com/505296
'-Wno-unknown-pragmas', # http://crbug.com/505314
'-Wno-microsoft-cast', # http://crbug.com/550065
],
},
}],
['clang==1 and MSVS_VERSION == "2013"', {
'VCCLCompilerTool': {
'AdditionalOptions': [
'-fmsc-version=1800',
],
},
}],
['clang==1 and MSVS_VERSION == "2015"', {
'VCCLCompilerTool': {
'AdditionalOptions': [
'-fmsc-version=1900',
],
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment