diff options
Diffstat (limited to 'tasks/toolchains')
| -rw-r--r-- | tasks/toolchains/android.rake | 1 | ||||
| -rw-r--r-- | tasks/toolchains/clang.rake | 4 | ||||
| -rw-r--r-- | tasks/toolchains/gcc.rake | 10 | ||||
| -rw-r--r-- | tasks/toolchains/openwrt.rake | 2 | ||||
| -rw-r--r-- | tasks/toolchains/visualcpp.rake | 4 |
5 files changed, 10 insertions, 11 deletions
diff --git a/tasks/toolchains/android.rake b/tasks/toolchains/android.rake index c59da7fcb..c7df9ef80 100644 --- a/tasks/toolchains/android.rake +++ b/tasks/toolchains/android.rake @@ -7,6 +7,7 @@ class MRuby::Toolchain::Android DEFAULT_NDK_HOMES = %w{ /usr/local/opt/android-sdk/ndk-bundle /usr/local/opt/android-ndk + ~/Android/Sdk/ndk-bundle %LOCALAPPDATA%/Android/android-sdk/ndk-bundle %LOCALAPPDATA%/Android/android-ndk ~/Library/Android/sdk/ndk-bundle diff --git a/tasks/toolchains/clang.rake b/tasks/toolchains/clang.rake index c75fa030c..7d0fe6a45 100644 --- a/tasks/toolchains/clang.rake +++ b/tasks/toolchains/clang.rake @@ -3,7 +3,9 @@ MRuby::Toolchain.new(:clang) do |conf, _params| [conf.cc, conf.objc, conf.asm].each do |cc| cc.command = ENV['CC'] || 'clang' + cc.flags << '-Wzero-length-array' unless ENV['CFLAGS'] end conf.cxx.command = ENV['CXX'] || 'clang++' - conf.linker.command = ENV['LD'] || 'clang' + conf.cxx.flags << '-Wzero-length-array' unless ENV['CXXFLAGS'] || ENV['CFLAGS'] + conf.linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || 'clang' end diff --git a/tasks/toolchains/gcc.rake b/tasks/toolchains/gcc.rake index fc2e0bff3..663fef9e6 100644 --- a/tasks/toolchains/gcc.rake +++ b/tasks/toolchains/gcc.rake @@ -1,8 +1,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| [conf.cc, conf.objc, conf.asm].each do |cc| cc.command = ENV['CC'] || 'gcc' - cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings)] - cc.defines = %w(DISABLE_GEMS) + cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings -Wundef)] cc.option_include_path = '-I%s' cc.option_define = '-D%s' cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' @@ -12,8 +11,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| [conf.cxx].each do |cxx| cxx.command = ENV['CXX'] || 'g++' - cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration)] - cxx.defines = %w(DISABLE_GEMS) + cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration -Wundef)] cxx.option_include_path = '-I%s' cxx.option_define = '-D%s' cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' @@ -22,7 +20,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| end conf.linker do |linker| - linker.command = ENV['LD'] || 'gcc' + linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || 'gcc' linker.flags = [ENV['LDFLAGS'] || %w()] linker.libraries = %w(m) linker.library_paths = [] @@ -55,7 +53,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| @header_search_paths end end - + def conf.enable_sanitizer(*opts) fail 'sanitizer already set' if @sanitizer_list diff --git a/tasks/toolchains/openwrt.rake b/tasks/toolchains/openwrt.rake index 1637f6d91..aeb6dbcbc 100644 --- a/tasks/toolchains/openwrt.rake +++ b/tasks/toolchains/openwrt.rake @@ -5,7 +5,6 @@ MRuby::Toolchain.new(:openwrt) do |conf| cc.command = ENV['TARGET_CC'] cc.flags = ENV['TARGET_CFLAGS'] cc.include_paths = ["#{MRUBY_ROOT}/include"] - cc.defines = %w(DISABLE_GEMS) cc.option_include_path = '-I%s' cc.option_define = '-D%s' cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' @@ -15,7 +14,6 @@ MRuby::Toolchain.new(:openwrt) do |conf| cxx.command = ENV['TARGET_CXX'] cxx.flags = ENV['TARGET_CXXFLAGS'] cxx.include_paths = ["#{MRUBY_ROOT}/include"] - cxx.defines = %w(DISABLE_GEMS) cxx.option_include_path = '-I%s' cxx.option_define = '-D%s' cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' diff --git a/tasks/toolchains/visualcpp.rake b/tasks/toolchains/visualcpp.rake index b008273a2..6275059bb 100644 --- a/tasks/toolchains/visualcpp.rake +++ b/tasks/toolchains/visualcpp.rake @@ -3,7 +3,7 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| cc.command = ENV['CC'] || 'cl.exe' # C4013: implicit function declaration cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /we4013 /Zi /MD /O2 /D_CRT_SECURE_NO_WARNINGS)] - cc.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING) + cc.defines = %w(MRB_STACK_EXTEND_DOUBLING) cc.option_include_path = '/I%s' cc.option_define = '/D%s' cc.compile_options = "%{flags} /Fo%{outfile} %{infile}" @@ -14,7 +14,7 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| conf.cxx do |cxx| cxx.command = ENV['CXX'] || 'cl.exe' cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /W3 /Zi /MD /O2 /EHs /D_CRT_SECURE_NO_WARNINGS)] - cxx.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING) + cxx.defines = %w(MRB_STACK_EXTEND_DOUBLING) cxx.option_include_path = '/I%s' cxx.option_define = '/D%s' cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}" |
