summaryrefslogtreecommitdiffhomepage
path: root/build_config.rb
diff options
context:
space:
mode:
authorTakashi Sawanaka <[email protected]>2016-07-23 11:57:36 +0900
committerTakashi Sawanaka <[email protected]>2016-07-23 11:57:36 +0900
commitfb1c4b3ba79a489327682a49622a193c237c1836 (patch)
tree92071783f5028e769c900e71d22ce98f41553247 /build_config.rb
parent2eefbfed9d9162f7fe84fbdf51aae89f4958e02e (diff)
downloadmruby-fb1c4b3ba79a489327682a49622a193c237c1836.tar.gz
mruby-fb1c4b3ba79a489327682a49622a193c237c1836.zip
Fix broken msvc build
Diffstat (limited to 'build_config.rb')
-rw-r--r--build_config.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/build_config.rb b/build_config.rb
index c565d390f..bc9e69e42 100644
--- a/build_config.rb
+++ b/build_config.rb
@@ -123,9 +123,13 @@ MRuby::Build.new('test') do |conf|
end
MRuby::Build.new('bench') do |conf|
- toolchain :gcc
-
- conf.cc.flags << '-O3'
+ # Gets set by the VS command prompts.
+ if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
+ toolchain :visualcpp
+ else
+ toolchain :gcc
+ conf.cc.flags << '-O3'
+ end
conf.gembox 'default'
end