373 Commits

Author SHA1 Message Date
Kondo Uchio 690b2aa761 Detect newly added mrbgems when re-creating gem_init.c 2020-05-26 23:15:00 +09:00
dsisnero c7ab4cf616 fix for quoting visualcpp 2020-04-01 12:31:48 -06:00
Dominic Sisneros e3875ae8c5 build when directories and files have spaces
Modified the build to quote filenames so that it builds when files have spaces
2020-04-01 11:55:35 -06:00
Reckordp 7c85a1ff07 Increase flexibility of CrossBuild 2020-03-08 14:23:55 +07:00
Yukihiro "Matz" Matsumoto ff57c0278f Remove broken MRB_INT16 configuration option. 2020-01-15 21:32:00 +09:00
KOBAYASHI Shuji b96fa664b0 Use rake instead of minirake in .gitlab-ci.yml
There was an error in the `.gitlab-ci.yml` generation script, so it was also
fixed.
2019-12-30 17:46:22 +09:00
KOBAYASHI Shuji 26e6e75ba6 Use Rake DSL instead of commands of FileUtils
- Respect `--verbose(-v)` and `--dry-run(-n)` options.
- Silence warnings to keyword arguments on Ruby 2.7.
2019-12-27 16:49:32 +09:00
take-cheeze 38fdca82c6 Use GNU extension in C++ for cygwin 2019-12-23 20:58:43 +09:00
KOBAYASHI Shuji 9f1167f7c9 Fix "undefined method `Pathname'"; fix #4895 2019-12-21 23:31:17 +09:00
Yukihiro "Matz" Matsumoto de17f63b45 Abandon minirake. Use rake for compilation; fix #4884 2019-12-21 22:11:08 +09:00
KOBAYASHI Shuji edd412966e Remove unused code to old Visual Studio in tasks/toolchains/visualcpp.rake 2019-10-04 09:31:54 +09:00
KOBAYASHI Shuji 895ab2342e Revert part of "Refine tasks/toolchains/(gcc|clang).rake" (07c6b7f0)
`-Wzero-length-array` is not a mandatory option, so the original is better.
2019-09-13 21:28:23 +09:00
KOBAYASHI Shuji be76cec342 Fix warnings for invalid C++ option with enable_cxx_abi; ref #3618, #4703 2019-09-13 17:14:37 +09:00
KOBAYASHI Shuji 07c6b7f0ab Refine tasks/toolchains/(gcc|clang).rake
- Make sure to specify `-std=gnu99` for C compiler flag.
- Make sure to specify `-Wzero-length-array` for C/C++ compiler flag (Clang).
- Extract similar codes.
2019-09-12 21:45:47 +09:00
David Siaw 6375639917 fix lots of warnings and make logo not so big 2019-08-26 02:08:33 +09:00
David Siaw e1e96c0cf4 change doc directory and reduce warnings 2019-08-26 00:23:28 +09:00
KOBAYASHI Shuji 334afb167c Use new specifiers/modifiers of mrb_vfromat()
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in
my environment than before the introduction of new specifiers/modifiers
(5116789a) with this change.

  ------------+-------------------+-------------------+--------
   BINARY     | BEFORE (5116789a) |   AFTER (This PR) |  RATIO
  ------------+-------------------+-------------------+--------
   mruby      |      593416 bytes |      593208 bytes | -0.04%
   libmruby.a |      769048 bytes |      767264 bytes | -0.23%
  ------------+-------------------+-------------------+--------

BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613,
so I put it back.
2019-08-05 13:18:50 +09:00
KOBAYASHI Shuji 1e9cb74cc6 Change second argument to %l of mrb_vformat() to size_t from mrb_int
- `size_t` is more commonly used.
- `len` argument of `mrb_str_new()` is `size_t`.

NOTE:

The test for `%l` is temporarily disabled because adding a new type to
`mrbgems/mruby-test/vformat.c` causes an error (memory error?) on Visual
Studio 2017 in AppVeyor.
2019-08-03 19:42:22 +09:00
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