Commit Graph

355 Commits

Author SHA1 Message Date
KOBAYASHI Shuji 79a7f18150 Avoid potential zero size array declaration; fix #4382 2019-04-16 19:56:11 +09:00
KOBAYASHI Shuji e2bb5ce079 Refer also CXX and CC env vars as linker command in gcc and clang toolchain
ref #4292
2019-03-06 20:42:31 +09:00
KOBAYASHI Shuji 31f1b4a553 Remove explicit set of DISABLE_GEMS
`DISABLE_GEMS` is automatically set (or unset); ref #790
2019-02-23 18:29:37 +09:00
dearblue 129a804136 Append cflags for undefined macro 2018-12-22 21:58:58 +09:00
take-cheeze b37b312081 Rename libmruby stuff to avoid confusion 2018-10-29 14:07:16 +09:00
dearblue 366848996a Clear terminated space 2018-09-07 22:32:34 +09:00
dearblue cbf2738861 Reverse gems final 2018-09-02 14:13:09 +09:00
duangsuse 06428059f6 Add ~/Android/Sdk/ndk-bundle as default NDK home 2018-07-04 19:33:11 +08:00
take-cheeze e050cfb349 Add forgotten mkdir_ps. 2018-06-20 18:20:26 +09:00
Lothar Scholz a9d0d90f74 Removed the Visual Studio Version Check because it does not
work with internationalized versions of Visual Studio. It will capture
the returned string in the local codepage encoding and make ruby exits
with an invalid UTF8 error message.

Also "Version" might be translated and not appear in the output.
2017-12-24 06:28:38 +01:00
Yukihiro "Matz" Matsumoto 6d42195fb2 Add enable_sanitizer method for clang and gcc.
The patch is created by @take_cheese in #3872
2017-12-11 17:14:50 +09:00
Yukihiro "Matz" Matsumoto c3710dbb96 Fix a compile error on zero mrbgem case. 2017-10-16 18:46:15 +09:00
Yukihiro "Matz" Matsumoto e821c25d38 Merge branch 'move-task-class-definitions' of https://github.com/udzura/mruby into udzura-move-task-class-definitions 2017-07-29 07:09:53 +09:00
Christopher Aue 5a9eedf541 Fixed setting custom rbfiles in gemspec 2017-07-19 19:46:36 +02:00
Yukihiro "Matz" Matsumoto 466a18b0d3 Remove redundant use of Object#to_s in interpolation. 2017-06-28 23:28:24 +09:00
Yuji Yamano 52a03800d3 Add --libmruby-path support to mruby-bin-mruby-config. 2017-04-22 14:09:06 +09:00
Uchio KONDO 9c2db2e134 Move class/module definitions to normal .rb files 2017-04-04 12:03:43 +09:00
Yukihiro "Matz" Matsumoto 0bcf9e28fc Reorganize C++ exceptions; ref #3470
There are 3 levels of C++ exception handling:
* default - no C++ exception (use setjmp/longjmp)
* enable_cxx_exception (use C++ exceptions with C ABI)
* enable_cxx_abi (use C++ ABI including exceptions)
2017-03-02 10:58:26 +09:00
Yukihiro "Matz" Matsumoto 1a1f834ade Compile C files by C compiler when C++ files mixed.
ref #3267 #3470

By this commit, mruby do not use C++ ABI mode unless
you specify explicitly. It compiles C files by C
compilers, with C++ exception enabled when it sees
C++ files in your configured mrbgems.

I haven't tried visualcpp, so please submit an issue
if you see any problem with C++ gems on Windows.
2017-02-28 23:27:13 +09:00
Yukihiro "Matz" Matsumoto 83a6c0e0a4 Merge pull request #3458 from dabroz/gitlab-ci
GitLab.com tests for multiple configurations
2017-02-27 08:59:33 +09:00
Felix Jones 324231a733 Android toolchain separated target architecture compile flags (ctarget) from shared compile flags (cflags). Added support for custom mfpu and float-abi switches for the armeabi-v7a target. 2017-02-16 15:02:10 +00:00
Tomasz Dabrowski bc721ec45d Gitlab tests for multiple configurations
Gitlab testing is introduced, using GitLab CI, to test many different configurations:
 - 32/64 bit architecture
 - float/double
 - 16/32/64 bit int size
 - none/NaN/word boxing
 - ASCII/UTF8

using various compilers:
 - gcc-4.7
 - gcc-4.8
 - gcc-4.9
 - gcc-5
 - gcc-6
 - clang-3.5
 - clang-3.6
 - clang-3.7
 - clang-3.8
 - clang-3.9
