[macruby-changes] [5268] MacRuby/trunk/rakelib/builder/options.rb
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 9 15:59:40 PST 2011
Revision: 5268
http://trac.macosforge.org/projects/ruby/changeset/5268
Author: lsansonetti at apple.com
Date: 2011-03-09 15:59:37 -0800 (Wed, 09 Mar 2011)
Log Message:
-----------
allow extra flags to be passed to the compiler via the CFLAGS rakefile variable
Modified Paths:
--------------
MacRuby/trunk/rakelib/builder/options.rb
Modified: MacRuby/trunk/rakelib/builder/options.rb
===================================================================
--- MacRuby/trunk/rakelib/builder/options.rb 2011-03-09 01:02:33 UTC (rev 5267)
+++ MacRuby/trunk/rakelib/builder/options.rb 2011-03-09 23:59:37 UTC (rev 5268)
@@ -60,6 +60,8 @@
end
CXX = b.option('CXX', default_CXX)
+EXTRA_CFLAGS = b.option('CFLAGS', '')
+
# Everything below this comment should *not* be modified.
if ENV['build_as_embeddable']
@@ -152,8 +154,8 @@
sdk = opt.delete(:sdk)
has_libauto = sdk ? File.exist?("#{sdk}/usr/lib/libauto.dylib") : true
archflags = archs.map { |x| "-arch #{x}" }.join(' ')
- @cflags = "-std=c99 -I. -I./include -pipe -fno-common -fexceptions -fblocks -g -O#{OPTZ_LEVEL} -Wall -Wno-deprecated-declarations -Werror #{archflags}"
- @cxxflags = "-I. -I./include -fblocks -g -Wall -Wno-deprecated-declarations -Werror #{archflags}"
+ @cflags = "-std=c99 -I. -I./include -pipe -fno-common -fexceptions -fblocks -g -O#{OPTZ_LEVEL} -Wall -Wno-deprecated-declarations -Werror #{archflags} #{EXTRA_CFLAGS}"
+ @cxxflags = "-I. -I./include -fblocks -g -Wall -Wno-deprecated-declarations -Werror #{archflags} #{EXTRA_CFLAGS}"
@ldflags = '-lpthread -ldl -lxml2 -lobjc -licucore -framework Foundation'
@ldflags << " -lauto" if has_libauto
if opt.delete(:static)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110309/282049a6/attachment.html>
More information about the macruby-changes
mailing list