mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-config: add --cc and --ld options.
* `--cc` print compiler name * `--ld` print linker name
This commit is contained in:
@@ -4,7 +4,9 @@ print_help()
|
||||
{
|
||||
echo "Usage: mruby-config [switches]"
|
||||
echo " switches:"
|
||||
echo " --cc print compiler name"
|
||||
echo " --cflags print flags passed to compiler"
|
||||
echo " --ld print linker name"
|
||||
echo " --ldflags print flags passed to linker"
|
||||
echo " --ldflags-before-libs print flags passed to linker before linked libraries"
|
||||
echo " --libs print linked libraries"
|
||||
@@ -19,7 +21,9 @@ fi
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--cc) echo MRUBY_CC;;
|
||||
--cflags) echo MRUBY_CFLAGS;;
|
||||
--ld) echo MRUBY_LD;;
|
||||
--ldflags) echo MRUBY_LDFLAGS;;
|
||||
--ldflags-before-libs) echo MRUBY_LDFLAGS_BEFORE_LIBS;;
|
||||
--libs) echo MRUBY_LIBS;;
|
||||
|
||||
@@ -16,6 +16,9 @@ MRuby.each_target do
|
||||
open(t.name, 'w') do |f|
|
||||
f.puts "MRUBY_CFLAGS = #{cc.all_flags}"
|
||||
|
||||
f.puts "MRUBY_CC = #{cc.command}"
|
||||
f.puts "MRUBY_LD = #{linker.command}"
|
||||
|
||||
libgems = gems.reject{|g| g.bin?}
|
||||
gem_flags = libgems.map {|g| g.linker.flags }
|
||||
gem_library_paths = libgems.map {|g| g.linker.library_paths }
|
||||
|
||||
Reference in New Issue
Block a user