[Vendor] Cannot reuse opts[:cflags] if it has been deleted before.

This commit is contained in:
Eloy Durán
2014-02-07 11:25:07 +01:00
parent 6e9afb3248
commit d21302479b
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@@ -8,6 +8,8 @@
* Fixed a regression with specifying external templates to `motion create'.
* Fixed a bug which WeakRef.new would cause a crash when passed nil, true,
false, Fixnum or Float object.
* Fixed issue where `vendor_project' with `:static' did not reuse `:cflags'
for the BridgeSupport generation.
= RubyMotion 2.22 =

View File

@@ -134,7 +134,7 @@ EOS
bs_file = File.join(build_dir, File.basename(@path) + '.bridgesupport')
if !File.exist?(bs_file) or headers.any? { |h| File.mtime(h) > File.mtime(bs_file) }
FileUtils.mkdir_p File.dirname(bs_file)
bs_cflags = (opts.delete(:bridgesupport_cflags) or opts.delete(:cflags) or '')
bs_cflags = (opts.delete(:bridgesupport_cflags) or cflags)
bs_exceptions = (opts.delete(:bridgesupport_exceptions) or [])
@config.gen_bridge_metadata(platform, headers, bs_file, bs_cflags, bs_exceptions)
end