Tiny refactoring around cflags

This commit is contained in:
Takashi Kokubun 2016-12-03 08:55:40 +09:00
parent 0121b84436
commit 11459966c7

View File

@ -9,11 +9,13 @@ MRuby::Build.new do |conf|
@mrbc.compile_options += ' -g'
end
conf.cc do |cc|
# Never support Visual C++.
# https://github.com/mruby/mruby/blob/1.2.0/CONTRIBUTING.md#comply-with-c99-isoiec-98991999
(conf.cc.flags.first.is_a?(String) ? conf.cc.flags : conf.cc.flags.first).reject! do |flag|
(cc.flags.first.is_a?(String) ? cc.flags : cc.flags.first).reject! do |flag|
flag == '-Wdeclaration-after-statement'
end
end
conf.linker do |linker|
linker.libraries += %w(X11)