Skip to content

Commit

Permalink
Remove '--warn_as_error' option from 'build_mozc.py'
Browse files Browse the repository at this point in the history
As GYP build is basically deprecated except for Windows, there shouldn't be a
big problem in removing '--warn_as_error' option from 'build_mozc.py', which has
been off by default in OSS build.

This is about compiler warnings.  There must be difference in the build
artifacts.

This is a preparation for #803.

#codehealth

PiperOrigin-RevId: 563446029
  • Loading branch information
yukawa authored and hiroyuki-komatsu committed Sep 7, 2023
1 parent fbd8823 commit c643a85
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
11 changes: 0 additions & 11 deletions src/build_mozc.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,6 @@ def ParseGypOptions(args):
default='data/version/mozc_version_template.bzl')
AddTargetPlatformOption(parser)

# Mac and Linux
parser.add_option('--warn_as_error', action='store_true',
dest='warn_as_error', default=(default_branding != 'Mozc'),
help='Treat compiler warning as error. This option is used '
'on Mac and Linux.')

# Linux
parser.add_option('--server_dir', dest='server_dir',
default='',
Expand Down Expand Up @@ -511,11 +505,6 @@ def GypMain(options, unused_args):
gyp_options.extend(['-D', 'build_short_base=%s' %
GetBuildShortBaseName(target_platform)])

if options.warn_as_error:
gyp_options.extend(['-D', 'warn_as_error=1'])
else:
gyp_options.extend(['-D', 'warn_as_error=0'])

if version.IsDevChannel():
gyp_options.extend(['-D', 'channel_dev=1'])

Expand Down
13 changes: 0 additions & 13 deletions src/gyp/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,13 @@
'mac_sdk%': '13.0',
'mac_deployment_target%': '11.0',

# 'conditions' is put inside of 'variables' so that we can use
# another 'conditions' in this gyp element level later. Note that
# you can have only one 'conditions' in a gyp element.
'variables': {
'extra_warning_cflags': '',
'conditions': [
['warn_as_error!=0', {
'extra_warning_cflags': '-Werror',
}],
],
},

# warning_cflags will be shared with Mac and Linux.
'warning_cflags': [
'-Wall',
'-Wno-char-subscripts',
'-Wno-sign-compare',
'-Wno-deprecated-declarations',
'-Wwrite-strings',
'<@(extra_warning_cflags)',

'-Wno-unknown-warning-option',
'-Wno-inconsistent-missing-override',
Expand Down

0 comments on commit c643a85

Please sign in to comment.