summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-07-26 00:13:53 +0900
committerGitHub <[email protected]>2016-07-26 00:13:53 +0900
commit32ad74f4d129b1c24cc0192014a151511f9a7273 (patch)
tree300714d2b856997ca5a032dc25277815e09bddef
parente635dc2a47c731fcb25462f1cb058c5bbcb63c49 (diff)
parentfb1c4b3ba79a489327682a49622a193c237c1836 (diff)
downloadmruby-32ad74f4d129b1c24cc0192014a151511f9a7273.tar.gz
mruby-32ad74f4d129b1c24cc0192014a151511f9a7273.zip
Merge pull request #3182 from sdottaka/fix-broken-msvc-build
Fix broken msvc build
-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