Commit Graph

363 Commits

Author SHA1 Message Date
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
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