1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ext/date: reject unknown compiler option

* ext/date/extconf.rb: check warnings.
* lib/mkmf.rb (try_cflags): pass options to try_compile.
* win32/Makefile.sub (WERRORFLAG): make unknown command line
  options an error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-04-10 02:44:12 +00:00
parent 14d10e054f
commit 54264f534a
4 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,12 @@
Fri Apr 10 11:44:09 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/date/extconf.rb: check warnings.
* lib/mkmf.rb (try_cflags): pass options to try_compile.
* win32/Makefile.sub (WERRORFLAG): make unknown command line
options an error.
Fri Apr 10 08:00:17 2015 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_process.rb: unfortunately, windows is not POSIX...

View file

@ -1,5 +1,5 @@
require 'mkmf'
if try_cflags("-std=iso9899:1999")
if try_cflags("-std=iso9899:1999", :werror => true)
$CFLAGS += " " << "-std=iso9899:1999"
end
create_makefile('date_core')

View file

@ -621,8 +621,8 @@ MSG
$CFLAGS = cflags unless ret
end
def try_cflags(flags)
try_compile(MAIN_DOES_NOTHING, flags)
def try_cflags(flags, *opts)
try_compile(MAIN_DOES_NOTHING, flags, *opts)
end
def with_ldflags(flags)

View file

@ -208,7 +208,7 @@ WARNFLAGS = -W2 -wd4996 -we4028 -we4142
WARNFLAGS = -W2
!endif
!endif
WERRORFLAG = -WX
WERRORFLAG = -WX -weD9002
!if !defined(CFLAGS)
CFLAGS = $(RUNTIMEFLAG) $(DEBUGFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) $(COMPILERFLAG)
!endif