2017-02-16 13:50:27 +01:00
crimsonwoods a6b1e964a3 Modify default cflags. 2017-02-15 03:03:47 +09:00
crimsonwoods 838fa69aa3 Add '-Wl,--fix-cortex-a8' linker option for 'armeabi-v7a' architecture. 2017-02-15 00:51:10 +09:00
crimsonwoods 83a3da4456 Set default linker 'flags' and 'flags_before_libraries'. 2017-02-15 00:36:02 +09:00
palkan 131566753d Separate compilers setup from config setup
Fixes #3418.
2017-02-13 20:59:07 +03:00
Sorah Fukumori ee7fc56dd0 Put package's libs flag after %{objs}
In case LDFLAG contains "-Wl,--as-needed" or "--as-needed" is enabled by
default, "-l" flags should appear after objs specifiction.
2017-01-09 10:08:06 +09:00
Jun Takeda fe0884f37f Removed ununnecessary escape character '\' for MRUBY_XXX in libmruby.flags.mak 2017-01-05 22:42:25 +09:00
Kouhei Sutou 237d26fd86 Support pkg-config in mrbgem.rake
Example usage:

    MRuby::Gem::Specification.new('mruby-onig-regexp') do |spec|
      # ...
      if spec.search_package('onigmo')
        # Use onigmo.h when onigmo.pc exist.
        spec.cc.defines += ["HAVE_ONIGMO_H"]
      elsif spec.search_package('oniguruma')
        # Use oniguruma.h when oniguruma.pc exist.
        spec.cc.defines += ["HAVE_ONIGURUMA_H"]
      else
        # Use bundled Onigmo otherwise.
        # ...
      end
    end
2016-12-11 21:35:56 +09:00
Tomasz Dąbrowski d7a6070d22 Fixed language standard mode for GCC (cannot use gnu99 with C++, c++03 used instead) 2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski 44c3859a97 Fix for compiling mruby as C++ on Visual Studio toolchain 2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski 18757c8f7b Different method of compiling C as C++ (-x c++) 2016-11-24 09:28:00 +09:00
Felix Jones b83bcd12df Removed GCC TODO 2016-10-08 15:10:46 +01:00
Felix Jones 3e9fe81591 Android GCC support re-added 2016-10-08 15:09:08 +01:00
Felix Jones 5d2795c00d Fixed mips and mips64: GCC Toolchain now points to GCC. 2016-10-08 00:23:55 +01:00
Felix Jones 5fd068eb4d Android task: NDK default search paths now favour ndk-bundle. Added macOS NDK search paths. 2016-10-07 22:31:24 +01:00
Nobuyoshi Nakada 6511bfd79a Removed trailing spaces 2016-09-28 12:29:41 +09:00
Felix Jones 04ae2960f4 Fixed regex order falling early in arch cases, causing x86_64 and arm-v7a to use wrong target. 2016-09-15 18:14:27 +01:00
Felix Jones 18662ff576 Re-written android.rake task for latest Android NDK clang. Currently loses support for GCC and mips, mips64. Addresses issue #3208 2016-09-15 15:57:44 +01:00
Paolo Bosetti ac9b6f2a11 In mrbgem_spec.rake, added support for @mrblib_dir @objs_dir, so that a gem can have custom source directory names 2016-09-02 17:38:40 +02:00
ksss 451523ff02 Avoid Syntax Error on CRuby v1.8
CRuby v1.8 dose not support named capture
2016-04-16 22:39:09 +09:00
cremno bfc7b2e30f deprecate Visual Studio 2010 and 2012 2016-03-22 11:41:16 +01:00
cremno 611e99e741 remove unnecessary array/each 2016-03-22 11:38:09 +01:00
wanabe 2aa6b449a2 Reduce compiler include_paths 2016-03-13 17:06:39 +09:00
Daniel Bovensiepen fcbaafaa2c Add toolchain support for OpenWRT 2016-02-11 21:32:42 +08:00
asatou d0668cf9c9 Fix build error in ruby 1.8.
Apply change of #2978 to :clang, :gcc, :visualcpp toolchains
2016-01-13 16:02:58 +09:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
Zachary Scott 98285e6b16 This patch changes git gem behavior to never pull gems unless specified.
Since mgem's function almost the same as git gems, but you can see they already
avoid pulling from source after the gem has already been cloned.

 You can see from the `load_special_path_gem` method found in the file
`mruby_build_gem.rake`, or extracted here:

```ruby
if File.exist? mgem_list_dir
  git.run_pull mgem_list_dir, mgem_list_url if $pull_gems
else
  FileUtils.mkdir_p mgem_list_dir
  git.run_clone mgem_list_dir, mgem_list_url, "--depth 1"
end
```

Also, later in this same method; mgem will set the `git` params.
Doing this will trigger the following block:

```ruby
if File.exist?(gemdir)
  if $pull_gems
    git.run_pull gemdir, url
  else
    gemdir
  end
else
  # ... clone
end
```

You can see here, this checks if `$pull_gems` is enabled before pulling.

Lastly, the final condition for this method is here:

```ruby
if params[:checksum_hash]
  # Jump to the specified commit
  git.run_checkout gemdir, params[:checksum_hash]
else
  # Jump to the top of the branch
  git.run_checkout gemdir, branch if $pull_gems
end
```

What we changed was the `else` condition of this block to follow the same
behavior as the aforementioned code. In doing so, we can avoid two things:

* Excess `clone` calls can slow down builds (times number of gems used)
* We _don't_ want our code to _update_ during build

To explain, if during build time there are some changes in the gem we are
depending upon: updating during compile time could actually break our
application.

This is what we're trying to avoid.
2015-11-16 11:43:56 +09:00
Yukihiro "Matz" Matsumoto 622e68e535 Merge branch 'fix_androidndk_rake' of https://github.com/crimsonwoods/mruby into crimsonwoods-fix_androidndk_rake 2015-10-15 23:08:38 +09:00
Seba Gamboa 1e2381f870 Rename androidndk tolchain to just android 2015-10-12 13:41:46 -03:00