Ignore:
Timestamp:
Jul 9, 2020, 8:51:43 AM (4 years ago)
Author:
coas-nagasima
Message:

mrubyを2.1.1に更新

Location:
EcnlProtoTool/trunk/mruby-2.1.1
Files:
1 added
7 deleted
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/gitlab.rake

    r331 r439  
    6464  [true, false].each do |mode_32|
    6565    ['', 'MRB_USE_FLOAT'].each do |float_conf|
    66       ['', 'MRB_INT16', 'MRB_INT64'].each do |int_conf|
    67         ['', 'MRB_NAN_BOXING', 'MRB_WORD_BOXING'].each do |boxing_conf|
    68           ['', 'MRB_UTF8_STRING'].each do |utf8_conf|
    69             next if (float_conf == 'MRB_USE_FLOAT') && (boxing_conf == 'MRB_NAN_BOXING')
    70             next if (int_conf == 'MRB_INT64') && (boxing_conf == 'MRB_NAN_BOXING')
    71             next if (int_conf == 'MRB_INT16') && (boxing_conf == 'MRB_WORD_BOXING')
    72             next if (int_conf == 'MRB_INT64') && (boxing_conf == 'MRB_WORD_BOXING') && mode_32
    73             env = [float_conf, int_conf, boxing_conf, utf8_conf].map do |conf|
    74               conf == '' ? nil : "-D#{conf}=1"
    75             end.compact.join(' ')
    76             bit = mode_32 ? '-m32 ' : ''
    77             _info = ''
    78             _info += mode_32 ? '32bit ' : '64bit '
    79             _info += float_conf['USE'] ? 'float ' : ''
    80             _info += int_conf['16'] ? 'int16 ' : ''
    81             _info += int_conf['64'] ? 'int64 ' : ''
    82             _info += boxing_conf['NAN'] ? 'nan ' : ''
    83             _info += boxing_conf['word'] ? 'word ' : ''
    84             _info += utf8_conf['UTF8'] ? 'utf8 ' : ''
    85             _info = _info.gsub(/ +/, ' ').strip.tr(' ', '_')
    86             configs << { '_info' => _info, 'CFLAGS' => "#{bit}#{env}", 'LDFLAGS' => bit.strip.to_s }
    87           end
     66      ['', 'MRB_NAN_BOXING', 'MRB_WORD_BOXING'].each do |boxing_conf|
     67        ['', 'MRB_UTF8_STRING'].each do |utf8_conf|
     68          next if (float_conf == 'MRB_USE_FLOAT') && (boxing_conf == 'MRB_NAN_BOXING')
     69          next if (int_conf == 'MRB_INT64') && (boxing_conf == 'MRB_NAN_BOXING')
     70          next if (int_conf == 'MRB_INT64') && (boxing_conf == 'MRB_WORD_BOXING') && mode_32
     71          env = [float_conf, int_conf, boxing_conf, utf8_conf].map do |conf|
     72            conf == '' ? nil : "-D#{conf}=1"
     73          end.compact.join(' ')
     74          bit = mode_32 ? '-m32 ' : ''
     75          _info = ''
     76          _info += mode_32 ? '32bit ' : '64bit '
     77          _info += float_conf['USE'] ? 'float ' : ''
     78          _info += int_conf['16'] ? 'int16 ' : ''
     79          _info += int_conf['64'] ? 'int64 ' : ''
     80          _info += boxing_conf['NAN'] ? 'nan ' : ''
     81          _info += boxing_conf['WORD'] ? 'word ' : ''
     82          _info += utf8_conf['UTF8'] ? 'utf8 ' : ''
     83          _info = _info.gsub(/ +/, ' ').strip.tr(' ', '_')
     84          configs << { '_info' => _info, 'CFLAGS' => "#{bit}#{env}", 'LDFLAGS' => bit.strip.to_s }
    8885        end
    8986      end
     
    111108        'image' => ci_docker_tag(compiler),
    112109        'variables' => hash,
    113         'script' => 'env; ./minirake --verbose all test'
     110        'script' => 'env; rake --verbose all test'
    114111      }
    115112    end
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/libmruby.rake

    r331 r439  
    11MRuby.each_target do
    2   file libfile("#{build_dir}/lib/libmruby") => libmruby.flatten do |t|
     2  file libmruby_static => libmruby_objs.flatten do |t|
    33    archiver.run t.name, t.prerequisites
    44  end
    55
    6   file "#{build_dir}/lib/libmruby.flags.mak" => [__FILE__, libfile("#{build_dir}/lib/libmruby")] do |t|
     6  file "#{build_dir}/lib/libmruby.flags.mak" => [__FILE__, libmruby_static] do |t|
     7    mkdir_p File.dirname t.name
    78    open(t.name, 'w') do |f|
    89      f.puts "MRUBY_CFLAGS = #{cc.all_flags}"
     
    1819      f.puts "MRUBY_LIBS = #{linker.option_library % 'mruby'} #{linker.library_flags(gem_libraries)}"
    1920
    20       f.puts "MRUBY_LIBMRUBY_PATH = #{libfile("#{build_dir}/lib/libmruby")}"
     21      f.puts "MRUBY_LIBMRUBY_PATH = #{libmruby_static}"
    2122    end
    2223  end
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/mrbgems.rake

    r331 r439  
    66
    77    # loader all gems
    8     self.libmruby << objfile("#{build_dir}/mrbgems/gem_init")
     8    self.libmruby_objs << objfile("#{build_dir}/mrbgems/gem_init")
    99    file objfile("#{build_dir}/mrbgems/gem_init") => ["#{build_dir}/mrbgems/gem_init.c", "#{build_dir}/LEGAL"]
    1010    file "#{build_dir}/mrbgems/gem_init.c" => [MRUBY_CONFIG, __FILE__] do |t|
    11       FileUtils.mkdir_p "#{build_dir}/mrbgems"
     11      mkdir_p "#{build_dir}/mrbgems"
    1212      open(t.name, 'w') do |f|
    1313        gem_func_gems = gems.select { |g| g.generate_functions }
     
    1919          s << "  GENERATED_TMP_mrb_#{g.funcname}_gem_init(mrb);\n"
    2020        end
    21         gem_final_calls = gem_func_gems.each_with_object('') do |g, s|
     21        gem_final_calls = gem_func_gems.reverse_each.with_object('') do |g, s|
    2222          s << "  GENERATED_TMP_mrb_#{g.funcname}_gem_final(mrb);\n"
    2323        end
     
    3535        f.puts %Q[]
    3636        f.write gem_func_decls
     37        unless gem_final_calls.empty?
    3738        f.puts %Q[]
    38         f.puts %Q[static void]
    39         f.puts %Q[mrb_final_mrbgems(mrb_state *mrb) {]
    40         f.write gem_final_calls
    41         f.puts %Q[}]
     39          f.puts %Q[static void]
     40          f.puts %Q[mrb_final_mrbgems(mrb_state *mrb) {]
     41          f.write gem_final_calls
     42          f.puts %Q[}]
     43        end
    4244        f.puts %Q[]
    4345        f.puts %Q[void]
     
    5254  # legal documents
    5355  file "#{build_dir}/LEGAL" => [MRUBY_CONFIG, __FILE__] do |t|
     56    mkdir_p File.dirname t.name
    5457    open(t.name, 'w+') do |f|
    5558     f.puts <<LEGAL
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/android.rake

    r331 r439  
    88    /usr/local/opt/android-sdk/ndk-bundle
    99    /usr/local/opt/android-ndk
     10    ~/Android/Sdk/ndk-bundle
    1011    %LOCALAPPDATA%/Android/android-sdk/ndk-bundle
    1112    %LOCALAPPDATA%/Android/android-ndk
     13    %LOCALAPPDATA%/Android/Sdk/ndk/*
    1214    ~/Library/Android/sdk/ndk-bundle
    1315    ~/Library/Android/ndk
     
    3739Set ANDROID_PLATFORM environment variable or set :platform parameter
    3840        EOM
     41    end
     42  end
     43
     44  class SysrootNotReady < StandardError
     45    def message
     46      <<-EOM
     47Couldn't find standard header files
     48Please Move/Copy important file inside
     49  <NDK_HOME>/sysroot/usr/include/
     50to
     51  <NDK_HOME>/platforms/<ANDROID_VERSION>/<ARCH>/usr/include/
     52Higher NDK version will be use.
     53      EOM
    3954    end
    4055  end
     
    6782
    6883  def home_path
    69     @home_path ||= Pathname(
     84    @home_path ||= Pathname.new(
    7085      params[:ndk_home] ||
    7186      ENV['ANDROID_NDK_HOME'] ||
     
    7489        path.gsub! '\\', '/'
    7590        path.gsub! '~', Dir.home || '~'
     91        path.gsub!('*') do
     92          next nil unless path[-1] == "*"
     93          dirs = Dir.glob(path).collect do |d|
     94            m = d.match(/(\d+)\.(\d+)\.(\d+)$/)
     95            m ? [m[1], m[2], m[3]].collect { |v| v.to_i } : nil
     96          end
     97          dirs.compact!
     98          dirs.sort! do |before, after|
     99            f = 0
     100            if (f = (after.first <=> before.first)) != 0
     101              next f
     102            elsif (f = (after[1] <=> before[1])) != 0
     103              next f
     104            else
     105              next after.last <=> before.last
     106            end
     107          end
     108          dirs.empty? ? nil.to_s : dirs.first.join(".")
     109        end
    76110        File.directory?(path)
    77111      } || raise(AndroidNDKHomeNotFound)
     
    124158        Dir.glob(path.to_s){ |item|
    125159          next if File.file?(item)
    126           path = Pathname(item)
     160          path = Pathname.new(item)
    127161          break
    128162        }
     
    146180
    147181  def sysroot
    148     @sysroot ||= home_path.join('platforms', platform,
     182    return @sysroot if @sysroot
     183    sysroot_path = home_path.join('platforms', platform,
    149184        case arch
    150185        when /armeabi/    then 'arch-arm'
     
    156191        end
    157192      ).to_s
     193    if Dir.exist?(File.join(sysroot_path, "usr", "include"))
     194      return @sysroot = sysroot_path
     195    else
     196      raise(SysrootNotReady)
     197    end
    158198  end
    159199
     
    259299    flags = []
    260300
     301    case RUBY_PLATFORM
     302    when /mswin|mingw|win32/
     303      # Build for Android dont need window flag
     304      flags += %W(-U_WIN32 -U_WIN64)
     305    end
     306
    261307    flags += %W(-MMD -MP -D__android__ -DANDROID --sysroot="#{sysroot}")
    262308    flags += ctarget
     
    264310    when :gcc
    265311    when :clang
    266       flags += %W(-gcc-toolchain "#{gcc_toolchain_path.to_s}" -Wno-invalid-command-line-argument -Wno-unused-command-line-argument)
     312      flags += %W(-gcc-toolchain "#{gcc_toolchain_path}" -Wno-invalid-command-line-argument -Wno-unused-command-line-argument)
    267313    end
    268314    flags += %W(-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes)
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/clang.rake

    r331 r439  
    11MRuby::Toolchain.new(:clang) do |conf, _params|
    2   toolchain :gcc
     2  toolchain :gcc, default_command: 'clang'
    33
    44  [conf.cc, conf.objc, conf.asm].each do |cc|
    5     cc.command = ENV['CC'] || 'clang'
     5    cc.flags << '-Wzero-length-array' unless ENV['CFLAGS']
    66  end
    7   conf.cxx.command = ENV['CXX'] || 'clang++'
    8   conf.linker.command = ENV['LD'] || 'clang'
     7  conf.cxx.flags << '-Wzero-length-array' unless ENV['CXXFLAGS'] || ENV['CFLAGS']
    98end
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/emscripten.rake

    r321 r439  
    1 MRuby::Toolchain.new(:emscripten) do |conf|
    2   toolchain :gcc
     1MRuby::Toolchain.new(:emscripten) do |conf, _params|
     2  toolchain :gcc, default_command: 'emcc'
    33
    4   conf.cc do |cc|
    5     cc.command = "emcc"
    6     cc.flags.push(%w(-Wall -Werror-implicit-function-declaration -O0))
    7     cc.flags[0].delete_at(cc.flags[0].rindex("-Og"))
     4  [conf.cc, conf.objc, conf.asm].each do |cc|
     5    i = cc.flags[1][0].rindex("-Og")
     6    cc.flags[1][0][i] = "-O3" if i
    87  end
    98
    10   conf.cxx do |cxx|
    11     cxx.command = "emcc"
    12     cxx.flags.push(%w(-Wall -Werror-implicit-function-declaration -O0))
    13     cxx.flags[0].delete_at(cxx.flags[0].rindex("-Og"))
    14   end
    15 
    16   conf.linker.command = "emcc"
    179  conf.archiver.command = "emar"
    1810  conf.exts.executable = '.js'
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/gcc.rake

    r331 r439  
    1 MRuby::Toolchain.new(:gcc) do |conf, _params|
    2   [conf.cc, conf.objc, conf.asm].each do |cc|
    3     cc.command = ENV['CC'] || 'gcc'
    4     cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -Og -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings)]
    5     cc.defines = %w(DISABLE_GEMS)
    6     cc.option_include_path = '-I%s'
    7     cc.option_define = '-D%s'
    8     cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
    9     cc.cxx_compile_flag = '-x c++ -std=c++03'
    10     cc.cxx_exception_flag = '-fexceptions'
    11   end
     1MRuby::Toolchain.new(:gcc) do |conf, params|
     2  default_command = params[:default_command] || 'gcc'
     3  compiler_flags = %w(-g3 -Og -Wall -Wundef)
     4  c_mandatory_flags = %w(-std=gnu99)
     5  cxx_invalid_flags = %w(-Wdeclaration-after-statement -Werror-implicit-function-declaration)
    126
    13   [conf.cxx].each do |cxx|
    14     cxx.command = ENV['CXX'] || 'g++'
    15     cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(-g -Og -Wall -Werror-implicit-function-declaration)]
    16     cxx.defines = %w(DISABLE_GEMS)
    17     cxx.option_include_path = '-I%s'
    18     cxx.option_define = '-D%s'
    19     cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
    20     cxx.cxx_compile_flag = '-x c++ -std=c++03'
    21     cxx.cxx_exception_flag = '-fexceptions'
     7  [conf.cc, conf.objc, conf.asm, conf.cxx].each do |compiler|
     8    if compiler == conf.cxx
     9      compiler.command = ENV['CXX'] || default_command.sub(/cc|$/, '++')
     10      compiler.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || compiler_flags]
     11    else
     12      compiler.command = ENV['CC'] || default_command
     13      compiler.flags = [c_mandatory_flags, ENV['CFLAGS'] || [compiler_flags, cxx_invalid_flags, %w(-Wwrite-strings)]]
     14    end
     15    compiler.option_include_path = %q[-I"%s"]
     16    compiler.option_define = '-D%s'
     17    compiler.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"]
     18    compiler.cxx_compile_flag = '-x c++ -std=gnu++03'
     19    compiler.cxx_exception_flag = '-fexceptions'
     20    compiler.cxx_invalid_flags = c_mandatory_flags + cxx_invalid_flags
    2221  end
    2322
    2423  conf.linker do |linker|
    25     linker.command = ENV['LD'] || 'gcc'
     24    linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || default_command
    2625    linker.flags = [ENV['LDFLAGS'] || %w()]
    2726    linker.libraries = %w(m)
     
    2928    linker.option_library = '-l%s'
    3029    linker.option_library_path = '-L%s'
    31     linker.link_options = '%{flags} -o %{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}'
     30    linker.link_options = '%{flags} -o "%{outfile}" %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}'
    3231  end
    3332
     
    5655    end
    5756  end
     57
     58  def conf.enable_sanitizer(*opts)
     59    fail 'sanitizer already set' if @sanitizer_list
     60
     61    @sanitizer_list = opts
     62    flg = "-fsanitize=#{opts.join ','}"
     63    [self.cc, self.cxx, self.linker].each{|cmd| cmd.flags << flg }
     64  end
    5865end
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/openwrt.rake

    r331 r439  
    66    cc.flags = ENV['TARGET_CFLAGS']
    77    cc.include_paths = ["#{MRUBY_ROOT}/include"]
    8     cc.defines = %w(DISABLE_GEMS)
    9     cc.option_include_path = '-I%s'
     8    cc.option_include_path = %q[-I"%s"]
    109    cc.option_define = '-D%s'
    11     cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
     10    cc.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"]
    1211  end
    1312
     
    1615    cxx.flags = ENV['TARGET_CXXFLAGS']
    1716    cxx.include_paths = ["#{MRUBY_ROOT}/include"]
    18     cxx.defines = %w(DISABLE_GEMS)
    19     cxx.option_include_path = '-I%s'
     17    cxx.option_include_path = %q[-I"%s"]
    2018    cxx.option_define = '-D%s'
    21     cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
     19    cxx.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"]
    2220   end
    2321
     
    2927    linker.option_library = '-l%s'
    3028    linker.option_library_path = '-L%s'
    31     linker.link_options = '%{flags} -o %{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}'
     29    linker.link_options = '%{flags} -o "%{outfile}" %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}'
    3230  end
    3331
    3432  conf.archiver do |archiver|
    3533    archiver.command = ENV['TARGET_AR']
    36     archiver.archive_options = 'rs %{outfile} %{objs}'
     34    archiver.archive_options = 'rs "%{outfile}" %{objs}'
    3735  end
    3836end
  • EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/visualcpp.rake

    r331 r439  
    11MRuby::Toolchain.new(:visualcpp) do |conf, _params|
     2  conf.file_separator = '\\'
     3
    24  conf.cc do |cc|
    35    cc.command = ENV['CC'] || 'cl.exe'
    4     # C4013: implicit function declaration
    5     cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /we4013 /Zi /MD /O2 /utf-8 /D_CRT_SECURE_NO_WARNINGS)]
    6     cc.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING)
    7     cc.option_include_path = '/I%s'
     6    cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /utf-8 /W4 /GS /analyze- /Zc:wchar_t /Zi /O2 /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /MD /EHsc /DWIN32 /DNDEBUG /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS)]
     7    cc.flags << %w(/we4002 /we4003 /we4005 /we4007 /we4010 /we4013 /we4015 /we4020 /we4022 /we4024 /we4028 /we4029 /we4031 /we4033 /we4034 /we4042 /we4047 /we4048 /we4049 /we4056 /we4067 /we4074 /we4079 /we4083 /we4088 /we4089 /we4090 /we4091 /we4094 /we4096 /we4098 /we4099 /we4113 /we4133 /we4715 /we4716)
     8    cc.flags << %w(/wd4214 /wd4100 /wd4996)
     9    cc.flags << ["/Fd\"#{conf.build_dir.gsub('/', conf.file_separator)}\\vc142.pdb\""]
     10    cc.flags << ["/Fp\"%{outdir}\\%{outfilebase}.pch\""]
     11    cc.defines = %w(MRB_STACK_EXTEND_DOUBLING)
     12    cc.option_include_path = %q[/I"%s"]
    813    cc.option_define = '/D%s'
    9     cc.compile_options = "%{flags} /Fo%{outfile} %{infile}"
     14    cc.compile_options = %Q[%{flags} /Fo"%{outfile}" "%{infile}"]
    1015    cc.cxx_compile_flag = '/TP'
    1116    cc.cxx_exception_flag = '/EHs'
     
    1419  conf.cxx do |cxx|
    1520    cxx.command = ENV['CXX'] || 'cl.exe'
    16     cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /W3 /Zi /MD /O2 /EHs /utf-8 /D_CRT_SECURE_NO_WARNINGS)]
    17     cxx.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING)
    18     cxx.option_include_path = '/I%s'
     21    cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /utf-8 /W4 /GS /analyze- /Zc:wchar_t /Zi /O2 /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /MD /EHsc /DWIN32 /DNDEBUG /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS)]
     22    cxx.flags << %w(/we4002 /we4003 /we4005 /we4007 /we4010 /we4013 /we4015 /we4020 /we4022 /we4024 /we4028 /we4029 /we4031 /we4033 /we4034 /we4042 /we4047 /we4048 /we4049 /we4056 /we4067 /we4074 /we4079 /we4083 /we4088 /we4089 /we4090 /we4091 /we4094 /we4096 /we4098 /we4099 /we4113 /we4133 /we4715 /we4716)
     23    cxx.flags << %w(/wd4214 /wd4100 /wd4996)
     24    cxx.flags << ["/Fd\"#{conf.build_dir.gsub('/', conf.file_separator)}\\vc142.pdb\""]
     25    cxx.flags << ["/Fp\"%{outdir}\\%{outfilebase}.pch\""]
     26    cxx.defines = %w(MRB_STACK_EXTEND_DOUBLING)
     27    cxx.option_include_path = %q[/I"%s"]
    1928    cxx.option_define = '/D%s'
    20     cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}"
     29    cxx.compile_options = %Q[%{flags} /Fo"%{outfile}" "%{infile}"]
    2130    cxx.cxx_compile_flag = '/TP'
    2231    cxx.cxx_exception_flag = '/EHs'
     
    2534  conf.linker do |linker|
    2635    linker.command = ENV['LD'] || 'link.exe'
    27     linker.flags = [ENV['LDFLAGS'] || %w(/MANIFEST /NXCOMPAT /DYNAMICBASE /MACHINE:X86 /INCREMENTAL /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1)]
    28     linker.flags << "/PDB:\"#{conf.build_dir}\\vc140.pdb\""
    29     #linker.flags << "/PGD:\"%{outdir}\\%{outfilebase}.pgd\""
    30     linker.flags << "/ManifestFile:\"%{outdir}\\%{outfilebase}.exe.intermediate.manifest\""
     36    linker.flags = [ENV['LDFLAGS'] || %w(/MANIFEST /NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1)]
     37    #linker.flags = [ENV['LDFLAGS'] || %w(/MANIFEST /LTCG:incremental /NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1)]
     38    #linker.flags << ["/PGD:\"%{outdir}\\%{outfilebase}.pgd\""]
     39    linker.flags << ["/PDB:\"#{conf.build_dir.gsub('/', conf.file_separator)}\\vc142.pdb\""]
     40    linker.flags << ["/ManifestFile:\"%{outdir}\\%{outfilebase}.exe.intermediate.manifest\""]
    3141    linker.libraries = %w()
    3242    linker.library_paths = %w()
    3343    linker.option_library = '%s.lib'
    3444    linker.option_library_path = '/LIBPATH:%s'
    35     linker.link_options = "%{flags} /OUT:%{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}"
     45    linker.link_options = %Q[%{flags} /OUT:"%{outfile}" %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}]
    3646  end
    3747
    3848  conf.archiver do |archiver|
    3949    archiver.command = ENV['AR'] || 'lib.exe'
    40     archiver.archive_options = '/nologo /OUT:%{outfile} %{objs}'
     50    archiver.archive_options = '/nologo /OUT:"%{outfile}" %{objs}'
    4151  end
    4252
    4353  conf.yacc do |yacc|
    4454    yacc.command = ENV['YACC'] || 'bison.exe'
    45     yacc.compile_options = '-o %{outfile} %{infile}'
     55    yacc.compile_options = %q[-o "%{outfile}" "%{infile}"]
    4656  end
    4757
    4858  conf.gperf do |gperf|
    4959    gperf.command = 'gperf.exe'
    50     gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
     60    gperf.compile_options = %q[-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" "%{infile}" > "%{outfile}"]
    5161  end
    5262
     
    5767  end
    5868
    59   conf.file_separator = '\\'
    60 
    61   if require 'open3'
    62     Open3.popen3 conf.cc.command do |_, _, e, _|
    63       if /Version (\d{2})\.\d{2}\.\d{5}/ =~ e.gets && $1.to_i <= 17
    64         m = "# VS2010/2012 support will be dropped after the next release! #"
    65         h = "#" * m.length
    66         puts h, m, h
    67       end
    68     end
    69   end
    70 
    7169end
Note: See TracChangeset for help on using the changeset viewer.