Module: Flags
- Defined in:
- ext/enterprise_script_service/flags.rb
Class Method Summary collapse
- .cflags ⇒ Object
- .debug_flags ⇒ Object
- .defines ⇒ Object
- .io_safe_defines ⇒ Object
- .library_paths ⇒ Object
- .optimization_flags ⇒ Object
Class Method Details
.cflags ⇒ Object
5 6 7 |
# File 'ext/enterprise_script_service/flags.rb', line 5 def cflags debug_flags + optimization_flags end |
.debug_flags ⇒ Object
9 10 11 |
# File 'ext/enterprise_script_service/flags.rb', line 9 def debug_flags %w[-g3] end |
.defines ⇒ Object
37 38 39 |
# File 'ext/enterprise_script_service/flags.rb', line 37 def defines io_safe_defines + %w[MRB_NO_STDIO] end |
.io_safe_defines ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'ext/enterprise_script_service/flags.rb', line 26 def io_safe_defines %w[ _GNU_SOURCE MRB_USE_DEBUG_HOOK MRB_INT64 MRB_UTF8_STRING MRB_WORD_BOXING YYDEBUG ] end |
.library_paths ⇒ Object
21 22 23 24 |
# File 'ext/enterprise_script_service/flags.rb', line 21 def library_paths # Necessary because of https://github.com/mruby/mruby/issues/4537 %w[/usr/local/lib /usr/lib] end |
.optimization_flags ⇒ Object
13 14 15 16 17 18 19 |
# File 'ext/enterprise_script_service/flags.rb', line 13 def optimization_flags if ENV["MRUBY_ENGINE_ENABLE_DEBUG"] %w[-O0] else %w[-O3] end end |