diff options
| author | Robert Rowe <[email protected]> | 2013-07-08 21:16:16 -0700 |
|---|---|---|
| committer | Robert Rowe <[email protected]> | 2013-07-08 21:16:16 -0700 |
| commit | e47e8a25120be53fd55d808210344aaea32c0a25 (patch) | |
| tree | fc95651ffe2957add7d92655a7656ccf2004222b | |
| parent | f774e3f9290058e8577e988096dfa0549d13bbeb (diff) | |
| download | mruby-e47e8a25120be53fd55d808210344aaea32c0a25.tar.gz mruby-e47e8a25120be53fd55d808210344aaea32c0a25.zip | |
Fix the androideabi toolchain not matching host
The included method of determining the host platform in the androideabi
would not match to windows if RUBY_PLATFORM returned mingw, wince, or
emx. As an added pre-caution, using a case statement with regexp
matching will better determine the host platform since it won't be case
sensitive and for windows is set to match more specifially than just
"win".
| -rw-r--r-- | tasks/toolchains/androideabi.rake | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tasks/toolchains/androideabi.rake b/tasks/toolchains/androideabi.rake index a69fd1a9d..51897667e 100644 --- a/tasks/toolchains/androideabi.rake +++ b/tasks/toolchains/androideabi.rake @@ -41,20 +41,21 @@ MRuby::Toolchain.new(:androideabi) do |conf| end if ANDROID_STANDALONE_TOOLCHAIN == nil then - if RUBY_PLATFORM.include?('darwin') then + case RUBY_PLATFORM + when /cygwin|mswin|mingw|bccwin|wince|emx/i + HOST_PLATFORM = 'windows' + when /darwin/i HOST_PLATFORM = 'darwin-x86' - elsif RUBY_PLATFORM.include?('linux') then + when /linux/i HOST_PLATFORM = 'linux-x86' - elsif RUBY_PLATFORM.include?('win') then - HOST_PLATFORM = 'windows' else - # Unknown host platform. + # Unknown host platform end ANDROID_TARGET_PLATFORM = ENV['ANDROID_TARGET_PLATFORM'] || DEFAULT_ANDROID_TARGET_PLATFORM path_to_toolchain = ANDROID_NDK_HOME + '/toolchains/' - path_to_sysroot = ANDROID_NDK_HOME + '/platforms/' + ANDROID_TARGET_PLATFORM + path_to_sysroot = ANDROID_NDK_HOME + '/platforms/' + ANDROID_TARGET_PLATFORM if ANDROID_TOOLCHAIN.downcase == 'gcc' then case ANDROID_TARGET_ARCH.downcase when 'arch-arm', 'arm' then |
