Skip to content

Commit

Permalink
GN: Enable chromium_code config instead.
Browse files Browse the repository at this point in the history
Using "no_chromium_code" is a bit less strict, but ANGLE should be
able to handle slightly stricter warnings.

BUG=angleproject:1449

Change-Id: Ifaf77201085dd70cf5ff628b1aa02de55c5e96ba
Reviewed-on: https://chromium-review.googlesource.com/360940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
  • Loading branch information
null77 authored and Commit Bot committed Jul 18, 2016
1 parent e319171 commit aeb477f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
*.rc eol=crlf
**/compiled/*.h eol=crlf
*.sh eol=lf
*.gn eol=lf
52 changes: 24 additions & 28 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ if (is_win) {
}
}

angle_undefine_configs = [
"//build/config/compiler:chromium_code",
"//build/config/compiler:default_include_dirs",
]
angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ]

component("translator") {
sources = [
Expand All @@ -73,10 +70,7 @@ component("translator") {
defines = [ "ANGLE_TRANSLATOR_IMPLEMENTATION" ]

configs -= angle_undefine_configs
configs += [
":internal_config",
"//build/config/compiler:no_chromium_code",
]
configs += [ ":internal_config" ]

public_deps = [
":translator_lib",
Expand Down Expand Up @@ -105,10 +99,7 @@ static_library("preprocessor") {
sources = rebase_path(compiler_gypi.angle_preprocessor_sources, ".", "src")

configs -= angle_undefine_configs
configs += [
":internal_config",
"//build/config/compiler:no_chromium_code",
]
configs += [ ":internal_config" ]
}

config("translator_static_config") {
Expand Down Expand Up @@ -139,7 +130,6 @@ static_library("angle_common") {
":angle_common_config",
":debug_annotations_config",
":internal_config",
"//build/config/compiler:no_chromium_code",
]

public_deps = [
Expand All @@ -162,10 +152,7 @@ static_library("angle_image_util") {
sources = rebase_path(gles_gypi.libangle_image_util_sources, ".", "src")

configs -= angle_undefine_configs
configs += [
":internal_config",
"//build/config/compiler:no_chromium_code",
]
configs += [ ":internal_config" ]

public_configs = [ ":angle_image_util_config" ]

Expand Down Expand Up @@ -199,7 +186,6 @@ static_library("translator_lib") {
configs += [
":internal_config",
":translator_static_config",
"//build/config/compiler:no_chromium_code",
]
public_configs = [ ":external_config" ]

Expand All @@ -211,6 +197,12 @@ static_library("translator_lib") {
public_deps = [
":angle_common",
]

if (is_win) {
# Necessary to suppress some system header xtree warnigns in Release.
# For some reason this warning doesn't get triggered in Chromium
cflags = [ "/wd4718" ]
}
}

static_library("translator_static") {
Expand All @@ -224,10 +216,7 @@ static_library("translator_static") {
}

configs -= angle_undefine_configs
configs += [
":internal_config",
"//build/config/compiler:no_chromium_code",
]
configs += [ ":internal_config" ]
public_configs = [ ":translator_static_config" ]

public_deps = [
Expand Down Expand Up @@ -394,12 +383,12 @@ static_library("libANGLE") {
}

configs -= angle_undefine_configs

configs += [
":commit_id_config",
":debug_annotations_config",
":libANGLE_config",
":internal_config",
"//build/config/compiler:no_chromium_code",
]

if (is_win) {
Expand All @@ -413,7 +402,10 @@ config("shared_library_public_config") {
if (is_mac && !is_component_build) {
# Executable targets that depend on the shared libraries below need to have
# the rpath setup in non-component build configurations.
ldflags = [ "-rpath", "@executable_path/" ]
ldflags = [
"-rpath",
"@executable_path/",
]
}
}

Expand All @@ -426,7 +418,10 @@ shared_library("libGLESv2") {
}

if (is_mac && !is_component_build) {
ldflags = [ "-install_name", "@rpath/${target_name}.dylib" ]
ldflags = [
"-install_name",
"@rpath/${target_name}.dylib",
]
public_configs = [ ":shared_library_public_config" ]
}

Expand All @@ -436,7 +431,6 @@ shared_library("libGLESv2") {
":commit_id_config",
":debug_annotations_config",
":libANGLE_config",
"//build/config/compiler:no_chromium_code",
]

defines = [ "LIBGLESV2_IMPLEMENTATION" ]
Expand All @@ -455,7 +449,10 @@ shared_library("libEGL") {
}

if (is_mac && !is_component_build) {
ldflags = [ "-install_name", "@rpath/${target_name}.dylib" ]
ldflags = [
"-install_name",
"@rpath/${target_name}.dylib",
]
public_configs = [ ":shared_library_public_config" ]
}

Expand All @@ -465,7 +462,6 @@ shared_library("libEGL") {
":commit_id_config",
":debug_annotations_config",
":libANGLE_config",
"//build/config/compiler:no_chromium_code",
]

defines = [ "LIBEGL_IMPLEMENTATION" ]
Expand Down
6 changes: 1 addition & 5 deletions build/common_defines.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@
[
4100, # Unreferenced formal parameter. Not interesting.
4127, # conditional expression is constant. Too noisy to be useful.

# TODO: 4702 doesn't fire on xtree in VS2015 (CTP6). We can remove C4702 after moving to VS2015.
4702, # Unreachable code. Should only fire on system header xtree.

4718, # Recursive call has no side effects. Fires on xtree too.
4718, # Recursive call has no side effects. Fires on xtree system header.
],
'conditions':
[
Expand Down
2 changes: 0 additions & 2 deletions src/compiler/translator/Intermediate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,4 @@ TIntermTyped *TIntermediate::foldAggregateBuiltIn(TIntermAggregate *aggregate)
// Constant folding not supported for the built-in.
return nullptr;
}

return nullptr;
}
4 changes: 1 addition & 3 deletions src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ static size_t GetMaximumVertexUniformBlocks(D3D_FEATURE_LEVEL featureLevel)

static size_t GetReservedVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel)
{
// According to The OpenGL ES Shading Language specifications
// According to The OpenGL ES Shading Language specifications
// (Language Version 1.00 section 10.16, Language Version 3.10 section 12.21)
// built-in special variables (e.g. gl_FragCoord, or gl_PointCoord)
// which are statically used in the shader should be included in the variable packing algorithm.
Expand All @@ -820,8 +820,6 @@ static size_t GetReservedVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel)

default: UNREACHABLE(); return 0;
}

return 1;
}

static size_t GetMaximumVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel)
Expand Down
2 changes: 0 additions & 2 deletions src/libANGLE/validationES2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1599,8 +1599,6 @@ static bool ValidateObjectIdentifierAndName(Context *context, GLenum identifier,
context->handleError(Error(GL_INVALID_ENUM, "Invalid identifier."));
return false;
}

return true;
}

bool ValidateObjectLabelKHR(Context *context,
Expand Down

0 comments on commit aeb477f

Please sign in to comment.