source: EcnlProtoTool/trunk/mruby-1.3.0/tasks/toolchains/visualcpp.rake@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-ruby;charset=UTF-8
File size: 2.6 KB
Line 
1MRuby::Toolchain.new(:visualcpp) do |conf, _params|
2 conf.cc do |cc|
3 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'
8 cc.option_define = '/D%s'
9 cc.compile_options = "%{flags} /Fo%{outfile} %{infile}"
10 cc.cxx_compile_flag = '/TP'
11 cc.cxx_exception_flag = '/EHs'
12 end
13
14 conf.cxx do |cxx|
15 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'
19 cxx.option_define = '/D%s'
20 cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}"
21 cxx.cxx_compile_flag = '/TP'
22 cxx.cxx_exception_flag = '/EHs'
23 end
24
25 conf.linker do |linker|
26 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\""
31 linker.libraries = %w()
32 linker.library_paths = %w()
33 linker.option_library = '%s.lib'
34 linker.option_library_path = '/LIBPATH:%s'
35 linker.link_options = "%{flags} /OUT:%{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}"
36 end
37
38 conf.archiver do |archiver|
39 archiver.command = ENV['AR'] || 'lib.exe'
40 archiver.archive_options = '/nologo /OUT:%{outfile} %{objs}'
41 end
42
43 conf.yacc do |yacc|
44 yacc.command = ENV['YACC'] || 'bison.exe'
45 yacc.compile_options = '-o %{outfile} %{infile}'
46 end
47
48 conf.gperf do |gperf|
49 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}'
51 end
52
53 conf.exts do |exts|
54 exts.object = '.obj'
55 exts.executable = '.exe'
56 exts.library = '.lib'
57 end
58
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
71end
Note: See TracBrowser for help on using the repository browser.