Changeset 439 for EcnlProtoTool/trunk/mruby-2.1.1/tasks
- Timestamp:
- Jul 9, 2020, 8:51:43 AM (4 years ago)
- 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 64 64 [true, false].each do |mode_32| 65 65 ['', '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 } 88 85 end 89 86 end … … 111 108 'image' => ci_docker_tag(compiler), 112 109 'variables' => hash, 113 'script' => 'env; ./minirake --verbose all test'110 'script' => 'env; rake --verbose all test' 114 111 } 115 112 end -
EcnlProtoTool/trunk/mruby-2.1.1/tasks/libmruby.rake
r331 r439 1 1 MRuby.each_target do 2 file lib file("#{build_dir}/lib/libmruby") => libmruby.flatten do |t|2 file libmruby_static => libmruby_objs.flatten do |t| 3 3 archiver.run t.name, t.prerequisites 4 4 end 5 5 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 7 8 open(t.name, 'w') do |f| 8 9 f.puts "MRUBY_CFLAGS = #{cc.all_flags}" … … 18 19 f.puts "MRUBY_LIBS = #{linker.option_library % 'mruby'} #{linker.library_flags(gem_libraries)}" 19 20 20 f.puts "MRUBY_LIBMRUBY_PATH = #{lib file("#{build_dir}/lib/libmruby")}"21 f.puts "MRUBY_LIBMRUBY_PATH = #{libmruby_static}" 21 22 end 22 23 end -
EcnlProtoTool/trunk/mruby-2.1.1/tasks/mrbgems.rake
r331 r439 6 6 7 7 # loader all gems 8 self.libmruby << objfile("#{build_dir}/mrbgems/gem_init")8 self.libmruby_objs << objfile("#{build_dir}/mrbgems/gem_init") 9 9 file objfile("#{build_dir}/mrbgems/gem_init") => ["#{build_dir}/mrbgems/gem_init.c", "#{build_dir}/LEGAL"] 10 10 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" 12 12 open(t.name, 'w') do |f| 13 13 gem_func_gems = gems.select { |g| g.generate_functions } … … 19 19 s << " GENERATED_TMP_mrb_#{g.funcname}_gem_init(mrb);\n" 20 20 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| 22 22 s << " GENERATED_TMP_mrb_#{g.funcname}_gem_final(mrb);\n" 23 23 end … … 35 35 f.puts %Q[] 36 36 f.write gem_func_decls 37 unless gem_final_calls.empty? 37 38 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 42 44 f.puts %Q[] 43 45 f.puts %Q[void] … … 52 54 # legal documents 53 55 file "#{build_dir}/LEGAL" => [MRUBY_CONFIG, __FILE__] do |t| 56 mkdir_p File.dirname t.name 54 57 open(t.name, 'w+') do |f| 55 58 f.puts <<LEGAL -
EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/android.rake
r331 r439 8 8 /usr/local/opt/android-sdk/ndk-bundle 9 9 /usr/local/opt/android-ndk 10 ~/Android/Sdk/ndk-bundle 10 11 %LOCALAPPDATA%/Android/android-sdk/ndk-bundle 11 12 %LOCALAPPDATA%/Android/android-ndk 13 %LOCALAPPDATA%/Android/Sdk/ndk/* 12 14 ~/Library/Android/sdk/ndk-bundle 13 15 ~/Library/Android/ndk … … 37 39 Set ANDROID_PLATFORM environment variable or set :platform parameter 38 40 EOM 41 end 42 end 43 44 class SysrootNotReady < StandardError 45 def message 46 <<-EOM 47 Couldn't find standard header files 48 Please Move/Copy important file inside 49 <NDK_HOME>/sysroot/usr/include/ 50 to 51 <NDK_HOME>/platforms/<ANDROID_VERSION>/<ARCH>/usr/include/ 52 Higher NDK version will be use. 53 EOM 39 54 end 40 55 end … … 67 82 68 83 def home_path 69 @home_path ||= Pathname (84 @home_path ||= Pathname.new( 70 85 params[:ndk_home] || 71 86 ENV['ANDROID_NDK_HOME'] || … … 74 89 path.gsub! '\\', '/' 75 90 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 76 110 File.directory?(path) 77 111 } || raise(AndroidNDKHomeNotFound) … … 124 158 Dir.glob(path.to_s){ |item| 125 159 next if File.file?(item) 126 path = Pathname (item)160 path = Pathname.new(item) 127 161 break 128 162 } … … 146 180 147 181 def sysroot 148 @sysroot ||= home_path.join('platforms', platform, 182 return @sysroot if @sysroot 183 sysroot_path = home_path.join('platforms', platform, 149 184 case arch 150 185 when /armeabi/ then 'arch-arm' … … 156 191 end 157 192 ).to_s 193 if Dir.exist?(File.join(sysroot_path, "usr", "include")) 194 return @sysroot = sysroot_path 195 else 196 raise(SysrootNotReady) 197 end 158 198 end 159 199 … … 259 299 flags = [] 260 300 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 261 307 flags += %W(-MMD -MP -D__android__ -DANDROID --sysroot="#{sysroot}") 262 308 flags += ctarget … … 264 310 when :gcc 265 311 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) 267 313 end 268 314 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 1 1 MRuby::Toolchain.new(:clang) do |conf, _params| 2 toolchain :gcc 2 toolchain :gcc, default_command: 'clang' 3 3 4 4 [conf.cc, conf.objc, conf.asm].each do |cc| 5 cc. command = ENV['CC'] || 'clang'5 cc.flags << '-Wzero-length-array' unless ENV['CFLAGS'] 6 6 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'] 9 8 end -
EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/emscripten.rake
r321 r439 1 MRuby::Toolchain.new(:emscripten) do |conf |2 toolchain :gcc 1 MRuby::Toolchain.new(:emscripten) do |conf, _params| 2 toolchain :gcc, default_command: 'emcc' 3 3 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 8 7 end 9 8 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 end15 16 conf.linker.command = "emcc"17 9 conf.archiver.command = "emar" 18 10 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 1 MRuby::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) 12 6 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 22 21 end 23 22 24 23 conf.linker do |linker| 25 linker.command = ENV['LD'] || 'gcc'24 linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || default_command 26 25 linker.flags = [ENV['LDFLAGS'] || %w()] 27 26 linker.libraries = %w(m) … … 29 28 linker.option_library = '-l%s' 30 29 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}' 32 31 end 33 32 … … 56 55 end 57 56 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 58 65 end -
EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/openwrt.rake
r331 r439 6 6 cc.flags = ENV['TARGET_CFLAGS'] 7 7 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"] 10 9 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}"] 12 11 end 13 12 … … 16 15 cxx.flags = ENV['TARGET_CXXFLAGS'] 17 16 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"] 20 18 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}"] 22 20 end 23 21 … … 29 27 linker.option_library = '-l%s' 30 28 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}' 32 30 end 33 31 34 32 conf.archiver do |archiver| 35 33 archiver.command = ENV['TARGET_AR'] 36 archiver.archive_options = 'rs %{outfile}%{objs}'34 archiver.archive_options = 'rs "%{outfile}" %{objs}' 37 35 end 38 36 end -
EcnlProtoTool/trunk/mruby-2.1.1/tasks/toolchains/visualcpp.rake
r331 r439 1 1 MRuby::Toolchain.new(:visualcpp) do |conf, _params| 2 conf.file_separator = '\\' 3 2 4 conf.cc do |cc| 3 5 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"] 8 13 cc.option_define = '/D%s' 9 cc.compile_options = "%{flags} /Fo%{outfile} %{infile}"14 cc.compile_options = %Q[%{flags} /Fo"%{outfile}" "%{infile}"] 10 15 cc.cxx_compile_flag = '/TP' 11 16 cc.cxx_exception_flag = '/EHs' … … 14 19 conf.cxx do |cxx| 15 20 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"] 19 28 cxx.option_define = '/D%s' 20 cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}"29 cxx.compile_options = %Q[%{flags} /Fo"%{outfile}" "%{infile}"] 21 30 cxx.cxx_compile_flag = '/TP' 22 31 cxx.cxx_exception_flag = '/EHs' … … 25 34 conf.linker do |linker| 26 35 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\""] 31 41 linker.libraries = %w() 32 42 linker.library_paths = %w() 33 43 linker.option_library = '%s.lib' 34 44 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}] 36 46 end 37 47 38 48 conf.archiver do |archiver| 39 49 archiver.command = ENV['AR'] || 'lib.exe' 40 archiver.archive_options = '/nologo /OUT: %{outfile}%{objs}'50 archiver.archive_options = '/nologo /OUT:"%{outfile}" %{objs}' 41 51 end 42 52 43 53 conf.yacc do |yacc| 44 54 yacc.command = ENV['YACC'] || 'bison.exe' 45 yacc.compile_options = '-o %{outfile} %{infile}'55 yacc.compile_options = %q[-o "%{outfile}" "%{infile}"] 46 56 end 47 57 48 58 conf.gperf do |gperf| 49 59 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}"] 51 61 end 52 62 … … 57 67 end 58 68 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 <= 1764 m = "# VS2010/2012 support will be dropped after the next release! #"65 h = "#" * m.length66 puts h, m, h67 end68 end69 end70 71 69 end
Note:
See TracChangeset
for help on using the changeset viewer.